pmeerw's blog

Jun 2012

Thu, 28 Jun 2012

JPEGmini -- shrinking JPEG images

Being interested how JPEG mini performs and works, I ran some super-scientific experiments with the Lena image. JPEG mini claim to reduce the size of compressed photos by up to 5x while maintaining the perceptual image quality.

I used IJG's cjpeg program for baseline compression (denoted JPEG) with a given JPEG quality. opt. JPEG refers to the optimized Huffman table option of the cjpeg program, smooth JPEG makes use of the smoothing (factor 30) and optimization of cjpeg.

On to the results: JPEG mini succeeds to reduce the JPEG file size, especially for very high quality factors. The perceptual quality is harder to judge, a significant drop in PSNR can be measured. The scientific aspect is the usage of the Lena image obviously. :-)

posted at: 14:32 | path: /academic | permanent link

Fri, 22 Jun 2012

Linux sensor driver coding

I am figuring out how to interact with these sensors via the Linux industrial I/O framework...

See a breadboard with 3.3V/5V power supply (from USB), a level shifter (1.8V to 3.3V), VCNL4000 proximity/ambient light sensor, battery-buffered RTC clock, ADXL345 accelerometer, ADJD-S311 color light sensor. Everything is hooked up to the beagleboard-xm via the expansion header (GND, I2C SCA & SCL, 1V8).

My full lineup of sensors is here.

posted at: 00:33 | path: /projects | permanent link

Thu, 21 Jun 2012

LI-LBCM1M1 / MT9M112 Linux driver

Hacked a very crude Linux driver for the Leopard Imaging LI-LBCM1M1 camera board with Aptina MT9M112 sensor (1.3 MPixel, 1280x1024).

Driver is based on patches by Laurent Pinchart and Linux 3.5-rc2. I have no clue how this media-controller, v4l2-subdev stuff really works... The host side is a beagleboard XM with an TI OMAP3 processor and a parallel synchronous data interface. The following captures a frame:

media-ctl -r -l '"mt9m112 2-0048":0->"OMAP3 ISP CCDC":0[1], "OMAP3 ISP CCDC":1->"OMAP3 ISP CCDC output":0[1]'
media-ctl -f '"mt9m112 2-0048":0[YUYV2X8 1280x1024], "OMAP3 ISP CCDC":1[YUYV2X8 1280x1024]'
yavta -p -f YUYV -s 1280x1024 -n 4 --capture=50 --skip 49 -F `media-ctl -e "OMAP3 ISP CCDC output"`

Let's see if I manage to clean-up and upstream the code... Oh, a captures frame can be seen here. Looks good :-)

Here is my professional setup:

posted at: 17:31 | path: /programming | permanent link

Converting YUV to RGB with ImageMagick

Note to myself: convert -depth 8 -size 1280x1024 -sampling-factor 4:2:2 yuv:frame.bin -colorspace rgb frame.png

Calls ImageMagick's convert; frame.bin (2621440 Bytes) is in UYVY format, result is a PNG image.

Taken with a Leopard Imaging LI-LBCM1M1 camera board with Aptina MT9M112 sensor (1.3 MPixel, 1280x1024), click to enlarge.

posted at: 17:09 | path: /programming | permanent link

Made with PyBlosxom