how to encode and decode negative pixel to positive pixel in matlab ?
1 次查看(过去 30 天)
显示 更早的评论
hi, I want to ask. I have 512x512 image and I want to calculate the entropy. But, it has some error because the pixel contains negative value. Has anybody in here know how to do Matlab code to convert negative pixel to positive pixel and decode it back? please help me
0 个评论
采纳的回答
Image Analyst
2018-3-3
Try this:
negPixels = grayImage < 0;
grayImage(negPixels) = 0; % or 1 or whatever you want.
3 个评论
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Import, Export, and Conversion 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!