Giter Club home page Giter Club logo

Comments (1)

pageauc avatar pageauc commented on May 20, 2024

gui_window_on=True should show the opencv windows cv2.imshow(). There are also variables for show_thresh_on, show_crop_on plus the default full image2 window. You may need to add your own cv2.imshow() to display what you want. Your problem may be how you put in the new logic since you may not have the window name variable and image to display set correctly. Check logic and make sure the variables are correct. The speed-cam.py code to display windows is below. It is located just above if name == 'main': near end of code.
Make sure variables for the image you want to show are compatible with the new code you added. You can always add some debug code to help find out where the problem is.

    if gui_window_on:
        # cv2.imshow('Difference Image',difference image)
        cv2.line(image2, (x_left, y_upper), (x_right, y_upper), cvRed, 1)
        cv2.line(image2, (x_left, y_lower), (x_right, y_lower), cvRed, 1)
        cv2.line(image2, (x_left, y_upper), (x_left, y_lower), cvRed, 1)
        cv2.line(image2, (x_right, y_upper), (x_right, y_lower), cvRed, 1)
        image_view = cv2.resize(image2, (image_width, image_height))
        cv2.imshow('Movement (q Quits)', image_view)
        if show_thresh_on:
            cv2.imshow('Threshold', thresholdimage)
        if show_crop_on:
            cv2.imshow('Crop Area', image_crop)
        # Close Window if q pressed
        if cv2.waitKey(1) & 0xFF == ord('q'):
            cv2.destroyAllWindows()
            logging.info("End Motion Tracking ......")
            vs.stop()
            still_scanning = False

from speed-camera.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.