Beispiel #1
0
    def drawBoxImg(self,pos1,pos2,img):
        # This is the newPos; It should map to a peak
        if len(img.shape)==2: # This is grayscale;
            cimg = colorImage(img,color='gray')
        else: cimg = img

        y1,x1 = pos1
        y2,x2 = pos2
        
        cv2.rectangle(cimg,(x1-3,y1-3),(x1+3,y1+3),color=( 255,0,0),thickness=1)
        cv2.rectangle(cimg,(x2-3,y2-3),(x2+3,y2+3),color=( 0,255,0),thickness=1)
        return cimg
Beispiel #2
0
    def drawBoxImg(self, pos1, pos2, img):
        # This is the newPos; It should map to a peak
        if len(img.shape) == 2:  # This is grayscale;
            cimg = colorImage(img, color='gray')
        else:
            cimg = img

        y1, x1 = pos1
        y2, x2 = pos2

        cv2.rectangle(cimg, (x1 - 3, y1 - 3), (x1 + 3, y1 + 3),
                      color=(255, 0, 0),
                      thickness=1)
        cv2.rectangle(cimg, (x2 - 3, y2 - 3), (x2 + 3, y2 + 3),
                      color=(0, 255, 0),
                      thickness=1)
        return cimg
Beispiel #3
0
 def colorMapImage(self, color='gist_heat', stretch=True):
     self.orig_cmap = colorImage(self.orig, color=color, stretch=stretch)
     return self.orig_cmap
Beispiel #4
0
 def colorMapImage(self,color='gist_heat',stretch=True):
     self.orig_cmap = colorImage(self.orig,color=color,stretch=stretch)
     return self.orig_cmap