显示 更早的评论
I have taken a 26 image,processed,IWT,ebcot process,now i want to give 2 inputs to weighting weighting model,one is menn energy of co-efficients and other is VOI coordinates,please help
采纳的回答
I am having difficulty understanding your question as phrased. It is also not clear what bit-stream you are trying to form.
At this time could the question be simplified to "How do I convert numeric data to a bit stream?" If so then use dec2bin, possibly after having used typecast() if needed to re-represent floating point numbers as unsigned integers. dec2bin() will output a string of characters, each '0' or '1'. If you need decimal 0 and decimal 1, then you can subtract '0' from the result, as in
dec2bin(314159) - '0'
8 个评论
FIR
2011-12-31
i have an image from that i want to convert that into bit stream output
The first step would be to define what "bit stream output" is, precisely.
The second step would be to convert your "image" to numeric data.
The third step would be to re-read my answer above and implement it.
walter bit stream is getting the output in bitstreams=[0 1 1 0 0 1 0 etc]
Okay, that would be the version that subtracts the character '0' from the dec2bin() result.
You will probably want to use transpose() and reshape() after the conversion to 0's and 1's.
Walter will image compression output will give bitstream outputs
That depends on which image compression routine you use. I have never looked at EBCOT as it is part of JPEG 2000, which I avoid looking at for patent reasons (*)
Some image compression routines produce byte-oriented outputs, and other image compression routines produce bit-oriented outputs.
If you end up with a numeric array after your image compression routine, then use dec2bin() and subtract '0' to convert to a stream of 0's and 1's.
* (The only way to find out what the JPEG 2000 patent terms say is to agree to them, and _then_ you can find out what you just agreed to. My legal department absolutely will not permit that.)
I=imread('lena.bmp')
K=dec2bin(I);
[r c]=size(K)
J=K-0;
W=zeros(r,c);
J=K-W
i get numeric values
K = dec2bin(I) - '0';
just like I wrote. The character, not the number.
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Image Arithmetic 的更多信息
标签
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!选择网站
选择网站以获取翻译的可用内容,以及查看当地活动和优惠。根据您的位置,我们建议您选择:。
您也可以从以下列表中选择网站:
如何获得最佳网站性能
选择中国网站(中文或英文)以获得最佳网站性能。其他 MathWorks 国家/地区网站并未针对您所在位置的访问进行优化。
美洲
- América Latina (Español)
- Canada (English)
- United States (English)
欧洲
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)
