LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 11-02-2015, 01:18 PM   #1
alishba
LQ Newbie
 
Registered: Nov 2015
Posts: 1

Rep: Reputation: Disabled
Lightbulb openCV: Assertion failed


I am using opencv for image processing, while comparing images by using command compareHist i am getting the following error:

OpenCV Error: Assertion failed (H1.type() == H2.type() && H1.type() == CV_32F) in compareHist, file /home/alishba/opencv-2.4.9/modules/imgproc/src/histogram.cpp, line 1985
terminate called after throwing an instance of 'cv::Exception'
what(): /home/alishba/opencv-2.4.9/modules/imgproc/src/histogram.cpp:1985: error: (-215) H1.type() == H2.type() && H1.type() == CV_32F in function compareHist

Aborted (core dumped)
 
Old 11-02-2015, 03:08 PM   #2
Demosa
LQ Newbie
 
Registered: Feb 2013
Distribution: Fedora 25
Posts: 29

Rep: Reputation: Disabled
So programming questions are probably not in this section (honestly, openCV has little to do with linux as it is multiplatform), but I did a little openCV work back in grad school, so lets go for it

We have nothing to work with here. What we need to see to be able to look into anything is your code, specifically related to how you call the function and initialize the arrays for
Code:
double cv::compareHist( InputArray _H1, InputArray _H2, int method )
The error it is throwing is your side, your images that you are trying to compare with a histogram are not passing that assertion that they are both type CV_32F (error 215 means failed assertion)
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
DVDStyler fails with Assertion `useimg' failed Mark_667 Linux - Software 0 12-11-2010 07:35 AM
g_error_copy: assertion `error != NULL' failed chuangsheng Programming 0 06-13-2009 01:08 AM
openldap assertion error -- ldap_parse_result: Assertion `r != ((void *)0)' failed nottings Linux - Server 1 02-19-2009 12:20 AM
assertion failed TIFFDC101 General 3 09-19-2005 08:41 PM
Problem installing FC3 - Assertion Failed cevilgenius Linux - Software 1 03-26-2005 06:30 AM


All times are GMT -5. The time now is 01:49 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration