I encountered a strange error- whenever I'm including #include <dlib/gui_widgets.h>
to my projects and declaring a variable (for example dlib::image_window win) following errors appear:
'DLIB_NO_GUI_SUPPORT is defined so you can't use the GUI code. Turn DLIB_NO_GUI_SUPPORT off if you want to use it.' and 'Also make sure you have libx11-dev installed on your system' (from guy_core_kernel_2.h). I was searching and found some suggestions that the cmake of dlib could fail- but I really doubt so, I'm already doing a detection of landmarks.
The reason why I'm trying to include and declare one of the widgets is displaying values on the screen (there is no equivalent of opencv putText(), is there?.
I would be very grateful for any help. :)
At the end I decided to use covertion from dlib::array2d to cv::Matrix (dlib::toMat(dlib::array2d) function) and use cv::putText() (as mentioned previousely). It turned out the Xcode didn't properly linked libraries from openCV- helpful were the following links: How can I create OpenCV framework?
and
http://blogs.wcode.org/2014/11/howto-setup-xcode-6-1-to-work-with-opencv-libraries/
Also if someone can't find Frameworks in Library:
https://discussions.apple.com/thread/4195808?tstart=0
Related
i'm trying to build dcmtk-3.6.6 using Cmake Gui https://github.com/DCMTK/dcmtk to convert a dcm file to Json, i faced the same problem in this link https://forum.dcmtk.org/viewtopic.php?t=4769 i can't enable the option DCMTK_ENABLE_CHARSET_CONVERSION in my cmake Gui (as you can see in the image, only disabled is show ) , i tried to build it with both DCMTK_WITH_CONV and DCMTK_WITH_ICU to be able to use convertToUTF8() but it seems that does not work
we can see in the second image that DCMTK_ENABLE_CHARSET_CONVERSION Is not defined
Could someone help me ? thanks
EDIT : my cmakeGui log show that he didn't find ICU, so probably the problem are coming from me, how can i install ICU ?
I'm trying to get Flycheck to correctly see where OpenGL is on my Mac, but it can't seem to find it. I've tried adding the following lines to my .clang_complete file, but nothing seems to work. I keep getting the error OpenGL/gl.h could not be found:
-framework OpenGL
-I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/OpenGL.framework/Headers
This doesn't happen during compilation, it's just messing up static analysis and compilation by Irony. The directory I listed has gl.h and glu.h in it directly, which is probably why it didn't help to add, but I can't figure out how to get Irony to see the files correctly.
Edit: Using Flycheck for syntax checking, not Irony
Edit: macOS X Framework directory:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/
OpenGL.framework/
Headers/
Modules/
OpenGL.tbd/
Versions/
Well, since no one seems to have an answer on this, I'll post my workaround. By symlinking /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/OpenGL.framework/Headers to /usr/local/include/OpenGL, you can give the checker the file path it wants, fixing the issue. Not the best solution, but a decent workaround nonetheless.
https://github.com/vikram-ma/OCR
when I try to run main.cpp from this code i got the following error
In file included from /home/akash/Desktop/OCR-master/main.cpp:9:0:
/home/akash/Desktop/OCR-master/OCR.h:43:3: error: ‘CvKNearest’ does not name a type
CvKNearest *knn;
^
CMakeFiles/OCR.dir/build.make:62: recipe for target 'CMakeFiles/OCR.dir/main.o' failed
please help
At first glance it seems you don't have OpenCV installed/downloaded.
The code you are poining to uses OpenCV library and it assumes you already have it.
You should go to OpenCV releases and download the version you need.
Edit:
I looked into it more closely and as suspected the code was using an old OpencCV version. Right now you are using 3.2.0 so you need to make some updates to the code itself.
Either you should go with an older version of the library (which I'm not suggesting but will be probably less effort) like 2.3-2.4 or update the code to the version you've already installed.
If you wish to do the latter, you can start by looking here: Transition guide
Among others, it is shown there that what used to be CvKNearest is now moved to cv::ml::KNearest. Updating accordingly should fix your first error.
I'm trying to write unit tests using miniDFSCluster and it's throwing the error below
java.lang.UnsatisfiedLinkError: org.apache.hadoop.io.nativeio.NativeIO$Windows.access0(Ljava/lang/String;I)Z
any pointers to resolve this issue?
With errors like this, I use three steps
Find out what it is looking for
In this case, *org.apache.hadoop.io.nativeio.NativeIO$Windows.access0*
Find out what jar/lib it is in.
I don't use the Windows version, but I believe it is in hadoop.dll -
you'll have to check this.
Find out where I'm telling it to use that jar/lib
Update: See also this Answer.
I was able to resolve this error by following these steps:
Download hadoop.dll and winutils.exe in the same version that I'm using in the sbt/maven configuration, you can find these files in all versions of hadoop here: link
Put these 2 files in your %hadoop directory%\bin folder
make sure that %hadoop directory%\bin is listed under PATH in your device's environmental path(if using windows)
then the code should work just fine.
I have a working C-extension for Racket. In the Racket CLI and the interactions window of DrRacket it works like a charm. However, I can't get it to work in the definitions window of DrRacket, which would be really useful as that is the interface for my students to develop their programs.
The problem seems to be that definitions in the extension are not 'seen' (or registered or something). The module is loaded (or at least found) but DrRacket complains that it doesn't have execute permission for it, which I don't understand.
In the C code I declared the extension to be a module and I tried both inclusion methods:
(load-extension "racket_extension.so")
and
(require "racket_extension.rkt") ; which requires you put it in a folder relative to the current working folder as follows:
"compiled/native/x86_64-linux/3m/racket_extension_rkt.so"
Neither method works. The first case gives no error, but the definitions of the external are not registered ("undefined").
In the second case DrRacket gives an error:
forbidden (execute) access to ....compiled/native/x86_64-linux/3m/racket_extension_rkt.so
but why?
Does anyone have ideas how I can get this to work? What am I missing?
Thanks!
Marc
How are you compiling and linking your extension? Are you using the raco ctool or gcc? Are you executing DrRacket within the same directory as your compiled directory? The way I usually test my extensions is to execute: drracket my_ext_test.rkt in the same directory as my compiled directory. That has been an issue for me in the past. Also, if it says the action is forbidden, did you try changing the permissions of your .so? Maybe it's something as simple as that. I'd start with the simple example Writing Racket Extensions and make sure that you can get the hello world program to work in the definitions window. I personally have never had the problem you have mentioned, but I am also running on Linux.