To resolve issues starting MATLAB on Mac OS X 10.10 (Yosemite) visit: http://www.mathworks.com/matlabcentral/answers/159016
Hi,how can i slip and rotate the color image img like the binary image bw?
I=imread('image.jpg'); %color image bw=segmentation(I); % the result is a binary image where the object detected (ROI) is white img = bsxfun(@times, I, cast(bw,class(I))); phy = regionprops(bw, 'Orientation') [barx,bary]=barycentre(edge); % slip the region to the center of the image edge = recentre(edge,barx,bary); I2 = recentre(bw,barx,bary); phy1=phy.Orientation; edge=imrotate(edge,-phy,'loose'); I3=imrotate(I2,-phy,'loose');
No products are associated with this question.
Have you tried circshift() to slide the image over?