Hi,
I am interested in reading a CSV having the following format:
key,value
xxx,0
yyy,1
uuu,0
zzz,4
ddd,4
etc etc
Subsequently I am interested in finding out the frequency of occurrences of "value".
For instance WRT the table above, 4 appears twice so this will result in:
4-->2
0-->2
1-->1
Later I want to draw a histogram of occurrences (maybe with OpenCV?), this comes easily with MATLAB or R which can plot a histogram (with bins).
Dlib is just a folder of C++ source files. You can use it together with
any other library. In particular, I use boost and dlib together frequently
and there are no issues.
In the link you posted, it sounds like you are having a rough time getting boost working, which has nothing to do with dlib.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Boost is working perfectly as long as dlib is not involved.
I can even integrate dlib with boost (and this is the catch) as long as i dont include these header files:
include <dlib image_processing="" frontal_face_detector.h="">
include <dlib image_processing="" render_face_detections.h="">
include <dlib image_processing.h="">
include <dlib gui_widgets.h="">
include <dlib image_io.h="">
See the screenshoots, the error is from dlib not boost:
Maybe someone has created a #define called verify? Also, do not #include
cpp files, especially in headers. If you are doing that then many things
will break.
In any event, this isn't a bug in dlib. Also, you keep asking me about
very basic programming questions that are not dlib specific. So the best
advice I can give you is to get a good programming book and read it. I
have a list of suggestions here: http://dlib.net/books.html
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
"Also, do not #include cpp files, especially in headers." this was your suggestion in one of the previous posts ... I was surprised that you suggested it!. and if you noticed, that line was commented out.
"very basic programming questions ..."? at least you made me smile ... I have 15 years of programming experience mainly in java but still ...
The fact that i asked if I can mix boost and dlib? this was only because it didn't compile and there are several other posts in this forum about this issue, for instance this one which deals with namespace collisions: https://sourceforge.net/p/dclib/discussion/442517/thread/cfd6538b/
You are welcomed to upload a working Xcode project with the latest dlib and latest boost where the aforementioned header are included, I will probably move to using another library.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Those namespace collisions have been removed. And in any event, your
questions really are general questions about using C++ and xcode rather
than about dlib or even boost. So it really would be a good idea to get a
C++ book if you want to keep writing C++ code.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
I am interested in reading a CSV having the following format:
key,value
xxx,0
yyy,1
uuu,0
zzz,4
ddd,4
etc etc
Subsequently I am interested in finding out the frequency of occurrences of "value".
For instance WRT the table above, 4 appears twice so this will result in:
4-->2
0-->2
1-->1
Later I want to draw a histogram of occurrences (maybe with OpenCV?), this comes easily with MATLAB or R which can plot a histogram (with bins).
I am thinking about using boost bi-map, like so:
http://mybyteofcode.blogspot.com/2010/02/parse-csv-file-with-boost-tokenizer-in.html
Is there a better alternative using dlib? would I have any issues if I use boost data structures and later read these into dlib matrix?
Thanks,
You can mix and match things from many libraries without issue. So no
worries.
The latest version of boost and the latest version of dlib don't play together well.
See my post here:
http://forum.openframeworks.cc/t/using-boost-dlib-ofxlearn-and-of-on-osx-10-10/18799
Dlib is just a folder of C++ source files. You can use it together with
any other library. In particular, I use boost and dlib together frequently
and there are no issues.
In the link you posted, it sounds like you are having a rough time getting
boost working, which has nothing to do with dlib.
Hi,
Thank you for your reply.
Boost is working perfectly as long as dlib is not involved.
I can even integrate dlib with boost (and this is the catch) as long as i dont include these header files:
include <dlib image_processing="" frontal_face_detector.h="">
include <dlib image_processing="" render_face_detections.h="">
include <dlib image_processing.h="">
include <dlib gui_widgets.h="">
include <dlib image_io.h="">
See the screenshoots, the error is from dlib not boost:
second pic
working when the headers are not included
Maybe someone has created a #define called verify? Also, do not #include
cpp files, especially in headers. If you are doing that then many things
will break.
In any event, this isn't a bug in dlib. Also, you keep asking me about
very basic programming questions that are not dlib specific. So the best
advice I can give you is to get a good programming book and read it. I
have a list of suggestions here: http://dlib.net/books.html
"Also, do not #include cpp files, especially in headers." this was your suggestion in one of the previous posts ... I was surprised that you suggested it!. and if you noticed, that line was commented out.
"very basic programming questions ..."? at least you made me smile ... I have 15 years of programming experience mainly in java but still ...
The fact that i asked if I can mix boost and dlib? this was only because it didn't compile and there are several other posts in this forum about this issue, for instance this one which deals with namespace collisions: https://sourceforge.net/p/dclib/discussion/442517/thread/cfd6538b/
You are welcomed to upload a working Xcode project with the latest dlib and latest boost where the aforementioned header are included, I will probably move to using another library.
No, I never told you to #include cpp files.
Those namespace collisions have been removed. And in any event, your
questions really are general questions about using C++ and xcode rather
than about dlib or even boost. So it really would be a good idea to get a
C++ book if you want to keep writing C++ code.