Monday, September 15, 2014

Galaxy Note 2 Screen Replacement

My Samsung Galaxy note 2 screen was broken and I need to change it. The screen is still working and only the glass was broken. Thiri helped me to order the replacement screen online and it cost around 15 SGD. After taking out the back cover, battery, SIM card, memory card, and stylus, the 11 screws as shown in the following figure was removed.

Friday, August 22, 2014

Batch Processing of Images in GIMP

To perform batch processing of images in GIMP, you can get a plug-in called David's Batch Processor at the link - Extract the dbp.exe file and put it at C:\Program Files\GIMP 2\lib\gimp\2.0\plug-ins. Then, open GIMP and click Filters menu -> Batch Process... command. A pop-up windows - David's Batch Processor will appear as shown in the following figure and you can do the batch processing that you want.

Saturday, August 16, 2014

Selective Color Modification

I wanted to change the blue color of the road in the following picture to a green color. I wrote a MatLab program and run it in Octave. Although I can simply use rgb color model to swap blue and green, I feel like it is too specific. That is why, I used hsv color model to change a hue of a color in a more flexible manner.

Thursday, March 6, 2014

Reading Rotary Encoder Using Microcontroller

Rotary encoders are commonly used for measuring angular position or motion sensing. An optical encoder has a disc with a pattern of cutouts. As the disc rotated, an LED light that shines on photo detector is turned on and off accordingly to produce a digital waveform.

An optical encoder produced by VEX Robotics Design System

Gray code is normally used in encoders instead of ordinary binary code to prevent glitches. In Gray code, the number of changing bits between successive numbers is only 1. The following table shows 2 bit Gray code from 0 to 3.