Img=cv2. Imread (OS) path) join (path, img))
Img=ndimage. Binary_fill_holes (np) asarray (img). Astype (int)
Cv2. Imwrite ('/home/fill/' + '% supachai panitchpakdi ng % dn, img)
The original image is greyscale

The results from the figure is:

My ideal results is to put the hole filling is good, ask bosses how to solve?
CodePudding user response:
Met the same problem, mainly int and float the output of the scope of the representation of an RGB problem, you can refer to the following posthttps://stackoverflow.com/questions/42044259/getting-black-plots-with-plt-imshow-after-multiplying-image-array-by-a-scalar/42045225#42045225
But I've got the case scope of the effect also is not very good, the reason is not clear, the solution is to greyscale image into 2 d ndarray of TRUE/FALSE, filling and then output