Cannot get SURF example in EMGU.CV to work? - emgucv

I am trying to detect a pattern shown in two images. Hence I have been trying to use the SURF algorithim found in emgu.CV, but the "SURFFeature" example that is given gives me the following error:
An unhandled exception of type 'Emgu.CV.Util.CvException' occurred in Emgu.CV.dll
Additional information: OpenCV: norm == NORM_L1 || norm == NORM_L2 || norm == NORM_HAMMING
Any ideas how to fix this?
When I try the "Hello World" example and the face detection example, both seem to work fine.
Thanks for any advice!
Fouad.
PS: Emgu.CV can be downloaded from here: http://www.emgu.com/wiki/index.php/Main_Page

Apparently the build was messed up.
http://www.emgu.com/bugs/show_bug.cgi?format=multiple&id=74
Aha, found it. The error here is in Emgu.Cv.Gpu/GpuBruteForceMatcher.cs lines 22 and 27.
Line 22 currently reads:
L2Dist,
It should read: L2Dist = 4,
Line 27 currently reads: HammingDist
It should read: HammingDist = 6
Rebuild the Emgu.CV.Gpu dll with those changes and it works.

Related

Errors - bootstrap GLM model - glmmBoot package

I'm trying to run a bootstrap resampling on a GLM model, but I keep running into errors and I can't find any solution online.
The first problem in which I ran into is "variable lenght differs" when i try to use a normalized variable (sub.size_z) and a continuous variable trasformed into factor (hours). I checked my dataset and there are no NAs anywhere, so i don't know how to tackle the problem.
The second error is "Error: Naming mismatch from base to list of coefs", which happens when i try to run the bootstrap using a GLM without having trasformed the variables that i previously mentioned.
Can anyone point me towards a solution? Thanks a lot!
Here's the code I used!
data <-read.delim2("C:/Users/BRIZ_/Desktop/analisi scratching/Hypothesis 3/Hypothesis 3/database.txt")
library(car)
library(lme4)
library(MASS)
library(dplyr)
library(blmeco)
library(MuMIn)
library(lmerTest)
library(AER)
library(DHARMa)
sub.size_z<-scale(sub.size, center=TRUE,scale=TRUE)
hours<- as.factor(hour)
modelboot<-glmmTMB(sc.count~ offset(log(DURATION)) + hours + general.activity + sub.size_z + approach5+ id,data=data, family=genpois(link = "log"))
summary(modelboot)
bootstrap_model(modelboot,base_data=data,resamples =100)

G1ANT Studio Advance Course Lesson 8 Error

Error Image occuring in advance course Lesson 8:
Code used is
program mtsc
♥rdc = /ui[#name='Remote Desktop Connection']
waitfor.ui ‴♥rdc/ui[#id='5017']/ui[#name='Show Options ']‴
ui.click ‴♥rdc/ui[#id='5017']/ui[#name='Show Options ']‴
ui.settext ‴♥rdc/ui[#typeid='50003']/ui[#typeid='50004']‴ text test.domain.com
delay 1
ui.settext ‴♥rdc/ui[#id='13064']‴ text admin
When I am executing program their is error occuring at 4th line of code i.e. "
Exception of type FlaUI.Core.Exceptions.ElementNotAvailableException'
was thrown" kindly give solution on this error.
Use the wpath address of the combox and paste it in the code instead of "rdc/ui[#typeid='50003']/ui[#typeid='50004".
And don't use rdc in front of that wpath, it will run the code.
You can refer my assignment video. I have shown in that how can we remove this error.

Error using Caffe: "This tool requires OpenCV; compile with USE_OPENCV."

I want to use Caffe's tool, compute_image_mean to compute the mean image, but the command line tells me that:
This tool requires OpenCV; compile with USE_OPENCV.
I've searched the Internet, and one guy said:
Well, this message suggests that you have compiled caffe without
OpenCV, i.e; with USE_OPENCV set to 0 in your Makefile.config.
Recompile with that settings commented out (as is the default) and try
again. And of course you need to have OpenCV installed for this to
work.
But I have already set USE_OPENCV := 0 when I compiled my Caffe.
Could someone help me to solve this problem?
I think you have misread the statement you found, it says you are compiling without OpenCV, which means WITH_OPENCV := 0 , to compile Caffe with OpenCV you have to set WITH_OPENCV := 1 , or just comment it out.
I met the same error information when I used caffe to do my work. I solved this problem by modifying something in the "Makefile.config" file.
The same as the lastest answer, I commented this line "USE_OPENCV := 0" with "#", so after compiling I can use OpenCV's function. I can use this way to deal with it, but you said that when you did this action and got another error. I think you didn't install your OpenCV correctly. Maybe it's your version problem or environment variable error. You can try to install OpneCV again.
I met the same error when I tried to make lmdb.
At first I uncomment "USE_OPENCV:=0" in the Makefile.config and recompile for many times, but it does not help.
So I try to comment "USE_OPENCV:=0" with # and recompile the caffe, it success.

Runtime error in Opencv text module sample code "webcam_demo"

When I run other samples code of module text , everything is well. But when I tried to run webcam_demo program I got this error:
Error: Illegal min or max specification!
"Fatal error encountered!" == NULL:Error:Assert failed:in file globaloc.cpp, line 75
The debugger breaks execution right before this line:
ocrs.push_back(OCRTesseract::create());
webcam_demo.cpp
Thank you for helping out
I had same problem, when using tesseract with OpenCV.
When I moved initialization before anything else, it started to work.

Simple OpenCV problem

Why I try to run the following OpenCV program, it shows the following error :
ERROR:
test_1.exe - Application Error
The application failed to initialize properly (0x80000003).
Click on OK to terminate the application.
CODE:
#include "cv.h"
#include "highgui.h"
int main()
{
IplImage *img = cvLoadImage("C:\\face.bmp");
cvSetImageROI(img, cvRect(100,100, 100, 100));
cvAddS(img, cvScalar(50), img);
cvResetImageROI(img);
cvShowImage("Test", img);
cvWaitKey(0);
return 0;
}
When i press F5(im using vs2008express), the program encounters a break point...i have attached a picture...dont know, whether, it will help or not.
Error Snapshot Link
It is not that, only this program is producing this error, but also any kind of image manipulation funciton containing (OpenCV)program is resulting in this sitution.
Such as : cvSmooth
one last thing, it there any dedicated OpenCV forum or sth like that?
I am an administrator.So, yes, ive the permission.
a version mismatch.
sorry, i didn't get it?Version mismatch with what?
But, i have found the error using dependency walker.
Warning: At least one module has an unresolved import due to a missing export
function in a delay-load dependent module.
and also found that, it is a common problem, and found some info in the FAQ of DW...
Why am I seeing a lot of applications where MPR.DLL shows up in red under
SHLWAPI.DLL because it is missing a function named WNetRestoreConnectionA?
I also get a "Warning: At least one module has an unresolved import due to
a missing export function in a delay-load dependent module" message.
Function name : WNetRestoreConnectionA
But there is no guideline about how to solve it. Though, they say, it is not a problem.
i googled a little and found a suggestion.It says,
Turn off your compilers setting to assume you are programming for Win9x.
(I just lost which setting but it is not that difficult, use a #define...)
But i have no idea, how to do that in Visual Studio 2008 express.
Any suggestion how to solve it...
This usually indicates a problem with a dll; either you don't have permission, or a version is mismatched. Try running as Administrator to see if it is a permissions problem. If that doesn't help, try using the Dependency Walker.

Resources