Patrick Bader's Blog a blog about software development

7Sep/102

it’s about time…

I finally finished my Master's Thesis about GPU based image processing in the context of a multi-touch application. As I wrote in older posts I have built a prototype of an LCD based multi-touch screen. The PlayStation Eye camera is used to track blobs and fiducials using IR light and the images from the cam are processed on the GPU to extract positions, IDs, etc. For the implementation which will possibly be published in a later post, I used OpenCL, which allows programming on various heterogenous hardware. The visualization is done using solely OpenGL 3.2 Core Profile.

The thesis in in german and can be downloaded here. Feel free to read and comment it.

19Nov/092

LCD Disassembly

Quite some time passed since my last post. If you were wondering what I was doing in the meantime and why news took so long, read on.

After the successful testing in my last post, I wanted to try the whole thing on with an LCD. The problem with that was how to get one. Luckily my brother has an old Sony SDM-S71R with 17" which is not needed anymore. It's not really big, but for a first test it will do.

Disassembling the whole thing was quite easy, only the first part, getting the plastic casing off, was a bit tricky. If you are unsure how to do it, search online for 'Sony SDM-S71R Service Manual'. After removing some plastic and metal casing two circuit boards will be revealed. Both of them shown below:

Power supply of the Sony LCD

Power supply of the Sony LCD

This one is the power supply for both the electronics controlling the LCD and the four fluorescent tubes for the backlight. Since I do not want to use the original backlight I do not need the high voltage part. That made me look for some alternative to the power supply. The pinout of the connection to the lcd controller is described directly on the board and is shown below:

Wiring of the connector from the LCD power supply to the controller

Wiring of the connector from the LCD power supply to the controller

The purple, grey, white, and black cables on the right need not be connected. So there are only the +12V, +5V, and ground wires left. These voltages are also used in computers, so the choice was easy: I used the power supply of an old PC.

Next is the controller board:

lcd_controller_board

Nothing exciting here aside from the many wires on the right that go to the display itself.

The display consists of the LC layer on top of a glass plate and the backlight with some plastic films between them. Again some pictures of the parts ordered top-down:

LC Layer with controller

LC Layer with controller

Diffuser with some other plastic films on top of a plastic panel and a white paper

Diffuser with some other plastic films on top of a plastic panel and a white paper

Fluorescence tubes that shine from the side into the plastic panel

Fluorescence tubes that shine from the side into the plastic panel

These are the most important parts of the LCD. If you have any questions about the disassembly, just ask.

So much for the LCD disassembly. I've already done some testing with it in combination with a self-made backlight, some IR LEDs, and a bandpass filter for the camera. But this will be the topic of the next post,...

3Nov/091

Blob Detection Reloaded

Today, I finally got the 50 Osram SFH 4350 LEDs I ordered. These shine at 850 nm, a wavelength at which the PS3 Eye is quite sensitive. The first thing to do with these LEDs was to test them somehow. Since I haven't got an IR bandpass filter for the cam (I ordered one from ebay), I had to test them without the filter.

So how did I run the test? A few days ago I ordered a sample of some Plexiglass EndLighten, which is available here. It's a special glass that shines diffuse when light shines from the side into the sheet. The final setup was simple: I connected 8 LEDs in row with a 1 ohm resistor and powered the setting with 12 Volts, the LEDs were attached to the Plexiglass and and everything was filmed with the cam.

A Screenshot with blobs detected on my hands is below, the other blobs in the surface come from a screw clamp.

blob_detection_hand

stay tune for some more news in the near future 😉

19Oct/090

Upgrading PS3 Eye Camera and Blob Detection

As noted in my last posting, the images of the modified Eye camera were quite blurry. That was the case because the IR filter was missing and so the camera got out of focus. I was asking myself for the reason, since the filter is not a lense at all. Glass has a different refraction index than air resulting in diagonal rays becoming offset. I tried to visualize the effect in the following picture:

Camera_offset

More on that can be found on wikipedia.

I have finally managed to correct this issue. I had to find a replacement for the filter. It had to be of glass or a similar material with the same width as the filter. Quite tough to find a piece of glass or plastic with a depth of about a millimeter. Suprisingly the cap of a CD case did the job as a filter replacement. I first sawed a piece off and afterwards filed it into shape.

The room was quite dark but the results are  better than without the replacement, I think:

PS3 Eye Capture with IR filter replacement

PS3 Eye Capture with IR filter replacement

Now the second part of this posting, blob detection. Blob detection is about finding bright or dark spots in an image. I used some kind of global flood fill algorithm to find the blobs. Sadly I was not able to programm this part in the pixel shader so I implemented an algorithm on the CPU. On my laptop CPU power is fairly restricted so it took me a few attempts to do blob detection at 60 fps. The algorithm is a scanline algorithm which searches for horizontal lines of bright pixels. After the complete image has been scanned, one or more connected lines become a blob. The blob center is the barycenter of the pixels, at the moment without regard of their brightness. I have to test this algorithm for robustness, but can already give you a first impression:

A first test of blob detection. The red dots are centers of detected blobs.

A first test of blob detection. The red dots are centers of detected blobs.

Hope I could help anyone with the camera focus problem. Maybe I release the source code of the project when it is out of experimental stage, or to say it straight: When it's a bit less messy. 😉

Tagged as: No Comments