{"id":389,"date":"2020-11-30T08:20:44","date_gmt":"2020-11-30T08:20:44","guid":{"rendered":"http:\/\/www.creatis.insa-lyon.fr\/~grenier\/?p=389"},"modified":"2021-11-09T16:21:37","modified_gmt":"2021-11-09T16:21:37","slug":"a-very-fast-introduction-to-image-processing","status":"publish","type":"post","link":"https:\/\/www.creatis.insa-lyon.fr\/~grenier\/?p=389","title":{"rendered":"A very fast introduction to image processing"},"content":{"rendered":"\n<p>Here are some slides to start with images and fundamental processing (<a href=\"https:\/\/www.creatis.insa-lyon.fr\/~grenier\/wp-content\/uploads\/teaching\/DIP\/A faster introduction to image processing.pdf\">pdf<\/a>)<\/p>\n\n\n\n<p>There are also some funny basic practices using python. You may need to set up a working conda environment. For editing your py files, spyder or PyCharm are nice and efficient python IDEs.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Activate a conda environment <\/strong><\/h3>\n\n\n\n<ol class=\"wp-block-list\"><li>To create an environment with all necessary packages, see <a href=\"https:\/\/www.creatis.insa-lyon.fr\/~grenier\/?p=409\">my post<\/a> <\/li><li>Activate the environment <ul><li>$ <code>conda activate PATH_TO_ENV\/conda_TF2.6-cuda<\/code><\/li><\/ul><\/li><\/ol>\n\n\n\n<h3 class=\"wp-block-heading\">Practices<\/h3>\n\n\n\n<p>Practice on image &#8216;deconvolution&#8217; with Wiener and CLS (OpenCV) : <a href=\"https:\/\/www.creatis.insa-lyon.fr\/~grenier\/wp-content\/uploads\/teaching\/DIP\/Deconvolution.zip\">zip<\/a><\/p>\n\n\n\n<p>Practice on image classification (scikit-learn, Keras) : <a href=\"https:\/\/www.creatis.insa-lyon.fr\/~grenier\/wp-content\/uploads\/teaching\/DIP\/TP_ML_DL.zip\">zip<\/a><\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Use PyCharm and create project<\/h3>\n\n\n\n<p>Create a <em>New Project<\/em>:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large wp-duotone-default-filter\"><img loading=\"lazy\" decoding=\"async\" width=\"784\" height=\"497\" src=\"https:\/\/www.creatis.insa-lyon.fr\/~grenier\/wp-content\/uploads\/PyCharm_Prj1.png\" alt=\"\" class=\"wp-image-400\" srcset=\"https:\/\/www.creatis.insa-lyon.fr\/~grenier\/wp-content\/uploads\/PyCharm_Prj1.png 784w, https:\/\/www.creatis.insa-lyon.fr\/~grenier\/wp-content\/uploads\/PyCharm_Prj1-300x190.png 300w, https:\/\/www.creatis.insa-lyon.fr\/~grenier\/wp-content\/uploads\/PyCharm_Prj1-768x487.png 768w\" sizes=\"auto, (max-width: 784px) 100vw, 784px\" \/><figcaption>clic on &#8220;+ Create a New Project&#8221;<\/figcaption><\/figure>\n\n\n\n<p>Then select a folder containing the code (you can use the directory where the zip files have been deflated)<\/p>\n\n\n\n<figure class=\"wp-block-image size-large wp-duotone-default-filter\"><img loading=\"lazy\" decoding=\"async\" width=\"779\" height=\"574\" src=\"https:\/\/www.creatis.insa-lyon.fr\/~grenier\/wp-content\/uploads\/PyCharm_Prj_2.png\" alt=\"\" class=\"wp-image-401\" srcset=\"https:\/\/www.creatis.insa-lyon.fr\/~grenier\/wp-content\/uploads\/PyCharm_Prj_2.png 779w, https:\/\/www.creatis.insa-lyon.fr\/~grenier\/wp-content\/uploads\/PyCharm_Prj_2-300x221.png 300w, https:\/\/www.creatis.insa-lyon.fr\/~grenier\/wp-content\/uploads\/PyCharm_Prj_2-768x566.png 768w\" sizes=\"auto, (max-width: 779px) 100vw, 779px\" \/><\/figure>\n\n\n\n<p>Now, select the conda environment created. It is an &#8220;Existing Interpreter&#8221;. Then you will have to point out the correct interpreter (not this screenshot, the coming one)<\/p>\n\n\n\n<figure class=\"wp-block-image size-large wp-duotone-default-filter\"><img loading=\"lazy\" decoding=\"async\" width=\"784\" height=\"498\" src=\"https:\/\/www.creatis.insa-lyon.fr\/~grenier\/wp-content\/uploads\/PyCharm_Prj_3.png\" alt=\"\" class=\"wp-image-403\" srcset=\"https:\/\/www.creatis.insa-lyon.fr\/~grenier\/wp-content\/uploads\/PyCharm_Prj_3.png 784w, https:\/\/www.creatis.insa-lyon.fr\/~grenier\/wp-content\/uploads\/PyCharm_Prj_3-300x191.png 300w, https:\/\/www.creatis.insa-lyon.fr\/~grenier\/wp-content\/uploads\/PyCharm_Prj_3-768x488.png 768w\" sizes=\"auto, (max-width: 784px) 100vw, 784px\" \/><\/figure>\n\n\n\n<p>To select an<em> existing interpreter<\/em>, first go into the &#8220;conda environment&#8221; and then select the interpreter by pointing the python of your conda environment (ie :<code> \/tmp\/tgrenier\/conda_TF1-cuda\/bin\/python<\/code> )<\/p>\n\n\n\n<figure class=\"wp-block-image size-large wp-duotone-default-filter\"><img loading=\"lazy\" decoding=\"async\" width=\"857\" height=\"613\" src=\"https:\/\/www.creatis.insa-lyon.fr\/~grenier\/wp-content\/uploads\/PyCharm_Prj_4-1.png\" alt=\"\" class=\"wp-image-404\" srcset=\"https:\/\/www.creatis.insa-lyon.fr\/~grenier\/wp-content\/uploads\/PyCharm_Prj_4-1.png 857w, https:\/\/www.creatis.insa-lyon.fr\/~grenier\/wp-content\/uploads\/PyCharm_Prj_4-1-300x215.png 300w, https:\/\/www.creatis.insa-lyon.fr\/~grenier\/wp-content\/uploads\/PyCharm_Prj_4-1-768x549.png 768w\" sizes=\"auto, (max-width: 857px) 100vw, 857px\" \/><\/figure>\n\n\n\n<p>And validate everything. You will obtain a fully working pycharm project. <\/p>\n\n\n\n<p>Now, you can run (or debug) a python file :<\/p>\n\n\n\n<figure class=\"wp-block-image size-large wp-duotone-default-filter\"><img loading=\"lazy\" decoding=\"async\" width=\"912\" height=\"543\" src=\"https:\/\/www.creatis.insa-lyon.fr\/~grenier\/wp-content\/uploads\/PyCharm_Prj_5.png\" alt=\"\" class=\"wp-image-407\" srcset=\"https:\/\/www.creatis.insa-lyon.fr\/~grenier\/wp-content\/uploads\/PyCharm_Prj_5.png 912w, https:\/\/www.creatis.insa-lyon.fr\/~grenier\/wp-content\/uploads\/PyCharm_Prj_5-300x179.png 300w, https:\/\/www.creatis.insa-lyon.fr\/~grenier\/wp-content\/uploads\/PyCharm_Prj_5-768x457.png 768w\" sizes=\"auto, (max-width: 912px) 100vw, 912px\" \/><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>Here are some slides to start with images and fundamental processing (pdf) There are also some funny basic practices using python. You may need to set up a working conda environment. For editing your py files, spyder or PyCharm are nice and efficient python IDEs. Activate a conda environment To create an environment with all [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"templates\/template-full-width.php","format":"standard","meta":{"footnotes":""},"categories":[5,18,6,4,1],"tags":[],"class_list":["post-389","post","type-post","status-publish","format-standard","hentry","category-computer-science","category-deep-learning-teaching","category-image-processing","category-teaching","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/www.creatis.insa-lyon.fr\/~grenier\/index.php?rest_route=\/wp\/v2\/posts\/389","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.creatis.insa-lyon.fr\/~grenier\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.creatis.insa-lyon.fr\/~grenier\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.creatis.insa-lyon.fr\/~grenier\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.creatis.insa-lyon.fr\/~grenier\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=389"}],"version-history":[{"count":15,"href":"https:\/\/www.creatis.insa-lyon.fr\/~grenier\/index.php?rest_route=\/wp\/v2\/posts\/389\/revisions"}],"predecessor-version":[{"id":507,"href":"https:\/\/www.creatis.insa-lyon.fr\/~grenier\/index.php?rest_route=\/wp\/v2\/posts\/389\/revisions\/507"}],"wp:attachment":[{"href":"https:\/\/www.creatis.insa-lyon.fr\/~grenier\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=389"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.creatis.insa-lyon.fr\/~grenier\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=389"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.creatis.insa-lyon.fr\/~grenier\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=389"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}