1. Member
Join Date
Mar 2013
Posts
3
Rep Power
0

## 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.

3. Member
Join Date
Mar 2013
Posts
3
Rep Power
0

## 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. Senior Member
Join Date
Jan 2013
Location
Northern Virginia, United States
Posts
5,655
Rep Power
9

## 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

5. Member
Join Date
Mar 2013
Posts
3
Rep Power
0

## 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.

#### Posting Permissions

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