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 8864491
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T16:15:13+00:00 2026-06-14T16:15:13+00:00

I am using the opencv python interface (not cv2) contourmov = cv.FindContours(image1, storage, cv.CV_RETR_CCOMP,

  • 0

I am using the opencv python interface (not cv2)

contourmov =  cv.FindContours(image1, storage, cv.CV_RETR_CCOMP, cv.CV_CHAIN_APPROX_SIMPLE)
contourmove = cv.FindContours(image2, storage, cv.CV_RETR_CCOMP, cv.CV_CHAIN_APPROX_SIMPLE)

I have the contours from image1 and image2 and I need the intersection between the two contours.

I used

image3 = cv.CloneImage(image1)
cv.Set(image1, cv.Scalar(0,0,0));
image4 = cv.CloneImage(image1)
cv.Set(image2, cv.Scalar(0,0,0));
cv.DrawContours(image3,contourmov,cv.CV_RGB(0,255,0),cv.CV_RGB(0,255,0),1)
cv.DrawContours(image4,contourmove,cv.CV_RGB(0,255,0),cv.CV_RGB(0,255,0),1)
cv.And(image3,image4,image3)

So I assumed image3 will have the intersection of contours of image1 and image2 but i do not see them.

Kindly let me know where am I going wrong.

  • 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-14T16:15:15+00:00Added an answer on June 14, 2026 at 4:15 pm

    I figured out the problem. I had to use

     cv.DrawContours(image3,contourmov,cv.CV_RGB(0,255,0),cv.CV_RGB(0,255,0),1,cv.CV_FILLED) 
    

    This fills the contour area and you will get the intersection. Else there are only lines and you will get line intersections which might be points.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to draw a polygon using the python interface to opencv, cv2. I've
A few days back, I started using new OpenCV-Python interface, cv2 . My question
I am using opencv with python. I wanted to do an cv2.imwrte: cv2.imwrite('myimage.png', my_im)
I have written a program using Python and OpenCV where I perform operations on
I'm trying to create a basic video file using OpenCV (in Python). I have
I have two images which I want to compare using python and opencv. I
I am using Python 2.7 and opencv 2.1. I have a numpy array and
Using OpenCV and python 2.7 I have written a script that detects and marks
I am using OpenCV with Python. I have an image, and what I want
Can anyone describe how can i implement SWT in python using opencv or simplecv

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.