Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Setting pixel values behaves differently on different machines.

I wanted to get left half, right half of image with original size. I used the code below. It works in some machine. In other the full image is cleared.

>  h, w =drimg.shape
>         limg=drimg[0:h, 0:w]
>         rimg=drimg[0:h, 0:w]
>         for j in range(h):
>             for i in range(int(w/2),w):       
>                 limg[j][i]=255
>         for j in range(h):
>             for i in range(0,int(w/2)):