Thesis Blog: Improvements on hardware/software for better results

The image seems out of focus because the image itself was taken at lower resolution and then expanded here.
The result exerts the importance of using IR-cut-off filter for better RGB color in images.
Image taken at Relative Exposure Value of -1.0 with the bottom images taken with IR cut-off filter at 650nm.
A. Software

Field testing done on [HERE] showed the need to lower the brightness of the image as day time images were saturated. When the camera resets, the datasheet showed that the Auto-Exposure (AE) bit in the mode register is “1” which means that AE is enabled. However, since the test results showed saturated images, the target brightness settings has to be lowered (On Semi MT9D111 Developer's Guide, 2007, pg.45) in order to obtain clear image. 

The relative Exposure Value (EV) value can be calculated by

ae.Target = new AE target value
reference ae.Target = old AE target value (in this case, the default value)

The datasheet explains that in default, the value is set at 60. When a target value is reduced 10, the relative EV value is -2.6. Details have already been provided [HERE]. Here AB is basically AE.

For outdoor conditions, since the default was 60 and the image was saturated, the had to be chosen between 10 to 60. To reduce the relative EV by -1, the was set at 30 and results are shown below

The bottom images are completely saturated but reducing the EV by -1 provides image.
The image looked like an IR filter was required to remove the background color
B. Hardware

Hardware undergoing space environmental testing at SaTRec, Daejon
Field testing verification showed the need for optics to have an IR cut-off filter. The image sensor, MT9D111, has a quantum efficiency of about 17%~19% at 820nm of the electromagnetic spectrum. Without an IR cut-off filter, the RGB bayer filter of the sensor was allowing light above 600nm, specifically around 820nm where the sensor is sensitive to. 

MT9D111's spectral sensitivity given in quantum efficiency.
 An IR cut-off filter is required to avoid the 820nm sensitive peak
To solve this problem, the optics had to be changed to improve the results. Instead of relying on where previous COTS S-mount lens was purchased, lens from Edmund Optics was selected as the company has a supply base in Korea. The company’s M12X0.5mm S-mount lens was also used in imaging payload system in EstCube1 [Kuuste et al., 2014?].

 Cumulative Result
Comparative image between images without IR filter (top) with IR filter (bot)
Current Issue:

The lens selected is for sensors with maximum sensor format to be 1/3" however, MT9D111 has a sensor size format of 1/3.2". That creates dark round edges towards the sides. This is either known as Lens Shading  or Vignetting. 

There are three ways to resolve this:
1) Use a lens with higher maximum image sensor format
2) Crop image
3) Use image processing

Changing lens and cropping image is out of the window because 1) Edmund does not have a lens that can incorporate bigger lens format at that focal length 2) Cropping image is bad option because the image is already small (QQVGA 160 X 120).

The third option is to use image processing. MT9D111 has a in built Lens Shading removal algorithm. However, looking at the datasheet, the bit that is associated with lens shading is "0" meaning by default, the Lens Shading correction is turned off. 

By default R0x08:1 has value 0x01F8 in hex. In binary that translates as 111111000. As you will notice, bit 2 of LSB has to be changed from "0" to "1" to enable lens shading. That means the binary value should be 111111100 which then translates as 0x01FC. To write this value on the MT9D111's register I use

MT9D111_I2C_Write(0x01, 0x08, 0x01, 0xFC);   //Turn Lens Shading Correction ON

0x01 is the page, 0x08 is the register, 0x01 is the HSB and 0xFC is the LSB.  That way I enable the lens shading. 

Haven't applied it yet, but I know what I have to do and check the results.
Until next time 


Popular Posts