Allignment of Image Projection

Final project by

Gidon Levy & Dudu Ben-Ari

gidon@cs.bgu.ac.il

benarid@cs.bgu.ac.il


Introduction

Our motivation is to try our luck by implementing a prototype for a new technology responsibles for manipulation of a projected image so that it could be projected on non-flat surfaces.

This technology is already tested and implemented in cars and in aero plains with a device called"Hud".

Another picture of HudHud image

Our goals: to implement a computer program which uses callibration images that were taken by a camera that ought to be located within the projector and describes surface's curvature.

With any input image the program will allign the projected image contrary to the surface curvature in order to overcome the surface curvature, and to project it on the as it was projected on a plain surface.

Our general idea is to take two callibration images of the same surface one horizontal and one vertical which provied us an information about how original straight lines projected on a non-flat surface, and turns it into curves indicate us about it's derivation from original curve/respecting lines.

Then we analize the horizontal and the vertical movments for each pixel seperately by comparing it's to the original placement related to the original line of the projected horizontal and vertical image, and his new values will be the horizontal and vertical contrary deviation value (= -2*deviation) when projecting image with that pixel.

All the values of the pixel would be saved in a matrix that will be used every time a the user will desire to project an image on the same scanned non-flat surface.

The matrix is calculated only once and saved on the disk and the user can project any picture he wants on that surface any time he wants.

Approach and Method

Describe here how you addressed the problem, what observations or ideas you employed, what computational tools you used, etc... It it could simplify the presentation, go ahead and use several subsections here, or split this section into several sections.

We addressed the problem as an allignment algorithms that will be derive from our real simulative experiment and consequences.

Our observations of how solving the problem was simply go to real projector and try to simulate a situation that there is a camera located within the projector by standing on a table and taking some pictures of some projected images
We had basic ideas about how to implement it but we wanted to stay consistent with the real situation and to estimate the whole technical means will have to use in order to cope with our problem

We created those images by the standard windows paint application, by simply drawing one picture of horizontal parallel black lines and one picture of vertical lines.
We than took the pictures as we projected those horizontal and vertical pictures of lines on the projection screen while we were twisting and distorting it.
We used matlab for implementing our picture sampling and our allignment algorithm.

After some bad experiment with those images color manipulation ,we have decided to go on black and white lines strip images to scan because it is easier to get cirves with an edge detetor.

you can see the examples of the images here.

horizontalvertical

Then according to our class we used an edge aggregation method from class called "Edge tracing and ordered lists of edges" as you can see in the imported slide:

edge aggregation method

We have improved it in order to deal with lines with width of more than one pixel.

Then we have built an horizontal and vetical matrices with the horizontal and vetica allignments values information on every pixel.

Attached some example of matrices for an 4x4 images. for example: in matrix H (for horizontal) if we look on the value in the cell 0,0 it indicates the pixel in 0,0 to go 1 step down when the image is projected on that surface. and the V matrix (for vertical) sets the same pixel also 1 step to the right. We combine these two orders to project it finely on the surface.

We calculate those matrices on every cell according this formula:

calculation

as you can see in the picture:

deviation image

For every pixel we find the 2 most closest original curves to it, and calculate according to them the deviation of the curves from the origilal lines on the same horizontal point coordinate.

Then the value that wiil be assign in the matrix will be 2 * a weighted average of dev1 and dev2 according to the distance of the pixel to the origilar lines giving the curve with the distace d2 a bigger weight to the calculation because it is closer to the pixel and as a result affect it more than the othe curve with a distance of d1 from the pixel.

After a picture is prepared according to the matrices there are some black pixels who are not being filled by the algorithm.

We use som information recall algorithm that to every pixel without data of the matrix we will give its average intencity value of his neighbours.

Results

By running the algorithm on this picture:

input picture

with the caibration vertical and horizontal lines:

horizontal callibrationvertical callibration

we get the alligned picture to project:

output image

Conclusions

We have learne ho to use in diffrent algorithms of the course like edge detection and edge aggregation methods.

The project describes a prototype of this technology's application, and could be implemented in several different ways and be improved with many cinds of optimizations to the algorithms.

With the help of hysteresis we could overcome on the black pixel problem more properly.

There is a chance that some methods of shape from shading analysis could be implemented too.

We havent checked it properly on the projector after we have implemented it, but it seems it does perform some descent work on the pictures.

Additional Information

References

The refereces was mainly from our original ideas..

It could be appropriate to note the we have used the ideas of the lectures from class about the Edge Aggregation and the Edge Detection.