image masking by position
Show older comments
I want to analyses a part of an image without disturbing the full image. Lets say the position of the image part to be analyzed is [x1,x2,y1,y2]. i tired using the below mentioned code but was not able to do it.
I = imread('cameraman.tif'); F= image(I, [x1 y1 x2 y2]);
??? Error using ==> image Incorrect number of arguments specified
Error in ==> fd at 39 F=image(I, [x1,y1,x2,y2])
Accepted Answer
More Answers (1)
Iain
on 30 May 2013
0 votes
segment = I(x1:x2,y1:y2);
Categories
Find more on Image Arithmetic in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!