Runtime error in Opencv text module sample code "webcam_demo" - opencv

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.

Related

PSPNet evalution issue

I am working on PSNet and When I reached on third step evaluation and run the code with command ./run.sh I have facing these errors shown in Image and also code is:
Error using importdata
unable to open file.
Error in eval_sub (line 3)
list = importdata(fullfill(data_root,eval_list));
Error in eval_all (line_35)
eval_sub(data_name,data_root,eval_list,model_weight,model_deploy,fea_cha,crop_size_h,crop_size_w,data_class,data_colormar,...
I am working on laptop cpu don't have gpu etc
Please guide me
Regards

How to fix problem with Latex in R-Markdown?

I have an R Markdown issue, I am trying to write my thesis on it, when I run the code to generate the pdf, the following message is shown:
! LaTeX Error: Command \counterwithout already defined.
Or name \end... illegal, see p.192 of the manual.
Error: Failed to compile THESIS.tex. See THESIS.log for more info.
Execution halted
Any suggestion?
Found your error on TeX exchange, and the solution seems to be to define the following variables:
\let\counterwithout\relax
\let\counterwithin\relax
Before the package chngcntr (if you are using it).
(Credit to the original answer post)

Why does Corona give an error loading code that loads fine with lua?

I'm having problems with a specific line of code - building.transmitter:[operation](player, unpack({...})) that causes an error in Corona, yet this loads fine when it's run in Lua separately. I suspect it has something to do with the : being placed before the [operation] variable but I'm clueless why.
Specifically the module is written as,
local activate = {}
local function activate.transmitter(player, operation, ...)
building = player:getTile()
building.transmitter:[operation](player, unpack({...}))
end
return activate
The runtime errror that is appearing gives me
"error loading module from file, '<name>' expected near '['"
Edit - WOW! I didn't notice that when troubleshooting this in Corona I changed some of the lines of code to identify the problem. I then mistakenly tested the edited code in Lua and it ran fine. I didn't realize the code wasn't the original until siffiejoe pointed out the interpreter getting an error as well. Sorry for the mistake.
maybe Corona uses older version of Lua which does not support this syntax. You can try workaround instead of
building.transmitter:[operation](player, unpack({...}));
you can call
building.transmitter[operation](building.transmitter, player, unpack({...}));

Exception Error, Erlang

This question is with reference to the question in the link:
"** exception error: undefined function add:addfunc/0 in Erlang "
I'm trying to execute a simple erlang program of adding two numbers. I'm trying to do this in Eclipse on Ubuntu 10.04 LTS.
When I execute this program, I'm getting the error as shown below:
-module(add).
-export([addfunc/0]).
addfunc() ->
6 + 5.
" ** exception error: undefined function add:addfunc/0 "
This program when executed in the erlang shell is working fine. But when it comes to eclipse it's giving me this error. Not this, any program for that matter is giving me the similar error. Guess I would be missing something about the eclipse configuration.
I haven't tested your code, but this very basic code should work.
The message says that your function does not exist.
Make sure that you have no errors at compile time.
Check whether your function is exported with:
add:module_info().
the result should look alike this:
[{module,add},
{exports,[{addfunc,0},
.....

Cannot get SURF example in EMGU.CV to work?

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.

Resources