Create mask of one column/row [closed]

asked 2020-06-24 03:21:56 -0600

Malathi_72 gravatar image

updated 2020-06-25 01:34:32 -0600

Error:

Extract white pixels in image boundary of 2*60 . Starting point of rectanglr(xs,intY)

height intH, width is 2 pixels.

Snippet:

mask = np.zeros(2*intH)
mask=img[xs+i: xs+i+3, intY: intY+intH]            
pxs=np.size(mask)-cv2.countNonZero(mask)
edit retag flag offensive reopen merge delete

Closed for the following reason question is not relevant or outdated by sturkmen
close date 2020-11-17 14:16:53.438381

Comments

this neeeds more context. what are xs,intY,intH, etc ?

error says - your mask is empty, so you cannot index it

berak gravatar imageberak ( 2020-06-24 03:43:35 -0600 )edit

it's also not an opencv problem

berak gravatar imageberak ( 2020-06-24 03:44:45 -0600 )edit

The code is used in opencv image based program. Please look into the title also. Basically i want to check if the column of an image is fully white i.e no pixels in grayscale image.

Malathi_72 gravatar imageMalathi_72 ( 2020-06-24 05:10:39 -0600 )edit

again, we cannot help without context, so please ...

berak gravatar imageberak ( 2020-06-24 05:15:45 -0600 )edit