IM_BOX Fixed mapping determining a rectangular enclosing a blob (0/1 image)
B = IM_BOX(A) If A is a 0/1 image then B is the same image with all empty (0) border columns and rows removed. B = IM_BOX(A,N) If A is a 0/1 image then B is the same image, but having in each direction N empty (0) columns and rows around the object (1). B = IM_BOX(A,[NX1 NX2 NY1 NY2]) If A is a 0/1 image then B is the same image, but having NX1, NX2 empty columns (0) left, respectively right of the object (1) and NY1, NY2 empty rows (0) above, respectively below the object(1). B = IM_BOX(A,N,ALF) Adds as many empty (0) columns or rows such that the aspect ratio of images (height/width) equals ALF. For ALF == 1, square images are returned. For ALF == 0, images are taken as they are and N rows and columns are added. Example(s)
prdatafiles; % make sure prdatafiles is in the path
See also
|