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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T02:02:29+00:00 2026-05-19T02:02:29+00:00

I have problem in converting System.Drawing.Image to Emgu.CV.Image. i can load my image in

  • 0

I have problem in converting System.Drawing.Image to Emgu.CV.Image.
i can load my image in formapplication

string im_name = str[index];
Emgu.CV.Image<Bgr, Byte> img = new Image<Bgr, byte>(im_name);

but this code gives me error of invalid arguments

System.Drawing.Image img_btmap = System.Drawing.Image.FromFile( im_name);

Emgu.CV.Image<Bgr, Byte> img1 = new Image<Bgr, byte>(img_btmap);

Somebody has idea why???
regards

  • 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-19T02:02:29+00:00Added an answer on May 19, 2026 at 2:02 am

    Change the line to:

    System.Drawing.Bitmap img_btmap = new System.Drawing.Bitmap(im_name);
    

    The Emgu.CV.Image constructor is expecting Bitmap class which inherits from Image class.

    Make sure to dispose img_btmap later otherwise you risk the file being locked.

    Edit: most simple way of ensuring proper disposing is using the using block like this:

    using (System.Drawing.Bitmap img_btmap = new System.Drawing.Bitmap(im_name))
    {
       //.....rest of code comes here.....
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a problem converting a string binary to a decimal I was using
I have a problem while converting a string whose value is dd.mm.yyyy to DateTime
I have a weird problem in converting a string to double in .NET 3.5.
I am using LaTeX and I have a problem concerning string manipulation. I want
Note, I have found the solution to my problem. Please see below. I'm converting
Possible Duplicate: how can I convert String to Int ? Hi, I have the
I have a problem converting a timestamp in javascript. I have this timestamp: 2011-10-26T12:00:00-04:00
I have a problem i can't find the wrong in this function it sometimes
I have problem concerning python packages and testing. I'm writing an application using wx
I have a problem concerning the width of a DialogPreference in Android. According to

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.