Detecting blank images (image expected barcode) in C #

I mainly process open source barcodes. But the tool sometimes does not detect any barcode at all.

So, I want me to make sure that the image is really empty or contains some kind of barcode.

My images are created by scanning, and they contain only the barcode (if they are not empty) and some noise images obtained by scanning. Thus, my problem may even be before checking if the image contains a significant amount of concentrated black pixels to distinguish it from white spaces with noise.

I checked this question, but it was suggested to use the “probabilistic Hugh line transform,” which I found a bit redundant for my situation.

I also checked this one , but it has unsafe code. I am looking for a C # managed solution.

+5
source share
3 answers

The second example you are associated with uses code unsafeonly to speed up access to the pixel values ​​in your bitmap. You can easily replace all this with a method Bitmap GetPixel()(the disadvantage is that it will be very slow, but it will probably be fast enough for your purposes).

unsafe, , . unsafe , ( ) , .

0

# OpenSURF SURF. , ""

0

All Articles