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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T18:55:08+00:00 2026-06-13T18:55:08+00:00

I have an image loaded from a video: Image<Gray, byte> imGray=cap.QueryGrayFrame(); Now, I want

  • 0

I have an image loaded from a video:

 Image<Gray, byte> imGray=cap.QueryGrayFrame();  

Now, I want to use the cvCornerHarris function from openCv as following:

 Image<Gray, byte> harRes = new Image<Gray, byte>(imGray.Size);  
 CvInvoke.cvCornerHarris(imGray, harRes, 8, 3, 0.04); 

But I get an cvException:

OpenCV: src.size() == dst.size() && dst.type() == CV_32FC1 Error

enter image description here

How should I fix 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-06-13T18:55:09+00:00Added an answer on June 13, 2026 at 6:55 pm

    You can deduce from the given exception, that the type of the destination image should be CV_32FC1.

    In your case, the destination image is harRes, which you have declared as:

    Image<Gray, byte> harRes = new Image<Gray, byte>(imGray.Size);
    

    The type of this image is CV_8UC1.

    It should be declared as:

    Image<Gray, float> harRes = new Image<Gray, float>(imGray.Size);
    

    Now its type is CV_32FC1, which is the type expected by the function cvCornerHarris.

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

Sidebar

Related Questions

I have an UIImageView(image loaded from remote server at runtime), now i want to
I have loaded an byte array image from a web service to my asp.net
I Want to load Image size 2550X3300 (i.e 1.7 Mb size), i have loaded
I have a image loaded in a sprite, the image is from a remote
I have an image loaded from an url and added to canvas as child.
I have a custom cell loaded from my table, with an image and a
I have something like that - image loaded from file to picturebox1: then after
I have an image loaded from disk as a texture, and a same-sized matrix
I have an image loaded in a web page say http://example.com/test.jpg on example.com Now,
I have a UIImageView which has a png image sequence loaded into it. My

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.