Binarizing using AdaptiveThreshold turens black image to white

asked 2018-11-14 09:17:19 -0600

Janrex gravatar image

I use this line of code for binarizing images:

Imgproc.adaptiveThreshold(grayMat,imageBW,255,Imgproc.ADAPTIVE_THRESH_MEAN_C,Imgproc.THRESH_BINARY,5,4);

I tested it using this image. and the result is this image

edit retag flag offensive close merge delete

Comments

Yes and what's problem?

LBerger gravatar imageLBerger ( 2018-11-14 09:53:50 -0600 )edit

the black part should be retained right? But in this case only the line that seperates the black and white remains black

Janrex gravatar imageJanrex ( 2018-11-15 07:05:48 -0600 )edit