• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Median filter

 
Maria Stella
Greenhorn
Posts: 18
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have to implement the median filter. I found an example on the internet but it does not run, I do not see the image, where am I wrong?



Thanks
 
Paul Clapham
Sheriff
Pie
Posts: 20166
24
MySQL Database
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't really understand the question. The code you posted (as far as I can see) just modifies an image. (At least it modifies an Immagine, whatever that is. Looks like image processing to me though.) There isn't any code there which displays an image and there isn't any code which calls that method. Perhaps you have that code? If you do, then the problem where it does not run must be in the unposted code, which perhaps doesn't call that method. And the problem where you do not see the image must also be in the unposted code.

Perhaps you could post the code you are running which you expect to call that method, and the code which is supposed to display the image? If you could produce an SSCCE (<-- follow and read that link), that would be extremely useful.
 
Maria Stella
Greenhorn
Posts: 18
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The code entered is not just a call to action in this way.



I've done other filters that work and are invoked in the same way, I think that the error of the median filter is right in the code that allows you to make the filter, but I do not understand where is the error. Can you help?
 
Paul Clapham
Sheriff
Pie
Posts: 20166
24
MySQL Database
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't know if I can help. Let me try this. You have this code which calls the method from your original post:



So the method from your original post modifies the state of the object which "immagine" refers to. However after that, you don't use that object any more. At least not in the code you posted. So you aren't going to see the result of those changes.
 
Maria Stella
Greenhorn
Posts: 18
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sorry in the various tests done I copied the wrong code.
The call to the correct method is the following median_RGB



Thanks
 
Paul Clapham
Sheriff
Pie
Posts: 20166
24
MySQL Database
  • 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
So your problem is solved? Glad to hear it.
 
Maria Stella
Greenhorn
Posts: 18
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No my problem is not solved, I tried but did not succeed.
 
Paul Clapham
Sheriff
Pie
Posts: 20166
24
MySQL Database
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Then perhaps you could explain your problem again. All we have so far is a code fragment, a problem statement which probably refers to some other unposted code, and the possibility that you changed that code fragment in some way.
 
Maria Stella
Greenhorn
Posts: 18
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Carry all your code in order.
The way to calculate the median filter is:



The method is invoked in the action in this way

  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic