Image Mosaic
 

|HOME | BACK|

An image is in fact a matrix with known coordinates of the lower left and upper right point.  Once a raw image, a matrix, is rectified, it becomes an image, because its spatial location on the earth is known.  

Please also be advised that any matrix can be an image as long as the two coordinates of corner points are specified.  They may not necessarily relate to a real ground coordinate system.

Noobeed can read binary image, TIF format, and BMP format.  For example:

                  ->A = Image_uch()

                  ->A.loadtif("scene1")

Once an image is loaded, you can examine any pixel in the image, for example

                  ->print A(0,0)           

                  255

This is the value of the first row and the first column of the image.  You can alter the pixel value of any pixel right in front of your eye, for example.

                  ->A(0,0) = 50

Now the very same pixel has a value of 50.  Not many numbers of software provide this kind of primitive, but essential, operation like this.  To save an image, Noobeed can write a binary, TIF and BMP format.  For example

                  ->A.savebmp("scene2")

Also, Noobeed has its own format, just type

                  ->A.save("scene2")

Noobeed will write two file, one is "scene2.raw", the raw binary data file, and "scene2.txt", the associated document file.  The beauty of the document file is that it is an ASCII file, and the user can view it and modify information on it, e.g. change coordinates of corner points, ellipsoid parameters etc.

Null data

An image can have a null data in it, and most of the times, null data are background.  It happens so since an image, once rectified, will not always completely align in a rectangle area.  The following is an image which has a null data of 255.  The original image is a rectified photo, with a size of 3084 x 3162 pixel.

 

     
   
     

Now what is the mean of brightness value the image, without taking into consideration the null data, here 255, the mean would be 183.  However, if null data are taken care of, the mean value is 145.  Here is how Noodbeed handles the null data.

                  ->A = Image_uch()

                  ->A.load(“83403_ortho”)

                  ->A.flag_null()

                  1

                  ->A.mean()

                  183.29

                  -> A.flag_null() = 0

                  ->A.mean()

                  144.93

You can change the value of null data and turn on and off the flag at your will.

The concept of null data is used in several other function, for example in image overlaying.  Here there are two rectified images, and they are supposed to overlay on top of each other, according to it geo-reference coordinates of course.

                  ->A = Image_uch()

                  ->A.load(“83403_ortho”)

                  ->B = Image_uch()

                  ->B.load(“84403_ortho”)

                  ->C = A.union(B)      

This gives a blank image big enough to cover A and B.  Now we want to overlay image A and B on the blank image C. 

                  ->C = C.overlay(A)

                  ->C = C.overlay(B)

Since A and B have their flag null turn on, the result C is fine and look like this.

 

     
   
     

 

However, without the null data concept, which we can try by turning off the flag null of A and B, by statements A.flag_null() = 0 and B.flag_null() = 0, the result will be like this.

 

     
   
     

 

Feathering

Feathering is to blend two images so that the edge lines of the two images are not shown up strongly.  It is utillized a lot in mosaic making in which a number of rectified image are overlaid on top of each other.  Suppose that the two rectified images are to make a mosaic, and we are not happy with the result from a simple overlay.  Here is the way to use "feathering".

                  ->A = Image_uch()

                  ->A.load(“83403_ortho”)

                  ->B = Image_uch()

                  ->B.load(“84403_ortho”)

                  ->C = A.feather(B, 200)

As you can see, to make a mosaic is just one statement away.  The value 200 of the second argument is the desired resolution of the result image.  It comes from the resolution of the original rectified image, 200 meters.  For more detail of the function, see the function section.  Here is the result.

 

     
   
     

 


|HOME | BACK|