{"id":1688,"date":"2015-05-20T23:06:02","date_gmt":"2015-05-20T22:06:02","guid":{"rendered":"http:\/\/www.2diabolos.com\/blog\/?page_id=1688"},"modified":"2024-08-26T19:46:29","modified_gmt":"2024-08-26T18:46:29","slug":"get-profile-of-an-live-image-with-a-draggable-line","status":"publish","type":"page","link":"https:\/\/www.2diabolos.com\/blog\/python-and-spyder\/get-profile-of-an-live-image-with-a-draggable-line\/","title":{"rendered":"get profile of an live image, with a draggable Line"},"content":{"rendered":"<div class=\"columns\"><p><strong>Update<\/strong> : I updated the code with some added feature (toggle autoscaling, gaussian filtering&#8230;) but most important, a big optimization step. Nearly twice better refresh time (19fps instead of 10) thanks to a matplotlib \u00ab\u00a0set_data\u00a0\u00bb function.<\/p>\n<p>Original Text: I needed a kind of ImajeJ with live images. It is actually already existing with \u00ab\u00a0<a href=\"https:\/\/www.micro-manager.org\/\" target=\"_blank\" rel=\"noopener\">micro-manager<\/a>\u00a0\u00bb which is base on ImageJ and have a big support for a big amount of cameras (and other microscopy hardware).<\/p>\n<p>But I also needed more than one line. And in informatic, there are 3 numbers : 0, 1 and \u00ab\u00a0n\u00a0\u00bb. So I made possible \u00ab\u00a0n\u00a0\u00bb lines.<br \/>\nMore over, for some reasons, sometimes the profile is live updated, sometimes not.<\/p>\n<p>Here you are the <a href=\"https:\/\/www.2diabolos.com\/blog\/wp-content\/uploads\/2015\/05\/webcamProfile-min.zip\">webcamProfile<\/a> Python script. I will probably describe the code more in detail in a next article. and also compile it in order to have easier installtion.<br \/>\nIf you add that configuration of camera is not really \u00ab\u00a0saveable\u00a0\u00bb, you understand why I thought I could do it better myself.<\/p>\n<p><a href=\"https:\/\/www.2diabolos.com\/blog\/wp-content\/uploads\/2015\/05\/screenshot2.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignleft size-large wp-image-1707\" src=\"https:\/\/www.2diabolos.com\/blog\/wp-content\/uploads\/2015\/05\/screenshot2-1024x607.png\" alt=\"WebcamProfile v2\" width=\"1024\" height=\"607\" srcset=\"https:\/\/www.2diabolos.com\/blog\/wp-content\/uploads\/2015\/05\/screenshot2-1024x607.png 1024w, https:\/\/www.2diabolos.com\/blog\/wp-content\/uploads\/2015\/05\/screenshot2-300x178.png 300w, https:\/\/www.2diabolos.com\/blog\/wp-content\/uploads\/2015\/05\/screenshot2.png 1920w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><\/p>\n<p>In the same action, I&rsquo;ve learn PyQT and more precisely event handling and sygnals\/slots mecanisms.<\/p>\n<p>Known bug : does not handle any \u00ab\u00a0camera choice\u00a0\u00bb (in a coming version)<\/p>\n<p>I tried to optimize speed, in order to get good \u00ab\u00a0real time\u00a0\u00bb acquisition and found an impressive (more than 8000 time faster!) <a href=\"https:\/\/www.2diabolos.com\/blog\/python-and-spyder\/optimize-your-opencv-code-with-numpy\/\" target=\"_blank\" rel=\"noopener\">optimization against standard OpenCV function<\/a>.<\/p>\n<\/div>","protected":false},"excerpt":{"rendered":"<p>Update : I updated the code with some added feature (toggle autoscaling, gaussian filtering&#8230;) but most important, a big optimization step. Nearly twice better refresh time (19fps instead of 10) thanks to a matplotlib \u00ab\u00a0set_data\u00a0\u00bb function. Original Text: I needed a kind of ImajeJ with live images. It is actually already existing with \u00ab\u00a0micro-manager\u00a0\u00bb which [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":861,"menu_order":0,"comment_status":"closed","ping_status":"open","template":"","meta":{"footnotes":""},"class_list":["post-1688","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/www.2diabolos.com\/blog\/wp-json\/wp\/v2\/pages\/1688","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.2diabolos.com\/blog\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.2diabolos.com\/blog\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.2diabolos.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.2diabolos.com\/blog\/wp-json\/wp\/v2\/comments?post=1688"}],"version-history":[{"count":7,"href":"https:\/\/www.2diabolos.com\/blog\/wp-json\/wp\/v2\/pages\/1688\/revisions"}],"predecessor-version":[{"id":2753,"href":"https:\/\/www.2diabolos.com\/blog\/wp-json\/wp\/v2\/pages\/1688\/revisions\/2753"}],"up":[{"embeddable":true,"href":"https:\/\/www.2diabolos.com\/blog\/wp-json\/wp\/v2\/pages\/861"}],"wp:attachment":[{"href":"https:\/\/www.2diabolos.com\/blog\/wp-json\/wp\/v2\/media?parent=1688"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}