Coder Social home page Coder Social logo

Comments (5)

ebachard avatar ebachard commented on August 24, 2024

ooops, looks like something was wrong with the code instertion ... apologies :-/

from cvui.

ebachard avatar ebachard commented on August 24, 2024

Apologies, I'll read how to send patch, because I'm more used to speak patch language than html things.

from cvui.

Dovyski avatar Dovyski commented on August 24, 2024

Hello! Don't worry about formatting nor any Github idiosyncrasy, your contribution is the valuable part.

I would like you to elaborate a bit more regarding cvui::printf portability. Is it not portable because of a misbehavior or compilation warning/error on Linux/Mac?

I see the benefit of using cv::putText, but the general idea of cvui is to abstract opencv drawing primities to provide a simpler and more powerful API. I think the methods you suggested (intToString() and floatToString()) could be replaced by the already existing std::to_string():

// ... 
cv::putText(frame,
 "cvuiv" + std::to_string(VERSION_MAJOR) + "." + std::to_string(VERSION_MINOR) + "." + std::to_string(VERSION_MICRO),
  cv::Point(frame.cols - 80,frame.rows - 10 /*FIXME : use font height instead of a magic */),
  fontFace,
  0.4,
  aColor,
  1.5,
  8);

//...   

from cvui.

ebachard avatar ebachard commented on August 24, 2024

Le 31/10/2016 20:16, Fernando Bevilacqua a écrit :

Hello! Don't worry about formatting nor any Github idiosyncrasy, your contribution is the valuable part.

Hello Fernando,

Apologies for the loooong delay : several things made me away from
keyboard, and I hope I'll have more time this week.

(of course, I'll answer the other mails you sent me asap)

I would like you to elaborate a bit more regarding cvui::printf portability. Is it not portable because of a misbehavior or compilation warning/error on Linux/Mac?

The problem is most of the time Microsoft, deciding something, without
verify the portability is respected on other OS's, and what I read here
and there told me it's simply not possible to use this directly. As I
wrote, I was busy last week, but I'll try to propose another solution
-means something simly working on Unix'es- once I'll have the time to
work on that. e.g., currently, some strings displaying is broken, due to
the uggly workaround I used (first thing was to make it compile, per see
:-)

I see the benefit of using cv::putText, but the general idea of cvui is to abstract opencv drawing primities to provide a simpler and more powerful API. I think the methods you suggested (intToString() and floatToString()) could be replaced by the already existing std::to_string():

OOOops, my bad :-)

I was simply unaware such solution was existing. Of course it is more
simple to use that, under to condition to build adding "-std=c++11 " in
the command line.

// ...
cv::putText(frame,
  "cvuiv" + std::to_string(VERSION_MAJOR) + "." + std::to_string(VERSION_MINOR) + "." + std::to_string(VERSION_MICRO),
   cv::Point(frame.cols - 80,frame.rows - 10 /*FIXME : use font height instead of a magic */),
   fontFace,
   0.4,
   aColor,
   1.5,
   8);

Tested one minute ago => works as expected on Linux (not tested on Mac OS X)

Regards,
Eric Bachard

//...


from cvui.

Dovyski avatar Dovyski commented on August 24, 2024

I think all the issues reported here were fixed by 80f382f. If you face any problems, please open a new issue.

from cvui.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.