Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 7 of 7

Thread: Image Processing in Java

  1. #1
    Junior Member
    Join Date
    Jan 2012
    Posts
    16
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Image Processing in Java

    Hi guys, I'm relatively new to java and to image processing and I'm hoping someone on here can help me with the problem I'm having.

    What I've done so far is make a simple application which opens the webcam and can take and save a picture. Ive then loaded the image pixel data into a 2d array. How then do I do what is known as 'fast fourier transform' on it from here? Has anyone done anything like this before?

    Thanks very much for any help


  2. #2
    Super Moderator helloworld922's Avatar
    Join Date
    Jun 2009
    Posts
    2,895
    Thanks
    23
    Thanked 619 Times in 561 Posts
    Blog Entries
    18

    Default Re: Image Processing in Java

    Have you tried googling for it? There are libraries available which perform FFT already (most notably, FFTW which has Java wrappers).

  3. #3
    Junior Member
    Join Date
    Jan 2012
    Posts
    16
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: Image Processing in Java

    Yeah the tutorials assume you have the real and imaginary part of the image, whereas I just have one 2d array of the pixel values.

    Also, a quick question though its somewhat off the java topic, if you wanted to get say, the face from an image and you have 2 images where the faces are different sizes, any ideas how to scale these so they are the same size for fft?

  4. #4
    Junior Member
    Join Date
    Jan 2012
    Posts
    16
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: Image Processing in Java

    ps i am using the fft to then get the magnitude of the images so i can compare them

  5. #5
    Super Moderator helloworld922's Avatar
    Join Date
    Jun 2009
    Posts
    2,895
    Thanks
    23
    Thanked 619 Times in 561 Posts
    Blog Entries
    18

    Default Re: Image Processing in Java

    So why not set the imaginary parts to 0?

    You can scale an image by using a BufferedImage, then using an affine transformation. See: java - How to scale a BufferedImage - Stack Overflow

  6. #6
    Junior Member
    Join Date
    Jan 2012
    Posts
    16
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: Image Processing in Java

    Thanks for the buffered image link, but with regard the imaginary parts of the image is this not specific to the image each time? As I'm going to be comparing the images to find out who's in the picture won't the imaginary part have to be that for the image?

  7. #7
    Junior Member
    Join Date
    Mar 2014
    Location
    Hong Kong
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: Image Processing in Java

    Image Processing in Java

    I just got around to this post… it’s funny because I am also quite interested in this question. I've done some reserch on it and read a lot on guides. However, I still can't find any good articles talking about it.

Similar Threads

  1. Image processing tutorial
    By ChristopherLowe in forum File Input/Output Tutorials
    Replies: 8
    Last Post: December 19th, 2013, 11:19 PM
  2. Web app image processing from stream to UIComponent
    By throwcode in forum File I/O & Other I/O Streams
    Replies: 8
    Last Post: August 19th, 2011, 10:58 AM
  3. Image processing tutorial
    By ChristopherLowe in forum Java Code Snippets and Tutorials
    Replies: 1
    Last Post: June 18th, 2011, 11:58 AM
  4. Image Processing
    By subash in forum File I/O & Other I/O Streams
    Replies: 4
    Last Post: June 8th, 2011, 08:40 AM