Archive for the ‘PhD study’ Category

Days of PhD (9)

Thursday, March 7th, 2013

Yes I changed my style back in this post. Hope you will like it:)DOP_9


Extracting the background and moving targets from a live video

Tuesday, November 27th, 2012

Recently I had been dealing with bugs and cells. I was trying to locate the moving cells Euglena with a camera. The Euglena is a single cell that belongs both to the plans and the animals. A picture of the Euglena is shown below. The length of a single Euglena is about 50 um.

The illumination was not good due to my poor optical setup. I tried to identify the cells according to its intensity and size but neither worked well. The strategy I took at last was extracting the stable background and then compare it with the live video, so that the moving targets can be identified. The way of generating the background is averaging all the grabbed images (or, video as we call them). The changing bits are then smoothed by the number of the frames.

When averaging the images, we assume the mean of N framesimages is A_n and the (N+1)th frame is I_(n+1). Both variables are 2D arrays. Then the mean of (N+1) frames is
A_n+1 = (N * A_n + I_(n+1))/(n+1)

The code is shown below (with re-calculate/ clear function):

This SubVI can be called without external shift registers.  This simple function allows us to extract the still background from the video. And thus the moving (or any changing) targets can be extracted no matter how messy the background is. The result is shown in the video below:

As I said in the description of the video, “This demo shows using an algorithm tracing an Euglena in the dish with poor (non-uniform) illumination. The mid-left and mid-right videos are raw videos from the camera. The bottom-left video is the background generated from the video in real-time. The bottom-right video is the target (Euglena) extracted from the video. The top-left video is the coords of the Euglena.” We can see that the Euglena were identified from the video even the illumination is non-uniform and the background is a bit messy.

Days of PhD (6), (7) and (8)

Thursday, October 11th, 2012


Here are the comics of ‘Days of PhD’ 6, 7 and 8. The character was changed, abstract and chatty.

Hope you will like it. The author signature @科学玩家 was my ID on and now changed to @vanja .

Days of PhD (5)

Monday, April 11th, 2011

Sorry for the late post. So I have been writing thesis these days (fingers crossed) and did draw some more comics just did upload them. Now here is one of them. Hope you’ll like it.

P.S. I found that there is a lot of potential work for my academic writing. Talk is totally another issue. Good luck to me.

Days of PhD (4)

Monday, November 15th, 2010

Entering into November, I’ll begin my final year of PhD study. There are still (and always) so many things to do. Experiments, measurements, data, figures and writings. Well, this is the realworld. Sorry for not updating the posts for quite a while, since I was back to China and spent the time with friends and family.

Anyway, this is a newer comic. Hope you’ll like it:)

Days of PhD (3)

Thursday, September 16th, 2010

It’s not cool keep updating the blog with comics. Yet there is not much progress these days on LabVIEW. I integrated (or, glue 2 programs together) the spatial light modulator with the camera and will synchronize them later. Some algrithm might be adapted between the devices to let the camera control the SLM or the other way round. I’ve been thinking about an applicaiton for this close loop system, fingers crossed.

And here is the 3rd comic of <<Days of PhD>>. Please note the ‘alt-tab’ short-cut key in this comic. I found this one less funny after I finished it, but it is what it is. Hope you’ll like it. 🙂

Days of PhD (2)

Thursday, September 9th, 2010

So this is the 2nd picture I drew for <<Days of PhD>>. Hope you’ll like it. The ID is the one I use for Chinese micro blog. @科学玩家

It’s tough when some one tells the English joke. You have to smile even you didn’t get it.

Days of PhD (1)

Monday, August 30th, 2010

I tried to draw some comics about the study and life of PhDs. Hope you’ll like it. This is the 1st post.

Lab progress and recent news

Monday, August 9th, 2010

First of all, there are two news from the lab:
I (finally) managed to drive the Spatial Light Modulator (SLM) directly with LabVIEW FPGA. The coding was not really a challendge, for I already implemented it with DAQmx module. And I just transfered the digital output bits to FPGA. The wiring and debugging were the pains in the ass. After I did that, the work is done. So now we can send whatever images to the SLM chip via the computer without interruption, and the delay is minor.
An SLM chip was damaged. I didn’t figure out the reason yet. Since the chip was taken out and left for weeks, the static may damage it. We had been sending +5V TTL to the pinouts of the chip instead of the recommended +3.3V, which might cause problems. And there is a chance we just powered on and off the device too frequently. The SLM is a liquid crystal one. You can consider it as a 2D array of tiny mirrors. We need to keep its DC balance by sending positive and negative images for the same period. Thus a plan is to create a state machine for the SLM. When we are not using it, leave the state idle, in which state the FPGA sends ‘black image’ commands to the SLM continuously.

Following are 2 huge news I heard recently from internet.
1. Artificial life forms evolve basic intelligence Wow, so we can be the god of the computer world now? I believe there is a way we can simulate the human memory, but the intelligence and the evolution? I would like to digg in.
2. Claimed Proof That P != NP I don’t think I’m smart and patient enough to read through the 100-page paper. Actually this paper has not been peer-reviewed yet. So feel free to challenge it. But I’m shocked by the conclusion anyway. Sorry, but “!=” means “not equal to” here. That’s not a surprise now. But still, i don’t know if it is true.

Open souce camera (1)

Tuesday, August 3rd, 2010

This idea just came up to my mind some days ago. The thinking was straightforward. I’m buiding cameras for my PhD project and I love (although I really have no idea about it) open source. I googled this term and found a blog of it. Also, a news was released last September telling us there are some people who already developed this stuff.
Well, I’m glad to see it. At least it appoves that this is not a stupid idea, and someone (in U of Stanford!) considers it serious. But the ‘Frankencamera’ is not so cool as I expected. A demo was given showing it can do auto-chop-and-paste thing, or “Photoshop on the camera”. I hardly found it impressive. I’m not saying it’s a dull camera but I don’t want to programme a camera just to do stuffs I can do off-line.
(Sorry if the order is messy. I’m trying to organize my thought.) So in my opinion, the camera I want to develop is a kind of study camera. It’s not advanced and it’s not expensive. The specification might be:
CMOS sensor, 1024*768 pixels, 8~10 bits, C-mount, USB/firewire interface, size less than 10*5*5 cm, with the price less than 100 pounds.
The potential users are teachers, students and fans who want to try their ideas (algorithm) before they buy the expensive instruments. The flexible parts is you can programme to change the exposure time, frame rate, regions of interest, binding pixels or not, gain, or even determine which regions to look at on the fly(which is implemented in my project:)). Assume the way you are looking for your girl friend in the crowd. You keep your eyes focus on the special target, and all the rest people are blur to you. You can use the camera that way to save the bandwidth and the storage space.

That’s about for this post. I’ll carry on talking about what I found existed on open source cameras and the feedbacks I got from my friends and my supervisor.
I would like to thank Otis and Todd for their kind help and comments. Glad to hear from US:).