how to make top half image white in the frame ??
4 次查看(过去 30 天)
显示 更早的评论
I am having an RGB image and I want to make top region of the image filled with white color.. The above is the RGB image with frame size 640 * 480
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/155972/image.png)
I want the upper half to make it white..
Any suggestions are greatly appreciated..! Thanks
0 个评论
采纳的回答
Image Analyst
2016-8-24
Just set the values to 255:
[rows, columns, numberOfColorChannels] = size(rgbImage);
midRow = floor(rows/2);
rgbImage(1:midRow, :, :) = 255;
imshow(rgbImage);
5 个评论
Image Analyst
2016-9-1
I hope you understand that I can't write the entire app for you. If I were you, I'd use a combination of a texture filter, like stdfilt(), and color segmentation, like the demos in my File Exchange: http://www.mathworks.com/matlabcentral/fileexchange/?term=authorid%3A31862
更多回答(1 个)
sai vallikat
2016-9-1
1 个评论
Image Analyst
2016-9-1
No, that's pretty much the best way, assuming you know the rows and columns like you do.
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!