Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7723381
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T04:25:42+00:00 2026-06-01T04:25:42+00:00

I’m new to OpenCV and would like to use its Python binding. When trying

  • 0

I’m new to OpenCV and would like to use its Python binding.

When trying out the samples on OSX, I noticed

1.) The windows imshow creates are not resizable

2.) I can fix that with an prior call to cv2.namedWindow, like:
cv2.namedWindow(‘zoom’, cv2.cv.CV_WINDOW_NORMAL)

Can we add symbols like CV_WINDOW_NORMAL from cv into cv2 !?
Who has commit rights to openCV’s Python binding ?

Thanks,
Sebastian Haase

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T04:25:43+00:00Added an answer on June 1, 2026 at 4:25 am

    There are some omisions in the current new cv2 lib. Typically these are constants that did not get migrated to cv2 yet and are still in cv only.
    Here is some code to help you find them:

    import cv2
    import cv2.cv as cv
    nms  = [(n.lower(), n) for n in dir(cv)] # list of everything in the cv module
    nms2 = [(n.lower(), n) for n in dir(cv2)] # list of everything in the cv2 module
    
    search = 'window'
    
    print "in cv2\n ",[m[1] for m in nms2 if m[0].find(search.lower())>-1]
    print "in cv\n ",[m[1] for m in nms if m[0].find(search.lower())>-1]
    

    cv2 is a more faithful wrapper around the C++ libs than the previous cv. I found it confusing at first but it is much easier once you make the change. The code is much easier to read and numpy matrix manipulations are very fast.

    I suggest you find and use the cv constants while reporting their omissions as bugs to the opencv bug tracker at willowgarage. cv2 is fresh and minty but will improve.

    FYI. it is well worth instantiating the named windows before use, also killing them on exit. IMHO

    E.g.

    import cv2
    if __name__ == '__main__': 
        cap = cv2.VideoCapture(0) # webcam 0
        cv2.namedWindow("input")
        cv2.namedWindow("grey")
        key = -1
        while(key < 0):
            success, img = cap.read()
            cv2.imshow("input", img)
            grey = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY)
            cv2.imshow("grey", grey)
            key = cv2.waitKey(1)
        cv2.destroyAllWindows()
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I would like to count the length of a string with PHP. The string
I am trying to understand how to use SyndicationItem to display feed which is
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I want use html5's new tag to play a wav file (currently only supported
I am trying to render a haml file in a javascript response like so:
I would like to run a str_replace or preg_replace which looks for certain words
I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
I'm trying to use string.replace('’','') to replace the dreaded weird single-quote character: ’ (aka
I'm new to using the Perl treebuilder module for HTML parsing and can't figure
link Im having trouble converting the html entites into html characters, (&# 8217;) i

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.