如何在 48 位消息中添加一些检测或纠正代码?

发布于 2024-12-28 10:02:15 字数 469 浏览 3 评论 0原文

我正在开发一个 OCR 工具,它包含一组符号,每个符号代表 2 位。

例如:
{ ---> 00
} ----> 01

我总是有 48 位代码,所以我有 24 个符号。

我需要在 Objective-c 中实现一个检测器或纠正错误(我正在为 Mac 开发一个应用程序)。 我唯一的要求是代码尽可能小。我有一个 48 位(代表 24 Sibol)并且不想在我的设计中添加更多。

我尝试实现这段代码: http://code.google.com/p/rscode-objc/

但它已经过时了,我遇到了很多错误,并且是为 255 字节的消息设计的(当然我不知道如何适应)。如果有人可以帮助我适应它,那就太好了。

如果您需要更多详细信息,请告诉我。

谢谢。

I'm developing a OCR tool reeds a set of symbols which represent 2 bits each.

For example:
{ ---> 00
} ----> 01

Always I have a 48 bits code so I have 24 symbols.

I need to implement a detector or correction of errors in Objective-c (I'm developing an application for Mac).
My only requirement is that the code is as small as possible. I have a 48-bit (which represents 24 Sibol) and do not want to add many more to my design.

I have tried to implement this code:
http://code.google.com/p/rscode-objc/

But it is outdated, I get many errors and is designed for messages of 255 bytes (and of course I do not know how to adapt). If somebody can help me to adapt it, it would be great.

If you need further details, let me know.

Thank you.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

过去的过去 2025-01-04 10:02:16

您可以尝试这两个文件来实现完整的 CRC64(从您添加的标签来看,我认为您会对 CRC 感兴趣):

CRC64.h:
http://pastie.org/3227564

CRC64.c:
http://pastie.org/3227559

You can try these two files for a complete CRC64 implementation (from the tags you added, I thought you'd be interested in CRC):

CRC64.h:
http://pastie.org/3227564

CRC64.c:
http://pastie.org/3227559

烂人 2025-01-04 10:02:16

我终于使用了里德-所罗门代码:http://code.google.com/p/ rscode-objc/
但谢谢你的回答 H2CO3 :)

I have finally use the Reed-Solomon code: http://code.google.com/p/rscode-objc/
But thank you for your answer H2CO3 :)

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文