I have not analysed any S1 IW SLC tiff measurement that didn’t have the actual pixel data immediately after the tiff header in one single block, ie all the images I have looked at (not many) had the following structure: tiff header, followed by the whole pixel data in one single block, followed by the tiff tags. This structure is easily read in binary format (fread in Matlab) and then interpreted following the instructions in Section 6.2.1 of ‘Sentinel-1 Product Specification’ document (and tiff references cited in it).
A couple of caveats:
I believe the tiff standard allows for flexible file structures in which the image data can be placed anywhere (ie it has to go behind the header, but not necessarily immediately behind it). Hopefully the S1 tiff writer will not change in the future
the header has different size depending on whether it is a normal Tiff or BigTiff. There is a field in the header that indicates which type of Tiff the file is
I am sorry that I tried your approach, but it did not work. In Matlab, the error information says that the input’s type is char which is not supported by multibandread() function. How can I fix this?
Hi Nuno Miranda! I tried to read geotiff S1 with IDL and I obtained an array of integers. I dont understand how I could separate i/q to reconstruct a complex float array if the data array dimesions are the same. Thak’s
Sebastian
There is a tutorial on SAR EDU for DEM generation of SLC SAR data with matlab.
I don’t know if it helps your question but at least there is also data imported. https://saredu.dlr.de/unit/dem_matlab
@sbstbalbarani
the approach below might not be the most efficient/elegant one but it allows to use IDL geotiff reader
maskI=ulong('11111111111111110000000000000000'b)
maskQ=ulong('00000000000000001111111111111111'b)
r = query_tiff(path_to_S1_geotiff, tiffInfo, geotiff=tiffHead)
;sub_rect is used to read just a portion of the data
block = read_tiff(path_to_S1_geotiff, sub_rect=sub_rect)
; if the image is SLC then we need to create complex buffer
if (tiffinfo.pixel_Type eq 13) then begin
blockI = fix(block and maskQ)
blockQ = fix(ishft( (block and maskI), -16))
block = complex(blockI, blockQ)
endif
Thanks nuno! I tried to read sentinel-1 geotiff located in measurement directory of SAFE structure with IDL language, but I couldnt. In your code r = query_tiff(… does not recognize the tiff. It is correct? sbst
I implemented the following example using matlab and it worked very nice, but how we could change the parameters of ENVISAT or ERS to the Sentinel-1 specially the burst issues?, SAR-EDU_Tutorial_Focusing_Matlab.pdf (626.0 KB)
Hi every body
I have a question
I make a DEM and now, I want to know how i can bring DEM information into matlab?
I want it was like a picture and have elevation value in each pixel!
and another question what is the best way for reading the slc image in matlab?
I create ENVI export from my DEM and load hdr file in matlab and read it
but there are some mistake in my read matrix !
when I do terrain correction on my DEM , it is not a complete square image and have black area in border
when I read it in matlab these area have negative values!!
I don’t know how to correct them!
black borders could occur when the DEM used for terrain correction doesn’t fully cover the whole product.
Later on, have a look at the nodata value under the raster’s properties.
I can’t get what you mean!Can you explain more?!Tank you
From: Andreas BraunSent: Monday, December 5, 2016 17:43To: ftp.tarighat@gmail.comReply To: STEP ForumSubject: [step] [s1tbx] Read IW SLC files into Matlab?
December 5I create ENVI export from my DEM and load hdr file in matlab and read it but there are some mistake in my read matrix ! when I do terrain correction on my DEM , it is not a complete square image and have black area in border when I read it in matlab these area have negative values!! I don’t know ho…
When I export the DEM in ENVI this problem appears againFrom: Andreas BraunSent: Monday, December 5, 2016 23:36To: ftp.tarighat@gmail.comReply To: STEP ForumSubject: [step] [s1tbx] Read IW SLC files into Matlab?
Hi Luke, I tried your approach and worked, I read the SLC image on Matlab. However what I am interested in is to get the IQ data and the matrix data doesn’t seem to have any complex numbers. I am interested in working with the raw data.
Can you advise me how to do that?