Review your favorite Linux distribution.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
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!


  Search this Thread
Old 11-02-2015, 02:18 PM   #1
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, 04:08 PM   #2
Registered: Feb 2013
Distribution: Fedora 25, RHEL7, RHCI stack
Posts: 38

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
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)


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 08:35 AM
g_error_copy: assertion `error != NULL' failed chuangsheng Programming 0 06-13-2009 02:08 AM
openldap assertion error -- ldap_parse_result: Assertion `r != ((void *)0)' failed nottings Linux - Server 1 02-19-2009 01:20 AM
assertion failed TIFFDC101 General 3 09-19-2005 09:41 PM
Problem installing FC3 - Assertion Failed cevilgenius Linux - Software 1 03-26-2005 07:30 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 02:55 AM.

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