convert block cell to image
显示 更早的评论
how to convert 8*8 non overlapping blocks into an image?
2 个评论
Rik
2019-8-16
What do you mean exactly? Do you mean something like blockproc?
puja yadavalli
2019-8-16
回答(1 个)
KSSV
2019-8-16
Let I be your 8*8 cell block ..
iwant = cell2mat(I) ;
8 个评论
puja yadavalli
2019-8-16
puja yadavalli
2019-8-20
KSSV
2019-8-20
Show us the whole code you tried.
Guillaume
2019-8-21
Your code starts with moderately useful comments and then quickly gives up. Unfortunately, the uncommented part is the one that need comments the most in order to understand what is going on.
I suspect that you've pieced this code together from various answers, without thinking much about the overall architecture. You need to review your code line by line and think if it makes sense. I would suggest that you run your code line by line using the debugger and after each line think: did this make sense? Was it actually useful?
e.g, at the start you get the size of the image as m,n (you already know what it is since you forced it to 512x512, but it's always a good idea to ask for it anyway), however on the next line you hardcode (wrongly!) the number of blocks. The number of blocks depend on the the size of the image.
Later on, you have the unnecessary variable counti and countj (they're always equal to i and j)
Then you have variables that are never used such as b and iwant.
I gave up trying to understand after that.
puja yadavalli
2019-8-21
编辑:puja yadavalli
2019-8-21
Guillaume
2019-8-21
I'm sorry, due to the lack of explanation it would require too much of my time to try to understand your code, let alone find what is wrong with it. The first thing you need to do is comment your code, to explain what each major step is trying to do.
puja yadavalli
2019-8-21
类别
在 帮助中心 和 File Exchange 中查找有关 Neighborhood and Block Processing 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
