Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Create mask of one column/row

Error- index 0 is out of bounds for axis 0 with size 0 for the code-

mask = np.zeros(2*intH)

mask=img[xs+i: xs+i+3, intY: intY+intH]
pxs=np.size(mask)-cv2.countNonZero(mask[0])

Create mask of one column/row

Error:

Error- index 0 is out of bounds for axis 0 with size 0 for the code-code-

Snippet:

mask = np.zeros(2*intH)

np.zeros(2*intH) mask=img[xs+i: xs+i+3, intY: intY+intH]
pxs=np.size(mask)-cv2.countNonZero(mask[0])

pxs=np.size(mask)-cv2.countNonZero(mask[0])

Create mask of one column/row

Error:

Error- index 0 is out Extract white pixels in image boundary of bounds for axis 0 with size 0 for the code-
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[0])
pxs=np.size(mask)-cv2.countNonZero(mask)

Create mask of one column/row

Error:

Extract white pixels in image boundary of 2*60 . Starting point of rectanglr(xs,intY) height intH width is
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)