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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T12:25:08+00:00 2026-05-26T12:25:08+00:00

I currently have an iplimage that has been modified using opencv. I am needing

  • 0

I currently have an iplimage that has been modified using opencv. I am needing to draw an arc like that of the parabola of a quadratic equation, and I am unable to make one using the basic drawing functions built into opencv. I have been looking into opengl, but all I can find are bezier curves. What would be the best library to use to accomplish this?

  • 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-05-26T12:25:08+00:00Added an answer on May 26, 2026 at 12:25 pm

    I wouldn’t recommend moving to OpenGL (based upon what you’ve provided in the post).

    If you want to take a simple approach, you can solve the quadratic equation point-by-point (i.e. assume x is the independent variable and then solve for y). Once both x and y are known, you can draw the color at the specified point. I’ve provided a snippet below that illustrates a method for coloring a pixel in OpenCV. Take this code as it is: it worked for me, but it does not take into account any anti-aliasing, transparency, sub-pixel accuracy, etc.

    void overlay(IplImage *o, const IplImage *m, const CvScalar &color)
    {
      CvSize size = cvGetSize(o);
    
      unsigned char *p1 = NULL;
      unsigned char *p2 = NULL;
    
      for (size_t r=0;r<size_t(size.height);r++)
        for (size_t c=0;c<size_t(size.width);c++)
          {
            p1 = cvPtr2D(m, r, c);
            if (p1[0] == 255)
              {
                p2 = cvPtr2D(o, r, c);
    
                p2[0] = color.val[0];   // R
                p2[1] = color.val[1];   // G
                p2[2] = color.val[2];   // B
              }
          }
    }
    

    Alternatively, you can use OpenCV’s Bezier curve support third-party libraries for Bezier curve support in OpenCV. I’ve experimented with this one in the past. With a little computation, you can represent arbitrary conic sections using weighted Bezier curves. Take a look at the Rational Bezier Curves section near the bottom of the wikipedia page: Bezier Curve

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

Sidebar

Related Questions

I currently have a closure table used for hierarchical data that has 5 million
We currently have an application that sends out SMS to users, it acts like
I currently have a MySQL database that I am accessing using PHP. You search
I currently have an MS Access application that connects to a PostgreSQL database via
I currently have an existing database and I am using the LINQtoSQL generator tool
We currently have code like this: Dim xDoc = XDocument.Load(myXMLFilePath) The only way we
I currently have a DetailsView in ASP.NET that gets data from the database based
I currently have a web application that is utilizing Spring Security hosted on a
Currently I have the following code for a project that represents some probability trees
i currently have a list of classes every class starts a scheduler like this:

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.