how do i convert image to strings(an array of strings)? pls help me. thanks in advance

2 个评论

Please expand on what you mean. Are you trying to do Optical Character Recognition?
i am trying to convert an image to a text file or an array of strings and it has to be reversible too. This is just a part of my project.

请先登录,再进行评论。

 采纳的回答

Azzi Abdelmalek
Azzi Abdelmalek 2013-2-20
编辑:Azzi Abdelmalek 2013-2-20
im=iread('yourimage')
out=num2str(im)

5 个评论

thank you sir... it was really helpful...
and how to convert str to image further?
uint8() and str2double().
can i use it in huffman coding and decoding
Yes. But you will get better compression if you do Huffman coding on the binary values than on the text representation of the binary values.

请先登录,再进行评论。

更多回答(1 个)

Image Analyst
Image Analyst 2013-2-20

0 个投票

An alternative is im2html, which gives a nice visual display: http://www.mathworks.com/matlabcentral/fileexchange/32273-im2html-m
Another alternative is to use sprintf() or fprintf(). It really depends on how you want to use the string.

类别

帮助中心File Exchange 中查找有关 Convert Image Type 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by