티스토리 뷰

반응형

Here is the status what's going on my home security project. Let's see the previous articles before starting today's article. Motion sensor, web cam and face api were completed in this article(http://hero-space.tistory.com/42). But I was thinking How to use at night because, the solution will be installed outside at my house and will detect strangers in order to keep my house. There are a few way to tackle the case. Absolutely Light doesn't enough to capture the image at night. If you turn on the light like normal LED. A stranger will recognize the solution and try to avoid the system. So I was finding the way not to find the solution at night and properly capture. Motion capture that I used in this solution is working based on IR(Infrared) which is not able to see the light how to work in human eyes. 

# Spectrum

Only people can see visible spectrum area but IR is outside from visible spectrum. If I set up the IR LED around web cam and turn on, It can be detected at night properly. Once I expect I can capture and compare the image to find out faces in the photo. I selected IR LED like the below.

5 pie and 940nm IR LED and we can't see the light even though the LED is on. and it requires voltage from 1.9v ~ 2.1v and 20 mA(0.02A) to work properly. Each RaspberryPI pin is able to take 3.3 v so I should connect 160ohm register to get 2v for each IR LED. I decided to make a board easy to connect between RaspberryPI and IR LED. 

The pictures are not completed to work out but it will be able to connect from raspberryPI. Let's see the photos how it works according light sensor. Around Web cam, IR LEDs will be turned on to capture the image, Once I would like say, It will not be seen, Only camera will see the IR Light. I take a photo using my mobile phone. 

However I am not sure, the brightness is enough to capture the images promptly. No way to prove, once I need to capture the image after turn off all the light at my room. But web cam was not able to detect the IR LED well. I was a doubt why it was not working not like mobile camera.(The photo was captured by my mobile camera). I googled the web sites to find out root cause and realized web cam has IR cur filter not to be interrupted. I followed the steps to remove IR filter inside of web camera. Refer to the site(http://www.instructables.com/id/Remove-IR-filter-From-Microsofts-HD-3000-Webcam/). I was possible to remove IR filter inside of my web camera.

Here is what is the IR cut filter and I need to break down with sharp stuff.

Once again, I have tested it with web camera(without IR cut filter) and see how is the percentage of matched. Here is the photo If I take a photo in front of IR LED. Approximately I was away from the web camera around 1 meter.

Let's check face detection from MS cognitive site.

Detected my face properly, and I have tested in my security solution. There is 2 type of scenario. One is normal the other is the IR LED on.

In case of normal, my face was detected and showed 88.14362 %. I called the API when I compare the captured image.

ar result = await faceServiceClient.FindSimilarAsync(id, _facesId, FindSimilarMatchMode.matchPerson

I guess I need to check if I set the parameter 'matchFace' instead of matchPerson.

In case of night, matched percents was decreased around 10~15 %. But It judged the person was the same person in the user list because I set the threshold like 70 percents. The next time I have to fix up the hardware and test more in order to work well. I will continue the project with un-finished parts.

반응형
댓글