GemHunt / CoinSorter

Sorts coins by solenoid on a conveyor by classifying images with Caffe & DIGETS
MIT License
46 stars 2 forks source link

Add automatic camera calibration & motion skew function #9

Closed pkrush closed 6 years ago

pkrush commented 9 years ago

100085

The current script is not set up to handle different cameras, lenses, belt speeds, or even camera positions.

It would be nice to have a way to automatically get images of round coins.

The neural network has no issues with deformed looking coins, but round coins are nice for human viewing.

Round coins might (I don’t know) be needed for determining rotation.

I tried, but the MATLAB camera calibration does not account for the skew that is created because the belt is moving and the camera sensor is only sampling one line of the image at a time. The image is sharp, but a round coin becomes more oval the fast the belt is moving.


I am thinking one easy way to do this is determine the corners on a checker board covering most of the viewing area and remapping the image with something like MATLAB's imtransform.

I guess the right way to do it would be deskew, do camera calibration, then adjust the image for homography because the camera will never be square. I am guessing all this is unnecessary if you have a constant viewing plan.

pkrush commented 9 years ago

The image plane or belt speed is not going to change. Therefore I don't think you need to use camera calibration and de-skewing. You just need to read the checkerboard and do a transform to make it correct.

No MATLAB, this needs to be in OpenCV.

Determining rotation does work great with round coins.

pkrush commented 9 years ago

I put in a de-skewing function for the current belt speed, but an automatic calibration function is just not needed for the 2nd Proof of Concept milestone.

pkrush commented 8 years ago

On the hardware side I should try pulsing LED’s: To get motor RPMs. To get belt speed I need to hook up the LEDs anyway.