debug/debug.py
def plot_histograms_live(filename):
    """
    Plot histogram of a video frame by frame. Is not expected to work in real time.
    :param filename: Path to video file
    :return:
    """
    import feature_extraction.ft_extractor as fx
    cap = cv2.VideoCapture(filename)

    while cap.isOpened():
        _, frame = cap.read()

        hists_frame = fx.get_histograms_hsv(frame)

        # Clear current plot
        plt.clf()
        plt.cla()
        # Update at 25 fps speed if live
        plot_histograms(hists_frame, 0.04)

        if cv2.waitKey(1) & 0xFF == ord('q'):
            break

    cap.release()
    cv2.destroyAllWindows()

    Plot histogram of a video frame by frame. Is not expected to work in real time.
    :param filename: Path to video file
    :return:
    
Plot histogram of a video frame by frame. Is not expected to work in real time.
Plot histogram of a video frame by frame . Is not expected to work in real time .
def plot_histograms_live(filename):
    import feature_extraction.ft_extractor as fx
    cap = cv2.VideoCapture(filename)
    while cap.isOpened():
        _, frame = cap.read()
        hists_frame = fx.get_histograms_hsv(frame)
        plt.clf()
        plt.cla()
        plot_histograms(hists_frame, 0.04)
        if cv2.waitKey(1) & 0xFF == ord('q'):
            break
    cap.release()
    cv2.destroyAllWindows()
def plot_histograms_live ( filename ) : import feature_extraction . ft_extractor as fx cap = cv2 . VideoCapture ( filename ) while cap . isOpened ( ) : _ , frame = cap . read ( ) hists_frame = fx . get_histograms_hsv ( frame ) plt . clf ( ) plt . cla ( ) plot_histograms ( hists_frame , 0.04 ) if cv2 . waitKey ( 1 ) & 0xFF == ord ( 'q' ) : break cap . release ( ) cv2 . destroyAllWindows ( )
Plot histogram of a video frame by frame.
Plot histogram of a video frame by frame .
"""
    Plot histogram of a video frame by frame. Is not expected to work in real time.
    :param filename: Path to video file
    :return:
    """ # Clear current plot # Update at 25 fps speed if live
None
filename
Path to video file
Path to video file