At the end of April, someone added QQ asked me if I could do some algorithm based on image skin detection,
The main is to achieve the skin six indicators:
1. Moisture
2. A copy
3. Acne and Acne
4. Pigmentation and color
5. Wrinkles
6. Pores
Hearing these things, I think a little bit, the mind has a point of thinking, and he exchanged a bit, about how
The idea was made clearer, so I first implemented the first version based on the Java language and then changed it to
Android above, found that Android code changes are small, you can run my test program on Android
, but the feeling is very slow, about more than 10 seconds to produce results, sent to the man, he tested a
Under also very depressed, said the speed is too slow, the accuracy rate is not very high, how to do, so I carefully control a bit
And found that when I was implementing in the Java language, the desktop version was the number of each channel that processed RGB pixels based on int
According to, Android above the DVM so play on a bit of card, so I have all changed to each channel based on byte
To implement processing, and then increase the skin detection, so that the non-skin pixels are filtered, and then down-sampled processing the entire
Bitmap data, really fast, as long as three seconds or so can produce results, even I feel
You are a big God, and then you want to put Android face detection Plus to realize the chunking detection, so
Can better detect facial wrinkles type, after a variety of pits, Android face detection
API I learned to use, but found that speed does not give force, plus to be equal to the trap. And then I put
Abandoned. After a variety of debugging, others help to add the camera function, so that the implementation of the shooting
According to the direct detection of the results, so the second problem arises, often appear app Flash, I cry, after
After a test, I found that the low resolution will only appear when the flash back, and then I understand the problem in my
Low resolution to reduce the sampling, has exceeded the pixel range, I cry! After solving the problem of flash back
Is gone, can finally run normally, can also be tested normally:
Effect screenshot in the test program:
This is the result of the camera test,
Principles are common image processing algorithms, you can say that my blog post has included the application of all
The knowledge of image processing algorithm, just how to ingenious depends on the cognition and understanding of the image processing problem.
Through the development of this algorithm, I first applied the image processing knowledge I learned to practice to solve
Practical problems, but also found that the real image processing problems, not one-step algorithm can be achieved, but a
The comprehensive application of the series image processing algorithm.
Record my first experience in developing an image processing algorithm on Android