• Post Reply Bookmark Topic Watch Topic
  • New Topic

Image manipulation

 
Maria Stella
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I am a student, I have to do a project for image manipulation, in particular, the logical operation (And, Or, Not). I searched in internet but don't found example or manual. Can help me?
Thanks
 
Ulf Dittmer
Rancher
Posts: 42970
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to JavaRanch.

Download the image processing app "ImageJ" - it has these operators built in, so you can try out what they do. And then you can study the ImageJ source code to see how they're implemented.
 
Maria Stella
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for the welcome,
ImageJ which class implements the logical operations?
By downloading ImageJ menu which contains this operation?
Thanks again
 
Ulf Dittmer
Rancher
Posts: 42970
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
By downloading ImageJ menu which contains this operation?

Process -> Image Calculator

ImageJ which class implements the logical operations?

No idea, search for "Image Calculator" and see what you find.
 
Maria Stella
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I saw the code of ImageJ, the class ImageCalculator, and I have done this method but I do not see any picture, what is wrong? thanks
 
Ulf Dittmer
Rancher
Posts: 42970
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How are you displaying the BufferedImage? A BI is just an in-memory data structure for image data, it is not associated with any GUI component that would cause it to be displayed.

Also, there seems to be a bug in line 29.
 
Maria Stella
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
At line 29, I have to replace the & with |?
The BufferedImage is displayed in a JInternalFrame, what should I change?
thanks
 
Ulf Dittmer
Rancher
Posts: 42970
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
At line 29, I have to replace the & with |?

That's one of the problems, there's actually another one.

The BufferedImage is displayed in a JInternalFrame, what should I change?

Maybe nothing. Not seeing the code, we can't tell whether there are any problems with it. But fix the other issue first to see if that changes things.
 
Maria Stella
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

That's one of the problems, there's actually another one.

What is the problem of line 29?


Maybe nothing. Not seeing the code, we can't tell whether there are any problems with it. But fix the other issue first to see if that changes things.

I have this method in the class that extends JPanel


I have an Image class that manages objects of type BufferedImage where there is the method



and finally use the method for assigning the filtered image to JFrame



Thanks
 
Ulf Dittmer
Rancher
Posts: 42970
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What is the problem of line 29?

Examine the variable names carefully.
 
Maria Stella
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you so much for availability!
But the methods for creating the JFrame correct?
Thanks again
 
Ulf Dittmer
Rancher
Posts: 42970
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Not sure, I'm not exactly a Swing expert. Does it still not work? If not, what *is* happening?
 
Maria Stella
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It works just trying to figure out if I had written the correct code
thanks
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!