how to reconstruct original image from subimages?
Show older comments
hi...
i have an image which is cropped into a number of subimages using the Boundingbox..the subimages are processed and saved...
i want to reconstruct the original image from these subimages... is there a way to do that?please help !!
i used 'regionprops' to get the boundingbox and other parameters.
Answers (1)
Image Analyst
on 22 Feb 2013
Stitch them together:
sideBySide = [imageLeft, imageRight];
topAndBottom = [imageTop; imageBottom];
Do as many times as necessary. You can put multiple images inside the brackets.
5 Comments
Image Analyst
on 22 Feb 2013
If they are going to go side by side they need to be the same number of rows. If they are going top and bottom, they need to be the same number of columns.
I'm not sure where in your code, you're rebuilding your image from parts. But when you do, put these lines just befor ethe stitiching line:
[rows1, columns1, numberOfColorChannels1] = size(I1) % No semicolon.
[rows2, columns2, numberOfColorChannels2] = size(I2) % No semicolon.
Now, see what it says, then recall what I said about the rows and columns matching and figure out what you're trying to stitch together and why it's not working - what dimension is mismatching and why.
Ade Aulya
on 13 Feb 2019
hi, thank you for your explanation, Image Analyst.
If you don't mind, could you please show the full code example of this stitching proses, please ?
i also have the same question with jeena, actually. also want to reconstruct original image from subimages that has been devided into blocks 100x100pz using this code https://www.mathworks.com/matlabcentral/answers/uploaded_files/32899/blockproc_demo2.m
but im sorry, i still didn't understand the code above.
thankyou.
Image Analyst
on 14 Feb 2019
blockproc() processes images one block at a time. It does not split images up into separate blocks - separate variables or image files. So you don't "reconstruct" images from 100x100 blocks after using blockproc because there are no 100x100 images to be had.
Ade Aulya
on 14 Feb 2019
so, is it mean i can't stitch its or reconstruct its or put it back together, like the original images, those blocks / tiles anymore, sir ?
is there another way to put it back again ?
Categories
Find more on Neighborhood and Block Processing in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!