how to make top half image white in the frame ??
10 views (last 30 days)
Show older comments
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

I want the upper half to make it white..
Any suggestions are greatly appreciated..! Thanks
0 Comments
Accepted Answer
Image Analyst
on 24 Aug 2016
Just set the values to 255:
[rows, columns, numberOfColorChannels] = size(rgbImage);
midRow = floor(rows/2);
rgbImage(1:midRow, :, :) = 255;
imshow(rgbImage);
5 Comments
Image Analyst
on 1 Sep 2016
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
More Answers (1)
sai vallikat
on 1 Sep 2016
1 Comment
Image Analyst
on 1 Sep 2016
No, that's pretty much the best way, assuming you know the rows and columns like you do.
See Also
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!