Region of Interest Image Processing
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Algorithms Analyst
am 13 Nov. 2013
Kommentiert: Image Analyst
am 13 Nov. 2013
Hello All
I want to apply some algorithm only on region of interest in an input image.
Let say I have an image A.
image_A=imread('1.jpg'); "size is 576x576"
[rows cols colors]=size(image_A);
image_interest=zeros(rows,cols,colors);
new_image=imcrop(image_A);"this crops only interested region lets say I am cropped the lower region from image_A".
"Now I want this region size as same as image_A" for further processing.
Let say I wan to subtract these two images. like
dist=abs(image_A-new_image)..
can any one help...
0 Kommentare
Akzeptierte Antwort
Image Analyst
am 13 Nov. 2013
Use imresize() to stretch the lower half image up to the size of the original image_A:
new_image = imresize(new_image, size(image_A));
6 Kommentare
Image Analyst
am 13 Nov. 2013
Then you just extract the bottom half of the images. You don't resize anything.
backgroundBottomHalf = double(backgroundImage(rows/2:end, :));
oneFrameBottomHalf = double(thisFrame(rows/2:end, :));
difference = abs(oneFrameBottomHalf - backgroundBottomHalf);
Weitere Antworten (0)
Siehe auch
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!