tsdconseil / opencv-demonstrator

OpenCV demonstrator (GUI)
http://www.tsdconseil.fr/log/opencv/demo/index-en.html
GNU Lesser General Public License v3.0
141 stars 57 forks source link

Problems with last commit / Modifications made too quickly #60

Closed juliena82 closed 8 years ago

juliena82 commented 8 years ago

Hi @applemuncy

There are some problems with your last commit:

1) What is the "+site" directive in the .gitignore? 2) Why did you did the following change:

882    -    utils::files::save_txt_file("../../../site/contenu/opencv/ocvdemo/table.html", s);  
 884   +    utils::files::save_txt_file("../../../site/contenu/opencv/ocvdemo/table-fr.html", s);  

It breaks my engine to generate the web site, and I don't understand why you did this? 3) In the following change (ocvdemo-mmi):

306  -  titre_principal = utils::str::utf8_to_latin(langue.get_item("resultats"));  
 306   +  // Seems OpenCV does the right thing now.  
 307   +  //titre_principal = utils::str::utf8_to_latin(langue.get_item("resultats"));  
 308   +  titre_principal = langue.get_item("resultats");  

I am sorry, but no, my OpenCV version on Windows still does not support UTF8. See below: capture1

Same error in ocvdemo.cc, line 336.

So, please revert back all the changes made in your last commit, and also please don't change code that you are not sure to undersant fully, or at least you can ask before doing so, I am can answer and help ;)

I think globally that it would be easier for you to enter into the code if you begin by adding new démonstrations rather than modifying the main engine, at least at the beginning. I can help in this matter too if you want. And I can also give you image processing suggestions if you are interested!

applemuncy commented 8 years ago

site/ in .gitignore tells git not to version /opencv-demonstrator/site/contenu/opencv/ocvdemo . If that is a problem for your set-up I can figure out how to put it in my global git configuration.

That is very interesting to see that OpenCV doesn't handle UTF8 in that situation. I've revert it and send a screen shot of what it does with out the change on my OpenCV.

Yes, certainly, I will revert the change to utils::files::save_txt_file("../../../site/contenu/opencv/ocvdemo/table-fr.html", s); I had no good reason other than uniformity for changing it. I had wondered if it wasn't just dead code. The -c command line option set up in the same codeblock goes out to lunch and never returns. Does it work for you?

applemuncy commented 8 years ago

screenshot from 2016-02-08 17-09-30

It's interesting to note the differences in the toolbar.

applemuncy commented 8 years ago

While we are on the subject of asking questions, from the file ocvdemo/src/ocvdemo-export.cc: s += std::string(R"(<tr><td colspan="2"><b>Démonstration</b></td><td><b>Description</b></td></tr>)") + "\n"; The R is a mystery to me. It looks like a MACRO but I can't fine it. Do you know?

juliena82 commented 8 years ago

@applemuncy The difference in toolbars appararence is probably related to some kind of system specific configuration of GTK. The R prefix before a string is a standard C++ way to define a raw string with carriage return and \ Inside (see http://en.cppreference.com/w/cpp/language/string_literal).

juliena82 commented 8 years ago

I can propose you some interesting démos that would be great to be integrated in the demonstrator. For instance, detecting objects and computing bounding box: http://docs.opencv.org/2.4/doc/tutorials/imgproc/shapedescriptors/bounding_rects_circles/bounding_rects_circles.html And also computing convex hull around objects: http://docs.opencv.org/2.4/doc/tutorials/imgproc/shapedescriptors/hull/hull.html What do you think about it? I think you could do it, and it will enable you to get more familiar with how the engine works. Of course, if you have others ideas, they are welcome.

applemuncy commented 8 years ago

That s very useful about the R prefix. So I went looking to see if -std=c++11 was in our Makefile any where and tested adding it without any obvious changes in compilation. So I gather it is rolled in by default nowadays. u8 " (unescaped_character|escaped_character)* " looks useful too.

screenshot from 2016-02-09 08-04-32

juliena82 commented 8 years ago

Il y a l'option "-std=c++0x", qui est similaire.

I have the same problem with the russian text. Maybe a problem in my GTK wrapper, I will investigate later. Anyway, I think you can remove it (unless you can speak russian), and in general I would recommend to avoid to add any "Google translatation" generated text, because there are too much mistakes. I prefer that the translation lacks than it to be so bad...

applemuncy commented 8 years ago

I'm pushing a fix now.

applemuncy commented 8 years ago

Just noticed your latest commits so I will wait.

juliena82 commented 8 years ago

En effet, ça marche maintenant. Bien joué ! (well done!)

applemuncy commented 8 years ago

Thanks : ) It's true I used Google translate for the Russian translation. Given the origins of OpenCV and current support by Itseez-vision, I think working toward a good Russian Language integration in OpenCV-demo is important. I regret not seeing Valera contributing anymore. I fully agree with you personally about now submitting to being a managed volunteer. On the other hand, I didn't really see Valera's request as so onerous. He has missed his finish date for a Russian translation : ) Maybe in a few days I will send him a message pointing out improvements.