such as follows, what i want to do after this is, rotate the image in z axis and increase the length of black lines in the image in z axis, such that it looks 3d. Second, after we have a 3-D image, how to do some image processing to highlight or extract, only a specific part of the image. for ex, if we get 3D image of a rock and we need only the cylinder rock and ignore the author things. To create a vector directly from a matrix. convert 2d floor plan image into 3d in matlab Ask Question Asked 5 years, 2 months ago Modified 5 years, 2 months ago Viewed 425 times 1 I have an image of a floor plan. Write me a code that convert 2D images to 3D image using MATLAB, then take the important part from the image. Of course, you can always use tricks like B = A(:) I did put a function called wreshape on the MATLAB Central exchange that would pad as necessary to do this operation with no error generated.
Logically, we cannot create an array of with two columns from something that has 9 elements in it. Product of known dimensions, 2, not divisible into total number of elements, 9.
If you leave one of the arguments to reshape empty, then reshape computes the size for you! Be careful, if you try this and the size of A does not conform, then you will get an error. (What else would they call it?) There are still a few tricks to uncover.įirst of all, the simplest way to turn an array of size into an array of size ? B = reshape(A,n*m,p) Reshape is of course the standard solution to reshaping an array.