{"id":3592,"date":"2024-09-02T21:48:58","date_gmt":"2024-09-02T21:48:58","guid":{"rendered":"https:\/\/workhouse.sweetdishy.com\/?p=3592"},"modified":"2024-09-02T21:48:58","modified_gmt":"2024-09-02T21:48:58","slug":"understanding-image-pixels","status":"publish","type":"post","link":"https:\/\/workhouse.sweetdishy.com\/index.php\/2024\/09\/02\/understanding-image-pixels\/","title":{"rendered":"\u00a0Understanding Image Pixels"},"content":{"rendered":"\n<p id=\"Arti00006903\">Pictures displayed on a digital screen like a monitor or are simply in digital form are made up of thousands of tiny dots also known as pixels.<\/p>\n\n\n\n<p id=\"Arti00006904\">The word \u2018pixel\u2019 means \u2018picture element\u2019 indicating one single dot. In coloured images, pixels of different colors are arranged alongside each other to represent different shades of colors. This means that every digitized image is broken up into tiny blocks with a description of a color value at each point.\u00a0Figure 6.10\u00a0shows a pixelated black and white image of an army officer.<\/p>\n\n\n\n<p id=\"Arti00006905\">&nbsp;<\/p>\n\n\n\n<p id=\"Arti00006907\">Future of CV: Computer vision applications are growing at a very fast pace. Corporate giants like Google, Facebook, Apple and Microsoft are investing huge amounts in computer vision.<\/p>\n\n\n\n<p id=\"Arti00006908\">In a coloured image, each square, or pixel stores the value of just one of the three prime colours of red, green and blue (RGB).<\/p>\n\n\n\n<p id=\"Arti00006909\">As seen in\u00a0Fig. 6.10, an image viewed on a screen is made up of pixels. Each pixel comprises three strips of red, green and blue. The intensity of these strips is changed to represent a colour. To be more specific, each pixel contains a series of numbers or digits, hence the term \u2018digital\u2019. These numbers dictate the colour values seen. However, when we see an image, we do not see these digits, we just see the colour that they represent.<\/p>\n\n\n\n<p id=\"Arti00006910\">&nbsp;<\/p>\n\n\n\n<p id=\"Arti00006912\">Like RGB, CMYK is an image format that stores four values for each pixel. The pixel stores values of cyan, magenta, yellow, black.<\/p>\n\n\n\n<p id=\"Arti00006913\">Figure 6.10\u00a0shows the digits stored in each pixel in a black and white image as well as in a coloured image. The black-and-white image stores a \u20180\u2019 for a black pixel and a \u20181\u2019 for white pixel. This is known as a \u2018bitmap\u2019 image as it only requires one bit of information, 0 or 1, to describe the colour. But such a representation can be used with only two tones: black and white. Not even shades of grey can be represented using a bitmap. To represent more colours (grey shades), we usually use greyscale images that use a number from 0\u2013255 to indicate the specific colour. A greyscale image can represent total 256 different colours.<\/p>\n\n\n\n<p><a><\/a><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/learning.oreilly.com\/api\/v2\/epubs\/urn:orm:book:9789357053778\/files\/images\/img_p334.png\" alt=\"images\" width=\"597\" height=\"431\"><\/p>\n\n\n\n<p id=\"Arti00006916\"><a><\/a><strong>FIGURE 6.10<\/strong>&nbsp;An Image is a composed of pixels<\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"Arti00006917\"><a><\/a><strong>6.9.1 What is Resolution?<\/strong><\/h4>\n\n\n\n<p id=\"Arti00006918\">Resolution refers to the detail that an image holds. Higher the resolution, the more details the image stores and vice versa. More details mean better picture clarity. Correspondingly, less details mean less clarity. Image resolution is often measured in Dots Per Inch (DPI) and Pixels Per Inch (PPI).<\/p>\n\n\n\n<p id=\"Arti00006919\">There are two conventions of specifying resolution. The first convention express resolution as the number of pixels in the width (a horizontal row) X number of pixels in height (a vertical column) of the screen. That is, if we say the resolution of the&nbsp;<strong>computer monitor is 1280 X 1024<\/strong>, there are 1280 pixels in a row from left-to-right and 1024 pixels from top to bottom.<\/p>\n\n\n\n<p id=\"Arti00006920\">The second convention expresses the number of pixels as a single number, like a&nbsp;<strong>5 mega pixel camera<\/strong>&nbsp;which means a camera having 5 million pixels (mega means millions). In our previous example, we had 1280 X 1024 = 1,310,720, or 1.31 megapixels.<\/p>\n\n\n\n<p id=\"Arti00006921\">Don\u2019t get confused between image size and image resolution. Image s<strong>ize<\/strong>&nbsp;is the dimension specified in length and width of an image. It is usually measured in pixels (px). But image&nbsp;<strong>resolution<\/strong>, or dpi, is the number of dots per square inch of an image when it is printed. While image&nbsp;<strong>size<\/strong>&nbsp;specifies how large the image will be viewed on monitors,&nbsp;<strong>resolution<\/strong>&nbsp;reflects printer quality.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"Arti00006922\"><a><\/a><a><\/a><strong>6.9.2 DPI and PPI<\/strong><\/h4>\n\n\n\n<p id=\"Arti00006923\">DPI refers to the number of dots per inch on a printed image, whereas PPI refers to number of pixels per inch in a digital image. So, technically, it\u2019s PPI in a soft copy and DPI in a hardcopy of the image. A 300 PPI image will also be a 300 DPI image. Both the units refer to the number of units within a square inch of an image.<\/p>\n\n\n\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/learning.oreilly.com\/api\/v2\/epubs\/urn:orm:book:9789357053778\/files\/images\/img_p335.png\" alt=\"images\" width=\"475\" height=\"421\"><\/p>\n\n\n\n<p><em>Credit<\/em>: ZinaidaSopina \/ Shutterstock<\/p>\n\n\n\n<p id=\"Arti00006927\"><a><\/a><strong>FIGURE 6.11<\/strong>&nbsp;Quality of an image depends on DPI<\/p>\n\n\n\n<p id=\"Arti00006928\">Figure 6.11\u00a0clarifies that we see a pixel in greater detail when we have a greater number of pixels in an inch.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Pictures displayed on a digital screen like a monitor or are simply in digital form are made up of thousands of tiny dots also known as pixels. The word \u2018pixel\u2019 means \u2018picture element\u2019 indicating one single dot. In coloured images, pixels of different colors are arranged alongside each other to represent different shades of colors. [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":3334,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[459],"tags":[],"class_list":["post-3592","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-computer-vision-cv-intermediate-for-ai"],"jetpack_featured_media_url":"https:\/\/workhouse.sweetdishy.com\/wp-content\/uploads\/2024\/08\/download-1-3.jpeg","_links":{"self":[{"href":"https:\/\/workhouse.sweetdishy.com\/index.php\/wp-json\/wp\/v2\/posts\/3592","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/workhouse.sweetdishy.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/workhouse.sweetdishy.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/workhouse.sweetdishy.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/workhouse.sweetdishy.com\/index.php\/wp-json\/wp\/v2\/comments?post=3592"}],"version-history":[{"count":1,"href":"https:\/\/workhouse.sweetdishy.com\/index.php\/wp-json\/wp\/v2\/posts\/3592\/revisions"}],"predecessor-version":[{"id":3593,"href":"https:\/\/workhouse.sweetdishy.com\/index.php\/wp-json\/wp\/v2\/posts\/3592\/revisions\/3593"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/workhouse.sweetdishy.com\/index.php\/wp-json\/wp\/v2\/media\/3334"}],"wp:attachment":[{"href":"https:\/\/workhouse.sweetdishy.com\/index.php\/wp-json\/wp\/v2\/media?parent=3592"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/workhouse.sweetdishy.com\/index.php\/wp-json\/wp\/v2\/categories?post=3592"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/workhouse.sweetdishy.com\/index.php\/wp-json\/wp\/v2\/tags?post=3592"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}