Results 1 to 5 of 5
  1. #1
    davide85 is offline Member
    Join Date
    Mar 2013
    Posts
    3
    Rep Power
    0

    Default SAR Image Processing

    Hi everyone,

    my name is Davide and I am a new member. I apologize in advance for my English that It's not very good.

    I have to do an exercise where I have to draw a SAR(Synthetic Aperture Radar) Image. The problem is that the input image is composed by a binary raster plus an XML parameters file. The XML file contains all the information to correctly read the image.

    I downloaded Java Advancing Imaging Library but I've never worked with this image format and I don't know where to start.

    Can anyone help me?

    Thank you very much.

  2. #2
    PhHein's Avatar
    PhHein is offline Senior Member
    Join Date
    Apr 2009
    Location
    Germany
    Posts
    1,430
    Rep Power
    7

    Default Re: SAR Image Processing

    Math problems? Call 1-800-[(10x)(13i)^2]-[sin(xy)/2.362x]
    The Ubiquitous Newbie Tips

  3. #3
    davide85 is offline Member
    Join Date
    Mar 2013
    Posts
    3
    Rep Power
    0

    Default Re: SAR Image Processing

    Hi everyone again,
    I followed your advice and I studied the theory on raster data so I have made some step forward. Now I have a new problem that I will try to explain you in the better way. I was able to obtain from the binary raster data an array of float.

    From the XML parameters file I know that the rows number are 1000, the columns number are 2000, the pixel type is complex float and that the real and imaginary parts are put side-by-side on a column basis. I created two array, one of the real parts and one of the imaginary parts:

    Java Code:
    for (int i=0;i < SIZE_X*SIZE_Y; i++){
       if(i%2 == 0){
          real[k] = bin_input[i];
          if(Math.abs(real[k]) > max_value_re){
             max_value_re = Math.abs(real[k]);
          }
          k++;
       }else{
          img[n] = bin_input[i];
          if(Math.abs(img[n]) > max_value_im){
             max_value_im = Math.abs(img[n]);
          }
          n++;
       }
    }
    Then I create an array with the absolute value of complex number:

    Java Code:
    for (int i=0;i < SIZE_X/2*SIZE_Y; i++){
         mag[i] = (float) (Math.sqrt(Math.pow(real[i]/max_value_re,2) + Math.pow(img[i]/max_value_im,2)));
    }
    Now I have an array of float with values from 0 and 1. I tried to create a gray scale image because in the XML file it says that the number of channels is 1:

    Java Code:
    BufferedImage theImage = new BufferedImage(SIZE_X/2, SIZE_Y, BufferedImage.TYPE_4BYTE_ABGR);
    WritableRaster wr = (WritableRaster) theImage.getData();
    wr.setPixels(0, 0, SIZE_X/2, SIZE_Y, mag);
    		
    File outputfile = new File("C:\\Sviluppo\\workspace\\Java\\SAR\\Milano.png");
    try {
         ImageIO.write(theImage, "png", outputfile);
    } catch (IOException e) {
    // TODO Auto-generated catch block
         e.printStackTrace();
    }
    The problem is that the image is all black as if the method is not able to interpret the float values ​​and puts everything at zero.

    First of all, do you think the process can be right or is there some logical/theorical error? If it's ok, How can I fix the problem?

    Thank you.

  4. #4
    jim829 is offline Senior Member
    Join Date
    Jan 2013
    Location
    Northern Virginia, United States
    Posts
    3,523
    Rep Power
    5

    Default Re: SAR Image Processing

    Have you tried other Image types? You are using an Alpha capable image type which describes transparency. You may also want to try TYPE_INT_ARGB (which also includes an alpha setting in the high order 8 bits.

    Regards,
    Jim
    The Java™ Tutorial | SSCCE | Java Naming Conventions
    Poor planning our your part does not constitute an emergency on my part.

  5. #5
    davide85 is offline Member
    Join Date
    Mar 2013
    Posts
    3
    Rep Power
    0

    Default Re: SAR Image Processing

    Sorry, I posted the wrong version. In the right version I used

    Java Code:
    BufferedImage theImage = new BufferedImage(SIZE_X/2, SIZE_Y, BufferedImage.TYPE_BYTE_GRAY);
    but it doesn't work.

Similar Threads

  1. image processing
    By rohankapoor in forum New To Java
    Replies: 4
    Last Post: 03-01-2011, 06:35 AM
  2. Image processing
    By ranadav in forum Advanced Java
    Replies: 3
    Last Post: 06-05-2010, 03:22 PM
  3. Image processing
    By syarizma in forum Advanced Java
    Replies: 6
    Last Post: 08-17-2009, 05:15 AM
  4. Image Processing
    By Josh_FL in forum Advanced Java
    Replies: 4
    Last Post: 12-30-2008, 02:45 AM
  5. image processing
    By sathish natrajan in forum Java 2D
    Replies: 2
    Last Post: 11-06-2008, 05:13 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •