How to avoid problems with lighting for an image processing project?

5 views (last 30 days)
I've been working on a project to code a system that recognizes playing cards from a 52 card deck, and provide the user with their odds of winning a texas holdem hand based on the two cards they've been dealt. I've gotten it to work, but the main problem I'm having is that the lighting conditions have to be near perfect for it to work accurately. I've really just started learning Matlab a couple months ago, so I'm going to post my entire code, and if anyone could offer any advice to make improvements I would appreciate it very much. The code is rather long, but it is mostly repetitive, performing the same calculation for each card. Like I said the main problem I'm having is with the lighting, but other suggestions are welcome as well. Thank you

Answers (1)

Image Analyst
Image Analyst on 7 Nov 2015
You forgot to post any image, so I can't diagnose how to fix your image. In general, have lots of light, make sure you have the same Lux level for every image, use broad illumination (not a point source), use a high F/stop (to get a deep field of view), use crossed polarizers (to get rid of specular reflections), and have the optic axis be perpendicular to your card. Also take a "blank shot" so that you can do a background division to get rid of lens shading or lighting non-uniformities.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!