{"id":553,"date":"2024-12-04T02:50:40","date_gmt":"2024-12-04T02:50:40","guid":{"rendered":"https:\/\/binus.ac.id\/malang\/computer-science\/?p=553"},"modified":"2024-12-04T02:50:40","modified_gmt":"2024-12-04T02:50:40","slug":"how-to-extract-pixel-values-from-images-using-opencv","status":"publish","type":"post","link":"https:\/\/binus.ac.id\/malang\/computer-science\/2024\/12\/04\/how-to-extract-pixel-values-from-images-using-opencv\/","title":{"rendered":"How To Extract Pixel Values from Images Using OpenCV"},"content":{"rendered":"<figure id=\"attachment_554\" aria-describedby=\"figcaption_attachment_554\" class=\"wp-caption clear aligncenter\" itemscope itemtype=\"http:\/\/schema.org\/ImageObject\" style=\"width: 155px\"><img loading=\"lazy\" decoding=\"async\" itemprop=\"contentURL\" class=\"size-full wp-image-554\" src=\"http:\/\/binus.ac.id\/malang\/computer-science\/wp-content\/uploads\/sites\/7\/2024\/12\/Capture1-1.jpg\" alt=\"\" width=\"155\" height=\"206\" \/><figcaption id=\"figcaption_attachment_554\" class=\"wp-caption-text\" itemprop=\"description\">Figure 1. The official OpenCV logo<\/figcaption><\/figure>\n<p style=\"text-align: justify\"><span style=\"font-weight: 400\">OpenCV, short for Open Computer Vision (see Figure 1), is a widely used open-source library for computer vision, machine learning, and imaging applications. It provides a comprehensive set of functions and tools to carry out various operations on images and videos, such as reading and writing images.<\/span><\/p>\n<p style=\"text-align: justify\"><span style=\"font-weight: 400\">In this section we will discuss how OpenCV is used, the important information that OpenCV cannot be used by itself, and the additional programming language is needed such as Python programming language.<\/span><\/p>\n<p style=\"text-align: justify\"><span style=\"font-weight: 400\">For example, we have an image stored in the specific folder path in <\/span><b>D:\\lab_inside<\/b><span style=\"font-weight: 400\"> (see <\/span><i><span style=\"font-weight: 400\">Figure 2<\/span><\/i><span style=\"font-weight: 400\">). The image in this example is called <\/span><b>DSC02918.jpg<\/b><span style=\"font-weight: 400\"> and has a resolution of 1016 x 1816 pixels.<\/span><\/p>\n<figure id=\"attachment_555\" aria-describedby=\"figcaption_attachment_555\" class=\"wp-caption clear alignnone\" itemscope itemtype=\"http:\/\/schema.org\/ImageObject\" style=\"width: 250px\"><img loading=\"lazy\" decoding=\"async\" itemprop=\"contentURL\" class=\"size-medium wp-image-555\" src=\"http:\/\/binus.ac.id\/malang\/computer-science\/wp-content\/uploads\/sites\/7\/2024\/12\/Capture2-250x300.jpg\" alt=\"\" width=\"250\" height=\"300\" srcset=\"https:\/\/binus.ac.id\/malang\/computer-science\/wp-content\/uploads\/sites\/7\/2024\/12\/Capture2-250x300.jpg 250w, https:\/\/binus.ac.id\/malang\/computer-science\/wp-content\/uploads\/sites\/7\/2024\/12\/Capture2.jpg 325w\" sizes=\"auto, (max-width: 250px) 100vw, 250px\" \/><figcaption id=\"figcaption_attachment_555\" class=\"wp-caption-text\" itemprop=\"description\">Figure 2. The sample of images colour.<\/figcaption><\/figure>\n<p><span style=\"font-weight: 400\">To read the image file with the purpose to get each pixel from the image file can use the source code that is described below;<\/span><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone  wp-image-556\" src=\"http:\/\/binus.ac.id\/malang\/computer-science\/wp-content\/uploads\/sites\/7\/2024\/12\/Capture3-300x88.jpg\" alt=\"\" width=\"586\" height=\"172\" srcset=\"https:\/\/binus.ac.id\/malang\/computer-science\/wp-content\/uploads\/sites\/7\/2024\/12\/Capture3-300x88.jpg 300w, https:\/\/binus.ac.id\/malang\/computer-science\/wp-content\/uploads\/sites\/7\/2024\/12\/Capture3-480x140.jpg 480w, https:\/\/binus.ac.id\/malang\/computer-science\/wp-content\/uploads\/sites\/7\/2024\/12\/Capture3.jpg 667w\" sizes=\"auto, (max-width: 586px) 100vw, 586px\" \/><\/p>\n","protected":false},"excerpt":{"rendered":"<p>OpenCV, short for Open Computer Vision (see Figure 1), is a widely used open-source library for computer vision, machine learning, and imaging applications. It provides a comprehensive set of functions and tools to carry out various operations on images and videos, such as reading and writing images. In this section we will discuss how OpenCV [&hellip;]<\/p>\n","protected":false},"author":45,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5],"tags":[],"class_list":["post-553","post","type-post","status-publish","format-standard","hentry","category-articles"],"_links":{"self":[{"href":"https:\/\/binus.ac.id\/malang\/computer-science\/wp-json\/wp\/v2\/posts\/553","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/binus.ac.id\/malang\/computer-science\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/binus.ac.id\/malang\/computer-science\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/binus.ac.id\/malang\/computer-science\/wp-json\/wp\/v2\/users\/45"}],"replies":[{"embeddable":true,"href":"https:\/\/binus.ac.id\/malang\/computer-science\/wp-json\/wp\/v2\/comments?post=553"}],"version-history":[{"count":1,"href":"https:\/\/binus.ac.id\/malang\/computer-science\/wp-json\/wp\/v2\/posts\/553\/revisions"}],"predecessor-version":[{"id":557,"href":"https:\/\/binus.ac.id\/malang\/computer-science\/wp-json\/wp\/v2\/posts\/553\/revisions\/557"}],"wp:attachment":[{"href":"https:\/\/binus.ac.id\/malang\/computer-science\/wp-json\/wp\/v2\/media?parent=553"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/binus.ac.id\/malang\/computer-science\/wp-json\/wp\/v2\/categories?post=553"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/binus.ac.id\/malang\/computer-science\/wp-json\/wp\/v2\/tags?post=553"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}