Simulation problem in image denoising (tree-based technique)
Show older comments
Hello friends, i am posting first time anything on this blog,hope you will help me. my problem is that: i am doing image denoising in matlab,i am using tree base denoising technique,i made different modules,in one module i take image as input of 3X3 window and find maximum value and minimum value from upper half window and lower half window of 3x3 window.my answer of this module is boolean because i have placed OR gate at end which tells me my image pixel is noisy or not. for example my output is 0 1 1 0 it means first and fourth pixel is not noisy whereas 2nd and third pixels are noisy. my problem is here.i am placing if statement here ,i want is that if 0 comes it should connect to a matlab function,and when 1 comes it should connect to another matlab function,so i am using if-else block,there are four values so i am also placing for loop,but when i place for loop it says it cannot take boolean value as input,so please help me how i can fix. Thanks in advance
Answers (1)
Image Analyst
on 30 Nov 2014
0 votes
Rehan:
I've never heard of this tree-based technique, but then, there are thousands of denoising methods. I have some questions. Which pixels in the 3x3 window are considered upper half and which are lower half?
This is not at all explained: "my answer of this module is boolean because i have placed OR gate at end which tells me my image pixel is noisy or not." What are you ORing and why does that indicate if the pixel is a noise pixel or not?
Why is your output 4 binary values and not either 9 or 1?
And what does "it should connect to a matlab function" mean? Connect in what way? Do you mean "call" the function? If so, what are you passing into the function, and what does the function return?
Then you say "i am using if-else block,there are four values so i am also placing for loop,but when i place for loop it says it cannot take boolean value as input" Can you show that code? An if should take a single boolean, not a list of 4 booleans like [ 0 1 1 0] , if that's what you're doing.
Your subject line says "Simulation problem....." Where exactly in this is the simulation? It all sounds very deterministic to me (works with actual date, not synthesized/invented data). I don't see any simulation at all. Did you leave something out?
We'll be better able to answer your questions if you answer ALL of my questions, and also attach your m-file and image.
8 Comments
Image Analyst
on 30 Nov 2014
Rehan's answers moved here:

Thank you very much sir for your kind reply, i have attached image of my algorithm,please see image file first and then read my these details:
At output you can see there are 4 boolean values 0,1,0,0 when 0 comes it should display it is noise; means noisy function should be called, at 1 it should call no noise function. When i put if-else block it says values are more than 1, "if block" can only takes one value, so I place "for loop block" before "if block", but when i place "for loop block", it says "for block" doesn't take boolean values. So please tell me what should i do
Image Analyst
on 30 Nov 2014
Edited: Image Analyst
on 30 Nov 2014
You can do the whole image at once. Just use imdilate() to get the max in the upper for all pixels in the image, and use imerode() to get the min. Of course they will have different structuring elements to indicate which pixels they are considering.
What exactly does "Check greater" do? What comes out of that step? I guess it's a single boolean, but when is the boolean true and when is it false?
Rehan
on 30 Nov 2014
Image Analyst
on 30 Nov 2014
I don't need to give you my email because you can attach m-files, images, etc. here with the paper clip icon. Make sure I can run it without doing major modifications or running into missing functions. You might do a dependency report on it first to find all the dependent functions it needs to run. Click the little down arrow on the Current Folder panel's title bar, then select Reports=>Dependency Report.
Rehan
on 8 Dec 2014
Image Analyst
on 8 Dec 2014
Sorry - I couldn't figure out which is the main program. What do I do with these 4 m-files? They all expect some input I, which you promptly ignore and overwrite. And you forgot to attach the lena512 image.
Image Analyst
on 8 Dec 2014
Sorry - I don't have Simulink. Good luck with your project.
Rehan
on 8 Dec 2014
Categories
Find more on Signal Attributes and Indexing 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!