Dividing images into blocks
Show older comments
I`ve loaded a video. Then i divided the video into individual frames. Now i want to divide each frame into a group of blocks. After dividing them into blocks, i want to compare the blocks of one frame with the blocks of another frame, to know whether they are matching.
1. How to divide frame into blocks? 2. How to read the blocks(pixel values of the frames)? 3. How to compare the blocks?
1 Comment
Answers (2)
Sean de Wolski
on 28 Feb 2012
1 vote
perhaps mat2cell(), blockproc() or a double for-loop.
5 Comments
Sean de Wolski
on 28 Feb 2012
Moved: DGM
on 29 Dec 2023
imshow(G{1,1}) %show first block
Sean de Wolski
on 28 Feb 2012
Moved: DGM
on 29 Dec 2023
g(i) or g{i} for a cell array. g[i] is not a valid syntax in MATLAB.
Image Analyst
on 28 Feb 2012
1 vote
Depends on how you define blocks. Perhaps you want quadtree decomposition if you want blocks of variable size. It's in the Image Processing Toolbox.
Categories
Find more on Neighborhood and Block Processing in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!