can we able to generate an image from the given pixel values?
1 次查看(过去 30 天)
显示 更早的评论
imread of an image will gives pixel values in the command window.. can we regenerate the same image from the pixel value?
采纳的回答
Walter Roberson
2013-4-26
imagedata = imread('YourImage.jpg');
imwrite(imagedata, 'YourNewImage.tif'); %can even change the image type
2 个评论
Walter Roberson
2013-4-26
imwrite(uint8([156 176 187...]...)
If you used [156 176 187...] then the data class would be "double" (because that is the default for MATLAB), and that would be a problem, as MATLAB assumes that "double" values should have a range of 0 to 1 for images.
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Image Processing Toolbox 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!