Skip to content

This is a photo filter and Pixel Art algoritm that using Opencv. It has 6 colors Every pixel in a photo turns the nearest color in one of 6 colors.

Notifications You must be signed in to change notification settings

znkldk/Photo-Filter-And-Pixel-Art

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Photo-Filter-And-Pixel-Art

This is a photo filter and Pixel Art algoritm that using Opencv.

It has 6 colors; Yellow, White, Black, Red, Green, Blue Every pixel in a photo turns the nearest color in one of 6 colors. And the result;

output-onlinepngtools (1) output-onlinepngtools

In this example some places are painted wrong color and I love it :) I think it makes result better.

I must confess the hardest part in this project is choosing the similar color. First I tried to RGB numbers. I had the pixel RGB numbers from photo and 6 main color numbers then I found the nearest main color number to my pixel RGB numbers and it was not the correct color. Color's word was more crazy then I though. In my first try RGB numbers were the similest but colors almost opposite. I though how can I fix this problem and I found a solution. It is not the best but It works.

*Choose the nearest color problem;

In this projeckt we have 6 colors. Lets talk abouth green and black.

Green's number is 0,255,0
Black's number is 0,0,0
and we have 0,100,0 to compare. This color number is near to black but color is not. If you search this color (0,100,0) it is absolutly near green. The reason of this problem is rgb system colors doesnt settle equaly. For example in rgb system red has 10 number yellow has 5 numbers. Footprints are not equal.

*How to solve this problem;

I Just added more reference colors :) if we use more referans colors for black and green the distinction between the two becomes clearer. The result becomes more errorless

output-onlinepngtools (4)

About

This is a photo filter and Pixel Art algoritm that using Opencv. It has 6 colors Every pixel in a photo turns the nearest color in one of 6 colors.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages