Is there a built-in function in Octave to crop a specific region from an image? I have installed the image processing package but I don’t find a function like imcrop or something like that.
Is there a built-in function in Octave to crop a specific region from an
Share
How about if your image (which is a matrix in Octave) is
I, and you want to crop fromx,ya block of sizew,l, thenresize(circshift(I,-x,-y), w, l)ought to do it. Basically, shift the matrix so thatx,yis now at1,1, and just cut off the rest of the matrix pastw,l.EDIT: Actually, that was before I learned about matrix indexing. Instead, this is what you want:
Croppedimage = Image(y:y+l-1, x:x+w-1)