Vous êtes sur la page 1sur 12

Project Report

Black and White Line-Drawing Images

January 18, 2012

Faculty of Engineering and Sustainable Development Department of Industrial Development, IT and Land Management University of G vle

S-801 76 G vle, Sweden Edited by Er Luo, Kehui Ma E-mail: ofk09elo@student.hig.se ofk09kma@student.hig.se

Table of Contents
1. Introduction...3 What is our idea of the project?............................................................3 How does this idea come out?...............................................................3 What is our project about?....................................................................3 What methods we used in our project?..................................................4 What software we used in our project?.................................................4 2. Related work...5 Preparation work5 After work..5 3. Technical Approach/Method..6 Transforms the original picture/photo into gray image..6 Transforms the gray image into black and white line-drawing image...6 Embosses the black and white line-drawing image7 4. Results8 Colorful image8 Black-and-white image...9 5. Discussion.11 Bug...11 Improvement.11 6. Reference..12

1. Introduction What is our idea of the project? Nowadays, the line-drawing image is very popular, it is used for many fields, such as architecture, environment design, photos and so on. Our idea of this project is to transform different kinds of pictures into black-and-white line-drawing images, which look like the

line-drawing pictures as we mentioned above.

How does this idea come out? This idea comes out when we see the function of one of our cameras. In this function, the camera transforms the taken in pictures into black-and-white line-drawing photos, which look quite nice to see. Then we came up with the idea that we might be able to develop the project act just like this function in the camera.

What is our project about? Our project is about trying to transform different 2D pictures/photos into black-and-white line-drawing images. Moreover, in order to make the result images more realistic (make the image looks more like a 3D image), we do some works on the pre-processing images. We use a method that embossed the pre-processed image, which makes the result image looks a little bit better than before.
3

What methods we used in our project? In our project, there are three main methods in this project which are used as we described in the following sentences: a) The method that transforms the original picture/photo into gray image. b) The method that transforms the gray image into black and white line-drawing image. c) The method that embosses the black and white line-drawing image.

What software we used in our project? We use the rendermonkey in our project.

2. Related work Preparation work: 1. We have searched the projects or work that related to our project over the Internet; 2. We found out all the modules that weve done in the previous labs and arranged them as some of the codes in the modules might do a favor to us;

After work: 1. We have arranged our project, wrote the ppt files according to this project; 2. We have searched from the website to see the format of the scientific article and tried to organize our project report like this format.

3. Technical Approach/Method There are three main steps to achieve our goal: a) The method that transforms the original picture/photo into gray image. In fact the first is quite simple, the only thing we need to do is to get the coordinates of colors of the input pictures/photos, then use the gray value function to reset these colors and set the result color as the output color. The Gray Value Function: GrayValue = 0.3 * R + 0.59 * G + 0.11 *B

b) The method that transforms the gray image into black and white line-drawing image. For this part, we divide the method into two parts that can get the result images we want. 1) Create a function that tries to filter the pre-processed images. We created a 3x3 matrix that used for filter, add the matrix to the pre-processed pictures and then we can get the required images.1 2) We create the edge detection and then apply the filter function in this method. In this edge detection, we use the output of the filter function and get the gray value of the image, if this gray
6

value less than 0, then we multiplies it with -1, otherwise, we use 1 to minus it and then we get the black-and-white line-drawing images.

c) The method that embosses the black and white line-drawing image. In the last method, we just calculated the difference between the current texture coordinate and the upper left texture coordinate and then calculated the gray value of the output difference value, reset this color to the pre-processed images, then the output images will look more three-dimensional.

4. Result For better result, we tried two different pictures, one is colorful and the other one its black-and-white picture. a.) The colorful one 1.The final result images:

2. The images with different methods results:

The left up picture: gray The right up picture: black and white line-drawing The left down picture: final result (with embosses)

b.) The black-and-white one: 1. The final result images:

2. The images with different methods results:

The left up picture: gray The right up picture: black and white line-drawing The left down picture: final result (with embosses)

10

5. Discussion As we find, in this project, we can achieve the final result that we would like to get, but there are still some bugs and improvements in this project: Bug: For both of the pictures, because of the light and the view vectors, it is very hard to find the result image, most of the time, the whole picture is gray or white and we cant see any figures.

Improvement: Comparing with colorful pictures, the embossing of the black-and-white picture is not quite good and need some improvement.

11

6. Reference Thanks to: Panliang Li; E-Mailxheartblue@163.com; Fromhttp://www.hellocpp.net/Articles/Article/662.aspx Some of the codes of this project is from the website: http://blog.csdn.net/kenkao/article/details/6697571

: This filter is a Laplace Filter with a 3x3 matrix. It is [1 1 1, 1 1 1, 1 1 1]/9 and it is used for remove noise and so on in order to help edge detect.

12

Vous aimerez peut-être aussi