carsearch.py
def update_image_analyser(self, img, window):
        """Update the image frames with the supplied image."""
        if self.image_analyser is None:
            raise ValueError('No image analyser object exists.')
        else:
            area_of_interest = self.search_areas[window['search_area']]
            area_of_interest = self.convert_to_px(area_of_interest)
            img_new = self.get_area_of_interest(img, area_of_interest)
            window_size = window['size'][0] * self.pix_in_cell
            scale_factor = self.training_res / window_size
            new_size = (int(img_new.shape[1] * scale_factor),
                        int(img_new.shape[0] * scale_factor))
            img = cv2.resize(img_new, new_size)

            return self.image_analyser(img)
Update the image frames with the supplied image.
Update the image frames with the supplied image.
Update the image frames with the supplied image .
def update_image_analyser(self, img, window):
        if self.image_analyser is None:
            raise ValueError('No image analyser object exists.')
        else:
            area_of_interest = self.search_areas[window['search_area']]
            area_of_interest = self.convert_to_px(area_of_interest)
            img_new = self.get_area_of_interest(img, area_of_interest)
            window_size = window['size'][0] * self.pix_in_cell
            scale_factor = self.training_res / window_size
            new_size = (int(img_new.shape[1] * scale_factor),
                        int(img_new.shape[0] * scale_factor))
            img = cv2.resize(img_new, new_size)
            return self.image_analyser(img)
def update_image_analyser ( self , img , window ) : if self . image_analyser is None : raise ValueError ( 'No image analyser object exists.' ) else : area_of_interest = self . search_areas [ window [ 'search_area' ] ] area_of_interest = self . convert_to_px ( area_of_interest ) img_new = self . get_area_of_interest ( img , area_of_interest ) window_size = window [ 'size' ] [ 0 ] * self . pix_in_cell scale_factor = self . training_res / window_size new_size = ( int ( img_new . shape [ 1 ] * scale_factor ) , int ( img_new . shape [ 0 ] * scale_factor ) ) img = cv2 . resize ( img_new , new_size ) return self . image_analyser ( img )
Update the image frames with the supplied image.
Update the image frames with the supplied image .
"""Update the image frames with the supplied image."""
self
img
window