carsearch.py
def highlight_windows(self, img, search_results, color='yellow'):
        """Draws a rectangle around windows in the search result."""
        annotated_img = np.copy(img)
        for result in search_results:
            window = self.search_windows[result['window']]
            window_dimensions = self.convert_to_px(window['size'])
            width, height = (window_dimensions[0], window_dimensions[1])
            left, top = result['position']
            window_area = [(left, top), (left + width,
                                         top + height)]

            annotated_img = quick_rectangle(annotated_img, window_area,
                                            color=color, opacity=0.4,
                                            filled=True, thickness=2)

        return annotated_img
Draws a rectangle around windows in the search result.
Draws a rectangle around windows in the search result.
Draws a rectangle around windows in the search result .
def highlight_windows(self, img, search_results, color='yellow'):
        annotated_img = np.copy(img)
        for result in search_results:
            window = self.search_windows[result['window']]
            window_dimensions = self.convert_to_px(window['size'])
            width, height = (window_dimensions[0], window_dimensions[1])
            left, top = result['position']
            window_area = [(left, top), (left + width,
                                         top + height)]
            annotated_img = quick_rectangle(annotated_img, window_area,
                                            color=color, opacity=0.4,
                                            filled=True, thickness=2)
        return annotated_img
def highlight_windows ( self , img , search_results , color = 'yellow' ) : annotated_img = np . copy ( img ) for result in search_results : window = self . search_windows [ result [ 'window' ] ] window_dimensions = self . convert_to_px ( window [ 'size' ] ) width , height = ( window_dimensions [ 0 ] , window_dimensions [ 1 ] ) left , top = result [ 'position' ] window_area = [ ( left , top ) , ( left + width , top + height ) ] annotated_img = quick_rectangle ( annotated_img , window_area , color = color , opacity = 0.4 , filled = True , thickness = 2 ) return annotated_img
Draws a rectangle around windows in the search result.
Draws a rectangle around windows in the search result .
"""Draws a rectangle around windows in the search result."""
self
img
search_results
color