OpenCV Haar Classifier XML Generation Error - c

I am going through with the Haar Classifier in OpenCV. I am going through with this link which is
http://note.sonots.com/SciSoftware/haartraining.html#n43ec47f
I am facing problem in ./mergevec executable, error is
OpenCV Error: Assertion failed (elements_read == 1) in icvGetHaarTraininDataFromVecCallback, file cvhaartraining.cpp, line 1859
terminate called after throwing an instance of 'cv::Exception'
what(): cvhaartraining.cpp:1859: error: (-215) elements_read == 1 in function icvGetHaarTraininDataFromVecCallback

I had the same problem on various sized instances and was not thrilled with recompiling each time so I ended up going with randomcastle's mergevec python replacement. https://github.com/wulfebw/mergevec

Related

Could not open $readmem data file program mem.dat; please make sure the file is added to project and read permission, ignoring [MicroController:44]

enter image description hereWhen I execute a program that is of microcontroller then complier throws 3 errors:
[Synth 8-4445] could not open $readmem data file program mem.dat; please make sure the file is added to the project and has read permission, ignoring [MicroController:44]
Synth 8-439] module 'ALU' not found MicroController 47
failed synthesizing module 'MicroController MicroController v.21
3 Vivado Tel 4-5] Elaboration failed - please see the console for details Synthesis (3 errors, 1 critical warning

Failing to open audio device (/dev/dsp)

I am using pocketsphinx to adapt my acoustic model which i have trained.
So to use the model in pocketsphinx, i ran the following command:
pocketsphinx_continuous -inmic yes -lm "/home/ridwan/sphinx/other/output/other.lm.DMP" -dict "/home/ridwan/sphinx/other/output/other.dic" -hmm "/home/ridwan/sphinx/other/output/other.ci_cont"
But however, I am getting this error:
ad_oss.c(115): Failed to open audio device(/dev/dsp): Input/output error
FATAL: "continuous.c", line 245: Failed to open audio device
I tried this solution. (installing pulseaudio, libpulse-dev, osspd)
I also tried export LD_PRELOAD=libpulsedsp.so
But I keep getting the same error message.

Vivado HLS RTL/Cosimulation Fail

I have problem in Vivado HLS
I'm developing an ipcore that the input is AXI-Stream and the output is AXI-Stream too.
There is no problem in C Syntheseis, and also it works well in C Simulation.
But RTL/Cosimulation is failing.
My Top Function is like this :
void CT(point_in SetA[2 * M], point_out Centers[M]){
#pragma HLS INTERFACE axis register both port=SetA
#pragma HLS INTERFACE axis register both port=Centers
...
}
This is the console message when I try to run RTL/Cosimulation:
...
Starting static elaboration
ERROR: [VRFC 10-147] xbip_pipe_v3_0_5.xbip_pipe_v3_0_5_viv_comp failed to restore
ERROR: [VRFC 10-213] Registering Dependencies Error: The library 'xbip_pipe_v3_0_5' could not be found during restore
ERROR: [VRFC 10-147] floating_point_v7_1_6.floating_point_v7_1_6_viv failed to restore
ERROR: [VRFC 10-147] xbip_pipe_v3_0_5.xbip_pipe_v3_0_5_viv_comp failed to restore
ERROR: [VRFC 10-213] Registering Dependencies Error: The library 'xbip_pipe_v3_0_5' could not be found during restore
ERROR: [VRFC 10-147] floating_point_v7_1_6.floating_point_v7_1_6_viv failed to restore
ERROR: [VRFC 10-147] xbip_pipe_v3_0_5.xbip_pipe_v3_0_5_viv_comp failed to restore
ERROR: [VRFC 10-213] Registering Dependencies Error: The library 'xbip_pipe_v3_0_5' could not be found during restore
ERROR: [VRFC 10-147] floating_point_v7_1_6.floating_point_v7_1_6_viv failed to restore
WARNING: [VRFC 10-122] floating_point_v7_1_6_viv remains a black-box since it has no binding entity [/wrk/2018.2/continuous/2018_06_14_2258646/packages/customer/vivado/data/ip/xilinx/floating_point_v7_1/hdl/floating_point_v7_1_vh_rfs.vhd:91730]
WARNING: [VRFC 10-982] library name floating_point_v7_1_6 of instantiated unit conflicts with visible identifier [C:/Users/Dropbox/Vivado_projects/Coreset_Tree/test4/test_coreset/solution1/sim/verilog/ip/xil_defaultlib/CoresetTree_ap_fadd_3_full_dsp_32.vhd:195]
ERROR: [XSIM 43-3322] Static elaboration of top level Verilog design unit(s) in library work failed.
ERROR: Please check the snapshot name which is created during 'xelab',the current snapshot name "xsim.dir/CoresetTree/xsimk.exe" does not exist
INFO: [COSIM 212-211] II is measurable only when transaction number is greater than 1 in RTL simulation. Otherwise, they will be marked as all NA. If user wants to calculate them, please make sure there are at least 2 transactions in RTL simulation.
command 'ap_source' returned error code
while executing
"source C:/Users/Dropbox/Vivado_projects/Coreset_Tree/test4/test_coreset/solution1/cosim.tcl"
invoked from within
"hls::main C:/Users/Dropbox/Vivado_projects/Coreset_Tree/test4/test_coreset/solution1/cosim.tcl"
("uplevel" body line 1)
invoked from within
"uplevel 1 hls::main {*}$args"
(procedure "hls_proc" line 5)
invoked from within
"hls_proc $argv"
Finished C/RTL cosimulation.

What does SDL_GetError say in the case of an error?

My main question: Please may you list a few examples of what SDL_GetError would print?
I want to use SDL_GetError to help me debug, however I don't know what to expect or how to create my own intentional errors.
The libsdl wiki says:
The message is only applicable when an SDL function has signaled an
error. You must check the return values of SDL function calls to determine
when to appropriately call SDL_GetError().
however http://sdl.beuc.net/sdl.wiki/SDL_GetError says:
Although this example uses SDL_Init, SDL_GetError provides an error
message for any failed SDL operation.
so which is it? Only some or all? None of the SDL wikis/documentations I have seen give a list of example error messages, so I don't know how to initiate an error, or what to expect in terms of content and format. Is
Error in `./foo': double free or corruption (top):
an SDL_GetError message or is that caused by something else?
The wiki entry for SDL_Error lists the error strings:
SDL_errorcode | The corresponding error string
SDL_ENOMEM | Out of memory
SDL_EFREAD | Error reading from datastream
SDL_EFWRITE | Error writing to datastream
SDL_EFSEEK | Error seeking in datastream
SDL_UNSUPPORTED | Unknown SDL error
SDL_LASTERROR | Unknown SDL error
any other value | Unknown SDL error
See also SDL_error.c. One of the wiki entries seems to be incorrect. The correct error code - error string pair would be:
SDL_UNSUPPORTED | That operation is not supported
You can set custom errors messages with SDL_SetError - see the .c above. Finally, "double free or corruption" is not an error caused by SDL, but most likely by a double free. I suggest gdb/valgrind to debug it.

Pepper Robot - getImageLocal generates error

When trying to get an image from the robot using getImageLocal, I receive an error message. This is despite the fact that I am running the code directly on the robot. The error message is:
Traceback (most recent call last):
File "test.py", line 13, in <module>
video_device.getImageLocal(handle)
RuntimeError: Uncaught error: Pointer serialization not implemented
The code I've used to obtain this error is below (I receive the same error when using C++ as well) :
import qi
import sys
if __name__ == "__main__":
app = qi.Application(sys.argv)
# start the eventloop
app.start()
video_device = app.session.service("ALVideoDevice")
handle = video_device.subscribe('handler', 0, 0, 10)
video_device.getImageLocal(handle)
video_device.releaseImage(handle)
I'm currently running this code using:
python test.py --qi-url=tcp://pepper.local
I would be very interested to know if it is something that I am doing wrong here, or if there is a more serious underlying issue.
Even if you run this code directly on the robot, you won't be able to retrieve this image using Python code. The fact that you get the same error while using C++ is quite disturbing indeed...
If you want to work in Python, you should consider using the getImageRemote() method to get the images. This solution works if your code runs on the robot, but also if it runs on a remote computer.
If you want to retrieve the images faster, you could also consider using GStreamer (here is a link to a post describing how to use it. It's a valid solution for Nao, but it can be used for Pepper as well).
Which version of Naoqi are you using ?

Resources