bastianraschke / pyfingerprint

Python library for ZhianTec fingerprint sensors (e.g. ZFM-20, ZFM-60)
Other
190 stars 115 forks source link

Imagedownloader problem? #110

Open KevyVo opened 4 years ago

KevyVo commented 4 years ago

Hey, my name is Kevin and I would really appreciate any sort of idea and help. I am developing an AWS fingerprint broker using this library for the scanner. I have encountered a problem that is blocking me from developing more code. This is how my logic flows. 1) Check the status of the door (open/close using reed switch) 2) initialize the reader

  1. Wait for fingerprint, using a PIR sensor to detect motion 4) Take in the print using(readImage()) 5) convertImage() 6) Check if match then allow access() b) If not match then download the fingerprint (2-3 second of wait), then in the future upload to AWS to send the user an alert with the fail fingerprint image image

Problem:

1) If I call the downloadImage() before convertImage() it works but it takes so long to move onto the rest of the script and the user is just waiting for validation. (wait for about 2-3 seconds, to long) image

2) If I follow the step exactly above then the image becomes a black screen like this, I believe it because then imagebuffer was converted to a charbuffer so the image data got erase/converted. image Sorry I markup my print cause you for privacy reasons.

3) I tried making two objects but it still just gave a black screen. image image

Please any help or advice would be really appreciated, I have been stuck on this for weeks. Thank You!