{"id":17442,"date":"2021-10-29T13:56:00","date_gmt":"2021-10-29T08:26:00","guid":{"rendered":"https:\/\/www.mygreatlearning.com\/blog\/feature-extraction-in-image-processing\/"},"modified":"2024-09-03T17:26:18","modified_gmt":"2024-09-03T11:56:18","slug":"feature-extraction-in-image-processing","status":"publish","type":"post","link":"https:\/\/www.mygreatlearning.com\/blog\/feature-extraction-in-image-processing\/","title":{"rendered":"What is Feature Extraction? Feature Extraction in Image Processing"},"content":{"rendered":"\n<p>In real life, all the data we collect are in large amounts. To understand this data, we need a process. Manually, it is not possible to process them. Here's when the concept of feature extraction comes in.<\/p>\n\n\n\n<p>Suppose you want to work with some of the big machine learning projects or the coolest and most popular domains such as deep learning, where you can use images to make a project on object detection. Making projects on computer vision where you can work with thousands of interesting projects in the image data set. To work with them, you have to go for feature extraction, take up a <a href=\"https:\/\/www.mygreatlearning.com\/academy\/learn-for-free\/courses\/digital-image-processing\">digital image processing course<\/a> and learn image processing in Python which will make your life easy. Upskilling with the help of a free online course will help you understand the concepts clearly. <\/p>\n\n\n\n<p>So let's have a look at how we can use this technique in a real scenario.<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong><a href=\"#sh1\">What is feature extraction?<\/a><\/strong><\/li>\n\n\n\n<li><strong><a href=\"#sh2\">Why Feature extraction is useful?<\/a><\/strong><\/li>\n\n\n\n<li><strong><a href=\"#sh3\">Applications of feature extraction<\/a><\/strong><\/li>\n\n\n\n<li><strong><a href=\"#sh4\">How to Store Images in the Machine?<\/a><\/strong><\/li>\n\n\n\n<li><strong><a href=\"#sh4\">How to use Feature Extraction technique for Image Data: Features as Grayscale Pixel Values<\/a>\u00a0<\/strong><\/li>\n\n\n\n<li><strong><a href=\"#sh6\">How to extract features from Image Data: What is the Mean Pixel Value of Channels<\/a><\/strong><\/li>\n\n\n\n<li><strong><a href=\"#sh7\">Project Using Feature Extraction technique<\/a><\/strong><\/li>\n\n\n\n<li><strong><a href=\"#sh8\">Image feature detection using OpenCV<\/a><\/strong><\/li>\n<\/ol>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"what-is-feature-extraction\"><strong>What is Feature Extraction?<\/strong><\/h2>\n\n\n\n<p>Feature extraction is a part of the dimensionality reduction process, in which, an initial set of the raw data is divided and reduced to more manageable groups. So when you want to process it will be easier. The most important characteristic of these large data sets is that they have a large number of variables. These variables require a lot of computing resources to process. So Feature extraction helps to get the best feature from those big data sets by selecting and combining variables into features, thus, effectively reducing the amount of data. These features are easy to process, but still able to describe the actual data set with accuracy and originality.<\/p>\n\n\n\n<figure class=\"wp-block-embed is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio\"><div class=\"wp-block-embed__wrapper\">\n<iframe title=\"Image Processing with AWS | AWS Machine Learning and Artificial Intelligence | Great Learning\" width=\"500\" height=\"281\" src=\"https:\/\/www.youtube.com\/embed\/6F3QMpNpEdM?feature=oembed\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" referrerpolicy=\"strict-origin-when-cross-origin\" allowfullscreen><\/iframe>\n<\/div><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"why-feature-extraction-is-useful\"><strong>Why Feature Extraction is Useful?<\/strong><\/h2>\n\n\n\n<p>The technique of extracting the features is useful when you have a large data set and need to reduce the number of resources without losing any important or relevant information. Feature extraction helps to reduce the amount of redundant data from the data set.<\/p>\n\n\n\n<p>In the end, the reduction of the data helps to build the model with less machine effort and also increases the speed of learning and generalization steps in the&nbsp;machine learning&nbsp;process.<\/p>\n\n\n\n    <div class=\"courses-cta-container\">\n        <div class=\"courses-cta-card\">\n            <div class=\"courses-cta-header\">\n                <div class=\"courses-learn-icon\"><\/div>\n                <span class=\"courses-learn-text\">Master AI with Microsoft<\/span>\n            <\/div>\n            <p class=\"courses-cta-title\">\n                <a href=\"https:\/\/www.mygreatlearning.com\/microsoft-ai-professional-online\" class=\"courses-cta-title-link\">Master AI with Microsoft AI Professional Program<\/a>\n            <\/p>\n            <p class=\"courses-cta-description\">Gain industry-ready AI skills through real-world projects and earn a Microsoft-recognized certification to elevate your tech career.<\/p>\n            <div class=\"courses-cta-stats\">\n                <div class=\"courses-stat-item\">\n                    <div class=\"courses-stat-icon courses-user-icon\"><\/div>\n                    <span>Duration: 4 months<\/span>\n                <\/div>\n                <div class=\"courses-stat-item\">\n                    <div class=\"courses-stat-icon courses-star-icon\"><\/div>\n                    <span>15+ Live Sessions<\/span>\n                <\/div>\n            <\/div>\n            <a href=\"https:\/\/www.mygreatlearning.com\/microsoft-ai-professional-online\" class=\"courses-cta-button\">\n                Start Learning today\n                <div class=\"courses-arrow-icon\"><\/div>\n            <\/a>\n        <\/div>\n    <\/div>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"applications-of-feature-extraction\"><strong>Applications of Feature Extraction<\/strong><\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Bag of Words- <\/strong><a aria-label=\"Bag-of-Words (opens in a new tab)\" href=\"https:\/\/www.mygreatlearning.com\/blog\/bag-of-words\/\" target=\"_blank\" rel=\"noreferrer noopener\">Bag-of-Words<\/a>\u00a0is the<strong> <\/strong>most used technique for natural language processing. In this process they extract the words or the features from a sentence, document, website, etc. and then they classify\u00a0them into the frequency of use. So in this whole process feature extraction is one of the most important parts.<\/li>\n\n\n\n<li><strong>Image Processing<\/strong>\u00a0\u2013Image processing is one of the best and most interesting domain. In this domain basically you will start playing with your images in order to understand them. So here we use many many techniques which includes feature extraction as well and algorithms to detect features such as shaped, edges, or motion in a digital image or video to process them.<\/li>\n<\/ul>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Auto-encoders:\u00a0<\/strong>The main\u00a0 purpose of the\u00a0<a aria-label=\"auto-encoders (opens in a new tab)\" href=\"https:\/\/www.mygreatlearning.com\/blog\/autoencoder\/\" target=\"_blank\" rel=\"noreferrer noopener\">auto-encoders<\/a>\u00a0is\u00a0efficient data coding which is unsupervised in nature. this process comes under unsupervised learning\u00a0. So Feature extraction procedure is applicable here to identify the key features from the data to code by learning from the coding of the original data set to derive new ones.<\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-embed is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio\"><div class=\"wp-block-embed__wrapper\">\n<iframe title=\"Feature Extraction in 2D color Images (Concept of Search by Image) || Gridowit\" width=\"500\" height=\"281\" src=\"https:\/\/www.youtube.com\/embed\/lv8-YgWYtU4?feature=oembed\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" referrerpolicy=\"strict-origin-when-cross-origin\" allowfullscreen><\/iframe>\n<\/div><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"how-to-store-images-in-the-machine\"><strong>How to Store Images in the Machine?<\/strong><\/h2>\n\n\n\n<p>So in this section, we will start from scratch. For the first thing, we need to understand how a machine can read and store images. Loading the image, reading them, and then process them through the machine is difficult because the machine does not have eyes like us.<\/p>\n\n\n\n<p>Let's have a look at how a machine understands an image.<\/p>\n\n\n\n<p>Machines see any images in the form of a matrix of numbers. The size of this matrix actually depends on the number of pixels of the input image.<\/p>\n\n\n\n<p>What is a pixel?<\/p>\n\n\n\n<p>The Pixel Values for each of the pixels stands for or describes how bright that pixel is, and what color it should be. So In the simplest case of the binary images, the pixel value is a 1-bit number indicating either foreground or background.<\/p>\n\n\n\n<p><strong>So pixels are the numbers or the pixel values which&nbsp;denote the intensity or brightness of the pixel.<\/strong><\/p>\n\n\n\n<p>Smaller numbers that are closer to zero helps to represent black, and the larger numbers which are closer to 255 denote white.<\/p>\n\n\n\n<p>So this is the concept of pixels and how the machine sees the images without eyes through the numbers.<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter\"><img decoding=\"async\" src=\"https:\/\/www.mygreatlearning.com\/academy\/career\/wp-content\/uploads\/2020\/07\/fe-300x138.png\" alt=\"feature extraction in Image processing\" class=\"wp-image-34234\"\/><\/figure>\n\n\n\n<p>The dimensions of the image are 28 x 28. And if you want to check then by counting the number of pixels you can verify.<\/p>\n\n\n\n<p>But, for the case of a colored image, we have&nbsp; three Matrices or the channels<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Red,<\/li>\n\n\n\n<li>Green<\/li>\n\n\n\n<li>and Blue.<\/li>\n<\/ol>\n\n\n\n<p>So in these three matrices, each of the matrix has values between 0-255 which represents the intensity of the color of that pixel.<\/p>\n\n\n\n<p>If you have a colored image like the dog image we have in the above image on the left. so being a human you have eyes so you can see and can say it is a dog-colored image. But how a computer can understand it is the colored or black and white image?<\/p>\n\n\n\n<p>So you can see we also have three matrices that represent the channel of RGB - (for the three color channels \u2013 Red, Green, and Blue) On the right, we have three matrices. These three channels are superimposed and used to form a colored image.&nbsp; So this is how a computer can differentiate between the images.<\/p>\n\n\n\n<p>Let's have an example of how we can execute the code using Python<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: python; title: ; notranslate\" title=\"\">\nimport pandas as pd\nimport numpy as np\nimport matplotlib.pyplot as plt\n%matplotlib inline\n\nfrom skimage.io import imread, imshow\nimage = imread(&#039;\/content\/sample_image.png&#039;, as_gray=True)\nimshow(image)\n<\/pre><\/div>\n\n\n<figure class=\"wp-block-image aligncenter\"><img decoding=\"async\" src=\"https:\/\/www.mygreatlearning.com\/academy\/career\/wp-content\/uploads\/2020\/07\/sample_image-300x298.png\" alt=\"feature extraction in Image processing\" class=\"wp-image-34236\"\/><\/figure>\n\n\n\n<p><strong>Check the shape of the image:<\/strong><\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: python; title: ; notranslate\" title=\"\">\n#check the image shape \nprint(image.shape) \n\nprint(image)\n<\/pre><\/div>\n\n\n<p>Image shape: (1480, 1490)<\/p>\n\n\n\n<p>Array:<\/p>\n\n\n\n<p>[[0.96862745 0.96862745 0.79215686 ... 0.96862745 1. 1. ] [0.96862745 0.96862745 0.79215686 ... 0.96862745 1. 1. ] [0.79215686 0.79215686 0. ... 0.79215686 1. 1. ] ... [0.89019608 0.89019608 0. ... 0.89019608 1. 1. ] [0.8745098 0.8745098 0. ... 0.8745098 1. 1. ] [0.8745098 0.8745098 0. ... 0.8745098 1. 1. ]]<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"how-to-use-feature-extraction-technique-for-image-data-features-as-grayscale-pixel-value\">How to use Feature Extraction technique for Image Data: Features as Grayscale Pixel Value<\/h2>\n\n\n\n<p>If we use&nbsp; the same example as our image which we use above in the section\u2013 the dimension of the image is 28 x 28 right? But can you guess the number of features for this image?<\/p>\n\n\n\n<p>The number of features is&nbsp; same as the number of pixels so&nbsp; that the number will be 784<\/p>\n\n\n\n<p>So now I have one more important question \u2013<\/p>\n\n\n\n<p>how do we declare&nbsp; these 784 pixels as features of this image? Do you ever think about that?<\/p>\n\n\n\n<p>So the solution is, you just can simply append every pixel value one after the other to generate a feature vector for the image. Let's visualize that,<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter\"><img decoding=\"async\" src=\"https:\/\/www.mygreatlearning.com\/academy\/career\/wp-content\/uploads\/2020\/07\/fe-4-300x111.png\" alt=\"\" class=\"wp-image-34237\"\/><\/figure>\n\n\n\n<p>Now let's have a look at the coloured image,<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: python; title: ; notranslate\" title=\"\">\nimage = imread(&#039;\/content\/pexels-photo-1108099.jpeg&#039;)\nimshow(image)\n<\/pre><\/div>\n\n\n<figure class=\"wp-block-image aligncenter\"><img decoding=\"async\" src=\"https:\/\/www.mygreatlearning.com\/academy\/career\/wp-content\/uploads\/2020\/07\/download-4-300x229.png\" alt=\"\" class=\"wp-image-34238\"\/><\/figure>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nprint(image.shape)\n<\/pre><\/div>\n\n\n<p>(375, 500, 3)<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: python; title: ; notranslate\" title=\"\">\nimage\n<\/pre><\/div>\n\n\n<p>array([[[ 74, 95, 56], [ 74, 95, 56], [ 75, 96, 57], ..., [ 73, 93, 56], [ 73, 93, 56], [ 72, 92, 55]], [[ 74, 95, 56], [ 74, 95, 56], [ 75, 96, 57], ..., [ 73, 93, 56], [ 73, 93, 56], [ 72, 92, 55]], [[ 74, 95, 56], [ 75, 96, 57], [ 75, 96, 57], ..., [ 73, 93, 56], [ 73, 93, 56], [ 73, 93, 56]], ..., [[ 71, 85, 50], [ 72, 83, 49], [ 70, 80, 46], ..., [106, 93, 51], [108, 95, 53], [110, 97, 55]], [[ 72, 86, 51], [ 72, 83, 49], [ 71, 81, 47], ..., [109, 90, 47], [113, 94, 51], [116, 97, 54]], [[ 73, 87, 52], [ 73, 84, 50], [ 72, 82, 48], ..., [113, 89, 45], [117, 93, 49], [121, 97, 53]]], dtype=uint8)<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: python; title: ; notranslate\" title=\"\">\nimage = imread(&#039;\/content\/pexels-photo-1108099.jpeg&#039;, as_gray=True) \nimage.shape, imshow(image)\n<\/pre><\/div>\n\n\n<figure class=\"wp-block-image aligncenter\"><img decoding=\"async\" src=\"https:\/\/www.mygreatlearning.com\/academy\/career\/wp-content\/uploads\/2020\/07\/download-5-300x229.png\" alt=\"feature extraction in Image processing\" class=\"wp-image-34239\"\/><\/figure>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nprint(image.shape)\n<\/pre><\/div>\n\n\n<p>(375, 500)<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: python; title: ; notranslate\" title=\"\">\nimage\n<\/pre><\/div>\n\n\n<p>array([[0.34402196, 0.34402196, 0.34794353, ..., 0.33757765, 0.33757765, 0.33365608], [0.34402196, 0.34402196, 0.34794353, ..., 0.33757765, 0.33757765, 0.33365608], [0.34402196, 0.34794353, 0.34794353, ..., 0.33757765, 0.33757765, 0.33757765], ..., [0.31177059, 0.3067102 , 0.29577882, ..., 0.36366392, 0.37150706, 0.3793502 ], [0.31569216, 0.3067102 , 0.29970039, ..., 0.35661647, 0.37230275, 0.38406745], [0.31961373, 0.31063176, 0.30362196, ..., 0.35657882, 0.3722651 , 0.38795137]])<\/p>\n\n\n\n<p>The image shape for this image is&nbsp; 375 x 500. So, the number of features will be&nbsp; 187500.<\/p>\n\n\n\n<p>o now if you want to change the shape of the image that is also can be done by using the&nbsp;<em>reshape<\/em>&nbsp;function from NumPy where we specify the dimension of the image:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: python; title: ; notranslate\" title=\"\">\n#Find the pixel features\nfeature = np.reshape(image, (375*500))\nfeature.shape\n<\/pre><\/div>\n\n\n<p>(187500,)<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: python; title: ; notranslate\" title=\"\">\nfeatures\n<\/pre><\/div>\n\n\n<p>array([0.34402196, 0.34402196, 0.34794353, ..., 0.35657882, 0.3722651 , 0.38795137])<\/p>\n\n\n\n    <div class=\"courses-cta-container\">\n        <div class=\"courses-cta-card\">\n            <div class=\"courses-cta-header\">\n                <div class=\"courses-learn-icon\"><\/div>\n                <span class=\"courses-learn-text\">Texas McCombs, UT Austin<\/span>\n            <\/div>\n            <p class=\"courses-cta-title\">\n                <a href=\"https:\/\/www.mygreatlearning.com\/pg-program-artificial-intelligence-course\" class=\"courses-cta-title-link\">PG Program in AI &amp; Machine Learning<\/a>\n            <\/p>\n            <p class=\"courses-cta-description\">Master AI with hands-on projects, expert mentorship, and a prestigious certificate from UT Austin and Great Lakes Executive Learning.<\/p>\n            <div class=\"courses-cta-stats\">\n                <div class=\"courses-stat-item\">\n                    <div class=\"courses-stat-icon courses-user-icon\"><\/div>\n                    <span>Duration: 12 months<\/span>\n                <\/div>\n                <div class=\"courses-stat-item\">\n                    <div class=\"courses-stat-icon courses-star-icon\"><\/div>\n                    <span>Ratings: 4.72<\/span>\n                <\/div>\n            <\/div>\n            <a href=\"https:\/\/www.mygreatlearning.com\/pg-program-artificial-intelligence-course\" class=\"courses-cta-button\">\n                Start Learning today\n                <div class=\"courses-arrow-icon\"><\/div>\n            <\/a>\n        <\/div>\n    <\/div>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"how-to-extract-features-from-image-data-what-is-the-mean-pixel-value-in-channel\">How to extract features from Image Data: What is the Mean pixel value in channel?<\/h2>\n\n\n\n<p>So here we will start with reading our coloured image. Here we did not us the parameter \"<em>as_gray = True\u2019<\/em><\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: python; title: ; notranslate\" title=\"\">\nimage = imread(&#039;\/content\/pexels-photo-1108099.jpeg&#039;)\nimshow(image)\n<\/pre><\/div>\n\n\n<figure class=\"wp-block-image aligncenter\"><img decoding=\"async\" src=\"https:\/\/www.mygreatlearning.com\/academy\/career\/wp-content\/uploads\/2020\/07\/download-4-300x229.png\" alt=\"feature extraction in Image processing\" class=\"wp-image-34238\"\/><\/figure>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: python; title: ; notranslate\" title=\"\">\nprint(image.shape)\n<\/pre><\/div>\n\n\n<p>(375, 500, 3)<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: python; title: ; notranslate\" title=\"\">\nimage\n<\/pre><\/div>\n\n\n<p>array([[[ 74, 95, 56], [ 74, 95, 56], [ 75, 96, 57], ..., [ 73, 93, 56], [ 73, 93, 56], [ 72, 92, 55]], [[ 74, 95, 56], [ 74, 95, 56], [ 75, 96, 57], ..., [ 73, 93, 56], [ 73, 93, 56], [ 72, 92, 55]], [[ 74, 95, 56], [ 75, 96, 57], [ 75, 96, 57], ..., [ 73, 93, 56], [ 73, 93, 56], [ 73, 93, 56]], ..., [[ 71, 85, 50], [ 72, 83, 49], [ 70, 80, 46], ..., [106, 93, 51], [108, 95, 53], [110, 97, 55]], [[ 72, 86, 51], [ 72, 83, 49], [ 71, 81, 47], ..., [109, 90, 47], [113, 94, 51], [116, 97, 54]], [[ 73, 87, 52], [ 73, 84, 50], [ 72, 82, 48], ..., [113, 89, 45], [117, 93, 49], [121, 97, 53]]], dtype=uint8)<\/p>\n\n\n\n<p>For this scenario the image has a dimension (375,500,3). This three represents the RGB value as well as the number of channels. Now we will use the previous method to create the features.<\/p>\n\n\n\n<p>The total number of features will be for this case 375*500*3 = 562500<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter\"><img decoding=\"async\" src=\"https:\/\/www.mygreatlearning.com\/academy\/career\/wp-content\/uploads\/2020\/07\/fe6-300x161.png\" alt=\"\" class=\"wp-image-34240\"\/><\/figure>\n\n\n\n<p>From the past, we are all aware that, the number of features remains the same. In this case, the pixel values from all three channels of the image will be multiplied.<\/p>\n\n\n\n<p>Now we will implement this using Python:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: python; title: ; notranslate\" title=\"\">\nimage = imread(&#039;\/content\/pexels-photo-1108099.jpeg&#039;)\nfeature_matrix_image = np.zeros((375,500)) \nfeature_matrix_image\n<\/pre><\/div>\n\n\n<p>array([[0., 0., 0., ..., 0., 0., 0.], [0., 0., 0., ..., 0., 0., 0.], [0., 0., 0., ..., 0., 0., 0.], ..., [0., 0., 0., ..., 0., 0., 0.], [0., 0., 0., ..., 0., 0., 0.], [0., 0., 0., ..., 0., 0., 0.]])<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: python; title: ; notranslate\" title=\"\">\nfeature_matrix_image.shape\n<\/pre><\/div>\n\n\n<p>(375, 500)<\/p>\n\n\n\n<p>In this coloured image has a 3D matrix of dimension (375*500 * 3) where 375 denotes the height, 500 stands for the width and 3 is the number of channels. In order to&nbsp; get the average pixel values for the image, we will use a&nbsp;<em>for<\/em>&nbsp;loop:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: python; title: ; notranslate\" title=\"\">\nfor i in range(0,image.shape&#x5B;0]):\n\n    for j in range(0,image.shape&#x5B;1]):\n\n        feature_matrix_image&#x5B;i]&#x5B;j] = ((int(image&#x5B;i,j,0]) + int(image&#x5B;i,j,1]) + int(image&#x5B;i,j,2]))\/3)\n<\/pre><\/div>\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: python; title: ; notranslate\" title=\"\">\nfeature_matrix_image\n<\/pre><\/div>\n\n\n<p>array([[75. , 75. , 76. , ..., 74. , 74. , 73. ], [75. , 75. , 76. , ..., 74. , 74. , 73. ], [75. , 76. , 76. , ..., 74. , 74. , 74. ], ..., [68.66666667, 68. , 65.33333333, ..., 83.33333333, 85.33333333, 87.33333333], [69.66666667, 68. , 66.33333333, ..., 82. , 86. , 89. ], [70.66666667, 69. , 67.33333333, ..., 82.33333333, 86.33333333, 90.33333333]])<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: python; title: ; notranslate\" title=\"\">\nfeature_matrix_image.shape\n<\/pre><\/div>\n\n\n<p>(375, 500)<\/p>\n\n\n\n<p>Now we will make a new matrix that will have the same height and width but only 1 channel.<\/p>\n\n\n\n<p>To convert the matrix into a 1D array we will use the Numpy library,<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: python; title: ; notranslate\" title=\"\">\nfeature_sample = np.reshape(feature_matrix_image, (375*500)) \n\nfeature_sample\n<\/pre><\/div>\n\n\n<p>array([75. , 75. , 76. , ..., 82.33333333, 86.33333333, 90.33333333])<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: python; title: ; notranslate\" title=\"\">\nfeature_sample.shape\n<\/pre><\/div>\n\n\n<p>(187500,)<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"project-using-feature-extraction-technique\">Project Using Feature Extraction technique<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"importing-an-image\"><strong>Importing an Image<\/strong><\/h3>\n\n\n\n<p>To import an image we can use Python pre-defined libraries<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: python; title: ; notranslate\" title=\"\">\nimport pandas as pd\n\nimport numpy as np\n\nimport matplotlib.pyplot as plt\n\n%matplotlib inline\n\nfrom skimage.io import imread, imshow\n\nimage = imread(&quot;\/content\/pexels-photo-1108099.jpeg&quot;)\n\nimshow(image)\n<\/pre><\/div>\n\n\n<figure class=\"wp-block-image aligncenter\"><img decoding=\"async\" src=\"https:\/\/www.mygreatlearning.com\/academy\/career\/wp-content\/uploads\/2020\/07\/download-4-300x229.png\" alt=\"feature extraction in Image processing\" class=\"wp-image-34238\"\/><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"introduction-to-opencv\"><strong>&nbsp;Introduction to OpenCV:<\/strong><\/h3>\n\n\n\n<p>There are some predefined packages and libraries are there to make our life simple.&nbsp;<\/p>\n\n\n\n<p>One of the most important and popular libraries is Opencv. It helps us to develop a system that can process images and real-time video using computer vision. OpenCv focused on image processing, real-time video capturing to detect faces and objects.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"background-of-opencv\"><strong>Background of OpenCV:<\/strong><\/h2>\n\n\n\n<p><a href=\"https:\/\/opencv.org\/\" rel=\"noreferrer noopener nofollow\" target=\"_blank\">OpenCV<\/a> was invented by&nbsp; Intel in 1999 by <strong>Gary Bradsky<\/strong>. The first release was in the year 2000. OpenCV stands for <strong>Open Source Computer Vision Library<\/strong>. This Library is based on optimized C\/C++ and it supports Java and Python along with C++ through interfaces.&nbsp;<\/p>\n\n\n\n<p>OpenCV is one of the most popular and successful libraries for computer vision and it has an immense number of users because of its simplicity, processing time and high demand in computer vision applications. OpenCV-Python is like a python wrapper around the C++ implementation. OpenCv has more than 2500 implemented algorithms that are freely available for commercial purpose as well.<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong> Applications of OpenCV:<\/strong><\/li>\n<\/ol>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Medical image analysis: We all know image processing in the medical industry is very popular.\u00a0\u00a0<\/li>\n<\/ul>\n\n\n\n<p>Let\u2019s take an example:<\/p>\n\n\n\n<p>Identify Brain tumour: Every single day almost thousands of patients are dealing with brain tumours. There are many software which are using OpenCv to detect the stage of the tumour using an image segmentation technique.<\/p>\n\n\n\n<p>One of the applications is RSIP Vision which builds a probability<strong> map<\/strong> to localize the tumour and uses deformable models to obtain the <strong>tumour boundaries with zero level energy.<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Object Detection: Detecting objects from the images is one of the most popular applications.<\/li>\n<\/ul>\n\n\n\n<p>Suppose,<\/p>\n\n\n\n<p>You want to detect a person sitting on a two-wheeler vehicle without a helmet which is equivalent to a defensible crime.<\/p>\n\n\n\n<p>So you can make a system that detects the person without a helmet and captures the vehicle number to add a penalty.<\/p>\n\n\n\n<p>There are many applications there using OpenCv which are really helpful and efficient. These applications are also taking us towards a more advanced world with less human effort.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"image-feature-detection-using-opencv\">Image feature Detection using OpenCV:<\/h2>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: python; title: ; notranslate\" title=\"\">\nimport cv2\n\nimport numpy as np \n\nimport cv2 \n\nimport matplotlib.pyplot as plt \n\n%matplotlib inline\nimg_load = cv2.imread(&quot;\/content\/toppng.com-service-dogs-tv-pg-dog-pictures-white-background-628x669.png&quot;)\nimg_load\n<\/pre><\/div>\n\n\n<p>array([[[ 76, 112, 71], [ 76, 112, 71], [ 76, 112, 71], ..., [ 76, 112, 71], [ 76, 112, 71], [ 76, 112, 71]], [[ 76, 112, 71], [ 76, 112, 71], [ 76, 112, 71], ..., [ 76, 112, 71], [ 76, 112, 71], [ 76, 112, 71]], [[ 76, 112, 71], [ 76, 112, 71], [ 76, 112, 71], ..., [ 76, 112, 71], [ 76, 112, 71], [ 76, 112, 71]], ..., [[ 76, 112, 71], [ 76, 112, 71], [ 76, 112, 71], ..., [ 21, 31, 41], [ 21, 31, 41], [ 21, 31, 41]], [[ 76, 112, 71], [ 76, 112, 71], [ 76, 112, 71], ..., [114, 168, 219], [ 21, 31, 41], [ 76, 112, 71]], [[ 76, 112, 71], [ 76, 112, 71], [ 76, 112, 71], ..., [110, 167, 221], [106, 155, 203], [ 76, 112, 71]]], dtype=uint8)<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: python; title: ; notranslate\" title=\"\">\nfrom google.colab.patches import cv2_imshow\n\ncv2_imshow(img_load)\n<\/pre><\/div>\n\n\n<figure class=\"wp-block-image aligncenter\"><img decoding=\"async\" src=\"https:\/\/www.mygreatlearning.com\/academy\/career\/wp-content\/uploads\/2020\/07\/download-6-1-282x300.png\" alt=\"\" class=\"wp-image-34246\"\/><\/figure>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: python; title: ; notranslate\" title=\"\">\nimg_load1 = cv2.cvtColor(img_load, cv2.COLOR_BGR2RGB)  # Convert from cv&#039;s BRG default color order to RGB\nimg_load1\n<\/pre><\/div>\n\n\n<p>array([[[ 71, 112, 76], [ 71, 112, 76], [ 71, 112, 76], ..., [ 71, 112, 76], [ 71, 112, 76], [ 71, 112, 76]], [[ 71, 112, 76], [ 71, 112, 76], [ 71, 112, 76], ..., [ 71, 112, 76], [ 71, 112, 76], [ 71, 112, 76]], [[ 71, 112, 76], [ 71, 112, 76], [ 71, 112, 76], ..., [ 71, 112, 76], [ 71, 112, 76], [ 71, 112, 76]], ..., [[ 71, 112, 76], [ 71, 112, 76], [ 71, 112, 76], ..., [ 41, 31, 21], [ 41, 31, 21], [ 41, 31, 21]], [[ 71, 112, 76], [ 71, 112, 76], [ 71, 112, 76], ..., [219, 168, 114], [ 41, 31, 21], [ 71, 112, 76]], [[ 71, 112, 76], [ 71, 112, 76], [ 71, 112, 76], ..., [221, 167, 110], [203, 155, 106], [ 71, 112, 76]]], dtype=uint8)<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: python; title: ; notranslate\" title=\"\">\ncv2_imshow(img_load1)\n<\/pre><\/div>\n\n\n<figure class=\"wp-block-image aligncenter\"><img decoding=\"async\" src=\"https:\/\/www.mygreatlearning.com\/academy\/career\/wp-content\/uploads\/2020\/07\/download-7-1-282x300.png\" alt=\"\" class=\"wp-image-34254\"\/><\/figure>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: python; title: ; notranslate\" title=\"\">\n#converting image to Gray scale \n\ngray_image = cv2.cvtColor(img_load,cv2.COLOR_BGR2GRAY)\n\n#plotting the grayscale image\n\ncv2_imshow(gray_image)\n<\/pre><\/div>\n\n\n<figure class=\"wp-block-image aligncenter\"><img decoding=\"async\" src=\"https:\/\/www.mygreatlearning.com\/academy\/career\/wp-content\/uploads\/2020\/07\/download-8-1-282x300.png\" alt=\"feature extraction in Image processing\" class=\"wp-image-34255\"\/><\/figure>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: python; title: ; notranslate\" title=\"\">\n#converting image to HSV format\n\nhsv_image_load = cv2.cvtColor(img_load,cv2.COLOR_BGR2HSV)\n\n#plotting the HSV image\n\ncv2_imshow(hsv_image_load)\n<\/pre><\/div>\n\n\n<figure class=\"wp-block-image aligncenter\"><img decoding=\"async\" src=\"https:\/\/www.mygreatlearning.com\/academy\/career\/wp-content\/uploads\/2020\/07\/download-9-1-282x300.png\" alt=\"\" class=\"wp-image-34256\"\/><\/figure>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: python; title: ; notranslate\" title=\"\">\n#converting image to size (100,100,3) \n\nsmaller_image_size = cv2.resize(img_load,(100,100))\ncv2_imshow(smaller_image_size)\n<\/pre><\/div>\n\n\n<figure class=\"wp-block-image aligncenter\"><img decoding=\"async\" src=\"https:\/\/www.mygreatlearning.com\/academy\/career\/wp-content\/uploads\/2020\/07\/download-10.png\" alt=\"\" class=\"wp-image-34250\"\/><\/figure>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: python; title: ; notranslate\" title=\"\">\nrows,colums = img_load.shape&#x5B;:2] \n\n#(col\/2,rows\/2) is the center of rotation for the image \n\n# M is the cordinates of the center \n\nM_load = cv2.getRotationMatrix2D((colums\/2,rows\/2),90,1) \n\ndst_load = cv2.warpAffine(img_load,M_load,(cols,rows)) \n\ncv2_imshow(dst_load)\n<\/pre><\/div>\n\n\n<figure class=\"wp-block-image aligncenter\"><img decoding=\"async\" src=\"https:\/\/www.mygreatlearning.com\/academy\/career\/wp-content\/uploads\/2020\/07\/download-11-282x300.png\" alt=\"feature extraction in Image processing\" class=\"wp-image-34251\"\/><\/figure>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: python; title: ; notranslate\" title=\"\">\nret,thresh_binary = cv2.threshold(gray_image,127,255,cv2.THRESH_BINARY)\n\nret,thresh_binary_inv = cv2.threshold(gray_image,127,255,cv2.THRESH_BINARY_INV)\n\nret,thresh_trunc = cv2.threshold(gray_image,127,255,cv2.THRESH_TRUNC)\n\nret,thresh_tozero = cv2.threshold(gray_image,127,255,cv2.THRESH_TOZERO)\n\nret,thresh_tozero_inv = cv2.threshold(gray_image,127,255,cv2.THRESH_TOZERO_INV)\n#DISPLAYING THE DIFFERENT THRESHOLDING STYLES using OpenCV\n\nnames = &#x5B;&#039;Oiriginal Image&#039;,&#039;BINARY&#039;,&#039;THRESH_BINARY&#039;,&#039;THRESH_TRUNC&#039;,&#039;THRESH_TOZERO&#039;,&#039;THRESH_TOZERO_INV&#039;]\n\nimages = gray_image,thresh_binary,thresh_binary_inv,thresh_trunc,thresh_tozero,thresh_tozero_inv\n\nfor i in range(6):\n\n    plt.subplot(2,3,i+1),plt.imshow(images&#x5B;i],&#039;gray&#039;)\n\n    plt.title(names&#x5B;i])\n\n    plt.xticks(&#x5B;]),plt.yticks(&#x5B;])\n<\/pre><\/div>\n\n\n<figure class=\"wp-block-image aligncenter\"><img decoding=\"async\" src=\"https:\/\/www.mygreatlearning.com\/academy\/career\/wp-content\/uploads\/2020\/07\/download-12-300x206.png\" alt=\"\" class=\"wp-image-34252\"\/><\/figure>\n\n\n\n<p><strong>Edge detection:<\/strong><\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: python; title: ; notranslate\" title=\"\">\n#calculate the edges using Canny edge algorithm\n\nedges_of_image = cv2.Canny(img_load,100,200) \n\n#plot the edges\n\ncv2_imshow(edges_of_image)\n<\/pre><\/div>\n\n\n<figure class=\"wp-block-image aligncenter\"><img decoding=\"async\" src=\"https:\/\/www.mygreatlearning.com\/academy\/career\/wp-content\/uploads\/2020\/07\/download-13-282x300.png\" alt=\"feature extraction in Image processing\" class=\"wp-image-34253\"\/><\/figure>\n\n\n\n<p>This brings us to the end of this article where we learned about feature extraction.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"further-reading\">Further Reading<\/h2>\n\n\n\n<ol class=\"wp-block-list\">\n<li><a href=\"https:\/\/www.mygreatlearning.com\/blog\/introduction-to-image-pre-processing\/\" target=\"_blank\" rel=\"noreferrer noopener\">Introduction to Image Pre-processing | What is Image Pre-processing?<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/www.mygreatlearning.com\/blog\/image-recognition\/\" target=\"_blank\" rel=\"noreferrer noopener\">What is Image Recognition and How it is Used?<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/www.mygreatlearning.com\/blog\/facial-recognition-using-python\/\" target=\"_blank\" rel=\"noreferrer noopener\">Facial Recognition using Python | Face Detection by OpenCV and Computer Vision<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/www.mygreatlearning.com\/blog\/real-time-face-detection\/\" target=\"_blank\" rel=\"noreferrer noopener\">Real-time Face detection | Face Mask Detection using OpenCV<\/a><\/li>\n<\/ol>\n","protected":false},"excerpt":{"rendered":"<p>In real life, all the data we collect are in large amounts. To understand this data, we need a process. Manually, it is not possible to process them. Here's when the concept of feature extraction comes in. Suppose you want to work with some of the big machine learning projects or the coolest and most [&hellip;]<\/p>\n","protected":false},"author":41,"featured_media":17774,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"_uag_custom_page_level_css":"","site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","ast-disable-related-posts":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"set","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"categories":[2],"tags":[],"content_type":[],"class_list":["post-17442","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-artificial-intelligence"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v27.3 (Yoast SEO v27.3) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>What is Feature Extraction? Feature Extraction in Image Processing | Great Learning<\/title>\n<meta name=\"description\" content=\"What is Feature Extraction in Python: It is a part of the dimensionality reduction process. In which an initial set of the raw data is divided and reduced to more manageable groups.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.mygreatlearning.com\/blog\/feature-extraction-in-image-processing\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"What is Feature Extraction? Feature Extraction in Image Processing\" \/>\n<meta property=\"og:description\" content=\"What is Feature Extraction in Python: It is a part of the dimensionality reduction process. In which an initial set of the raw data is divided and reduced to more manageable groups.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.mygreatlearning.com\/blog\/feature-extraction-in-image-processing\/\" \/>\n<meta property=\"og:site_name\" content=\"Great Learning Blog: Free Resources what Matters to shape your Career!\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/GreatLearningOfficial\/\" \/>\n<meta property=\"article:published_time\" content=\"2021-10-29T08:26:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-09-03T11:56:18+00:00\" \/>\n<meta property=\"og:image\" content=\"http:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2020\/07\/iStock-1256897191.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1355\" \/>\n\t<meta property=\"og:image:height\" content=\"774\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Great Learning Editorial Team\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@https:\/\/twitter.com\/Great_Learning\" \/>\n<meta name=\"twitter:site\" content=\"@Great_Learning\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Great Learning Editorial Team\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"14 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/feature-extraction-in-image-processing\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/feature-extraction-in-image-processing\\\/\"},\"author\":{\"name\":\"Great Learning Editorial Team\",\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/#\\\/schema\\\/person\\\/6f993d1be4c584a335951e836f2656ad\"},\"headline\":\"What is Feature Extraction? Feature Extraction in Image Processing\",\"datePublished\":\"2021-10-29T08:26:00+00:00\",\"dateModified\":\"2024-09-03T11:56:18+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/feature-extraction-in-image-processing\\\/\"},\"wordCount\":1826,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/feature-extraction-in-image-processing\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/wp-content\\\/uploads\\\/2020\\\/07\\\/iStock-1256897191.jpg\",\"articleSection\":[\"AI and Machine Learning\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/feature-extraction-in-image-processing\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/feature-extraction-in-image-processing\\\/\",\"url\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/feature-extraction-in-image-processing\\\/\",\"name\":\"What is Feature Extraction? Feature Extraction in Image Processing | Great Learning\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/feature-extraction-in-image-processing\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/feature-extraction-in-image-processing\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/wp-content\\\/uploads\\\/2020\\\/07\\\/iStock-1256897191.jpg\",\"datePublished\":\"2021-10-29T08:26:00+00:00\",\"dateModified\":\"2024-09-03T11:56:18+00:00\",\"description\":\"What is Feature Extraction in Python: It is a part of the dimensionality reduction process. In which an initial set of the raw data is divided and reduced to more manageable groups.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/feature-extraction-in-image-processing\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/feature-extraction-in-image-processing\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/feature-extraction-in-image-processing\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/wp-content\\\/uploads\\\/2020\\\/07\\\/iStock-1256897191.jpg\",\"contentUrl\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/wp-content\\\/uploads\\\/2020\\\/07\\\/iStock-1256897191.jpg\",\"width\":1355,\"height\":774,\"caption\":\"Feature Extraction\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/feature-extraction-in-image-processing\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Blog\",\"item\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"AI and Machine Learning\",\"item\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/artificial-intelligence\\\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"What is Feature Extraction? Feature Extraction in Image Processing\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/\",\"name\":\"Great Learning Blog\",\"description\":\"Learn, Upskill &amp; Career Development Guide and Resources\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/#organization\"},\"alternateName\":\"Great Learning\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/#organization\",\"name\":\"Great Learning\",\"url\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/06\\\/GL-Logo.jpg\",\"contentUrl\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/06\\\/GL-Logo.jpg\",\"width\":900,\"height\":900,\"caption\":\"Great Learning\"},\"image\":{\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/GreatLearningOfficial\\\/\",\"https:\\\/\\\/x.com\\\/Great_Learning\",\"https:\\\/\\\/www.instagram.com\\\/greatlearningofficial\\\/\",\"https:\\\/\\\/www.linkedin.com\\\/school\\\/great-learning\\\/\",\"https:\\\/\\\/in.pinterest.com\\\/greatlearning12\\\/\",\"https:\\\/\\\/www.youtube.com\\\/user\\\/beaconelearning\\\/\"],\"description\":\"Great Learning is a leading global ed-tech company for professional training and higher education. It offers comprehensive, industry-relevant, hands-on learning programs across various business, technology, and interdisciplinary domains driving the digital economy. These programs are developed and offered in collaboration with the world's foremost academic institutions.\",\"email\":\"info@mygreatlearning.com\",\"legalName\":\"Great Learning Education Services Pvt. Ltd\",\"foundingDate\":\"2013-11-29\",\"numberOfEmployees\":{\"@type\":\"QuantitativeValue\",\"minValue\":\"1001\",\"maxValue\":\"5000\"}},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/#\\\/schema\\\/person\\\/6f993d1be4c584a335951e836f2656ad\",\"name\":\"Great Learning Editorial Team\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/02\\\/unnamed.webp\",\"url\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/02\\\/unnamed.webp\",\"contentUrl\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/02\\\/unnamed.webp\",\"caption\":\"Great Learning Editorial Team\"},\"description\":\"The Great Learning Editorial Staff includes a dynamic team of subject matter experts, instructors, and education professionals who combine their deep industry knowledge with innovative teaching methods. Their mission is to provide learners with the skills and insights needed to excel in their careers, whether through upskilling, reskilling, or transitioning into new fields.\",\"sameAs\":[\"https:\\\/\\\/www.mygreatlearning.com\\\/\",\"https:\\\/\\\/in.linkedin.com\\\/school\\\/great-learning\\\/\",\"https:\\\/\\\/x.com\\\/https:\\\/\\\/twitter.com\\\/Great_Learning\",\"https:\\\/\\\/www.youtube.com\\\/channel\\\/UCObs0kLIrDjX2LLSybqNaEA\"],\"award\":[\"Best EdTech Company of the Year 2024\",\"Education Economictimes Outstanding Education\\\/Edtech Solution Provider of the Year 2024\",\"Leading E-learning Platform 2024\"],\"url\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/author\\\/greatlearning\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"What is Feature Extraction? Feature Extraction in Image Processing | Great Learning","description":"What is Feature Extraction in Python: It is a part of the dimensionality reduction process. In which an initial set of the raw data is divided and reduced to more manageable groups.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.mygreatlearning.com\/blog\/feature-extraction-in-image-processing\/","og_locale":"en_US","og_type":"article","og_title":"What is Feature Extraction? Feature Extraction in Image Processing","og_description":"What is Feature Extraction in Python: It is a part of the dimensionality reduction process. In which an initial set of the raw data is divided and reduced to more manageable groups.","og_url":"https:\/\/www.mygreatlearning.com\/blog\/feature-extraction-in-image-processing\/","og_site_name":"Great Learning Blog: Free Resources what Matters to shape your Career!","article_publisher":"https:\/\/www.facebook.com\/GreatLearningOfficial\/","article_published_time":"2021-10-29T08:26:00+00:00","article_modified_time":"2024-09-03T11:56:18+00:00","og_image":[{"width":1355,"height":774,"url":"http:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2020\/07\/iStock-1256897191.jpg","type":"image\/jpeg"}],"author":"Great Learning Editorial Team","twitter_card":"summary_large_image","twitter_creator":"@https:\/\/twitter.com\/Great_Learning","twitter_site":"@Great_Learning","twitter_misc":{"Written by":"Great Learning Editorial Team","Est. reading time":"14 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.mygreatlearning.com\/blog\/feature-extraction-in-image-processing\/#article","isPartOf":{"@id":"https:\/\/www.mygreatlearning.com\/blog\/feature-extraction-in-image-processing\/"},"author":{"name":"Great Learning Editorial Team","@id":"https:\/\/www.mygreatlearning.com\/blog\/#\/schema\/person\/6f993d1be4c584a335951e836f2656ad"},"headline":"What is Feature Extraction? Feature Extraction in Image Processing","datePublished":"2021-10-29T08:26:00+00:00","dateModified":"2024-09-03T11:56:18+00:00","mainEntityOfPage":{"@id":"https:\/\/www.mygreatlearning.com\/blog\/feature-extraction-in-image-processing\/"},"wordCount":1826,"commentCount":0,"publisher":{"@id":"https:\/\/www.mygreatlearning.com\/blog\/#organization"},"image":{"@id":"https:\/\/www.mygreatlearning.com\/blog\/feature-extraction-in-image-processing\/#primaryimage"},"thumbnailUrl":"https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2020\/07\/iStock-1256897191.jpg","articleSection":["AI and Machine Learning"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.mygreatlearning.com\/blog\/feature-extraction-in-image-processing\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.mygreatlearning.com\/blog\/feature-extraction-in-image-processing\/","url":"https:\/\/www.mygreatlearning.com\/blog\/feature-extraction-in-image-processing\/","name":"What is Feature Extraction? Feature Extraction in Image Processing | Great Learning","isPartOf":{"@id":"https:\/\/www.mygreatlearning.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.mygreatlearning.com\/blog\/feature-extraction-in-image-processing\/#primaryimage"},"image":{"@id":"https:\/\/www.mygreatlearning.com\/blog\/feature-extraction-in-image-processing\/#primaryimage"},"thumbnailUrl":"https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2020\/07\/iStock-1256897191.jpg","datePublished":"2021-10-29T08:26:00+00:00","dateModified":"2024-09-03T11:56:18+00:00","description":"What is Feature Extraction in Python: It is a part of the dimensionality reduction process. In which an initial set of the raw data is divided and reduced to more manageable groups.","breadcrumb":{"@id":"https:\/\/www.mygreatlearning.com\/blog\/feature-extraction-in-image-processing\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.mygreatlearning.com\/blog\/feature-extraction-in-image-processing\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.mygreatlearning.com\/blog\/feature-extraction-in-image-processing\/#primaryimage","url":"https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2020\/07\/iStock-1256897191.jpg","contentUrl":"https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2020\/07\/iStock-1256897191.jpg","width":1355,"height":774,"caption":"Feature Extraction"},{"@type":"BreadcrumbList","@id":"https:\/\/www.mygreatlearning.com\/blog\/feature-extraction-in-image-processing\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Blog","item":"https:\/\/www.mygreatlearning.com\/blog\/"},{"@type":"ListItem","position":2,"name":"AI and Machine Learning","item":"https:\/\/www.mygreatlearning.com\/blog\/artificial-intelligence\/"},{"@type":"ListItem","position":3,"name":"What is Feature Extraction? Feature Extraction in Image Processing"}]},{"@type":"WebSite","@id":"https:\/\/www.mygreatlearning.com\/blog\/#website","url":"https:\/\/www.mygreatlearning.com\/blog\/","name":"Great Learning Blog","description":"Learn, Upskill &amp; Career Development Guide and Resources","publisher":{"@id":"https:\/\/www.mygreatlearning.com\/blog\/#organization"},"alternateName":"Great Learning","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.mygreatlearning.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.mygreatlearning.com\/blog\/#organization","name":"Great Learning","url":"https:\/\/www.mygreatlearning.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.mygreatlearning.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2022\/06\/GL-Logo.jpg","contentUrl":"https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2022\/06\/GL-Logo.jpg","width":900,"height":900,"caption":"Great Learning"},"image":{"@id":"https:\/\/www.mygreatlearning.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/GreatLearningOfficial\/","https:\/\/x.com\/Great_Learning","https:\/\/www.instagram.com\/greatlearningofficial\/","https:\/\/www.linkedin.com\/school\/great-learning\/","https:\/\/in.pinterest.com\/greatlearning12\/","https:\/\/www.youtube.com\/user\/beaconelearning\/"],"description":"Great Learning is a leading global ed-tech company for professional training and higher education. It offers comprehensive, industry-relevant, hands-on learning programs across various business, technology, and interdisciplinary domains driving the digital economy. These programs are developed and offered in collaboration with the world's foremost academic institutions.","email":"info@mygreatlearning.com","legalName":"Great Learning Education Services Pvt. Ltd","foundingDate":"2013-11-29","numberOfEmployees":{"@type":"QuantitativeValue","minValue":"1001","maxValue":"5000"}},{"@type":"Person","@id":"https:\/\/www.mygreatlearning.com\/blog\/#\/schema\/person\/6f993d1be4c584a335951e836f2656ad","name":"Great Learning Editorial Team","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2022\/02\/unnamed.webp","url":"https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2022\/02\/unnamed.webp","contentUrl":"https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2022\/02\/unnamed.webp","caption":"Great Learning Editorial Team"},"description":"The Great Learning Editorial Staff includes a dynamic team of subject matter experts, instructors, and education professionals who combine their deep industry knowledge with innovative teaching methods. Their mission is to provide learners with the skills and insights needed to excel in their careers, whether through upskilling, reskilling, or transitioning into new fields.","sameAs":["https:\/\/www.mygreatlearning.com\/","https:\/\/in.linkedin.com\/school\/great-learning\/","https:\/\/x.com\/https:\/\/twitter.com\/Great_Learning","https:\/\/www.youtube.com\/channel\/UCObs0kLIrDjX2LLSybqNaEA"],"award":["Best EdTech Company of the Year 2024","Education Economictimes Outstanding Education\/Edtech Solution Provider of the Year 2024","Leading E-learning Platform 2024"],"url":"https:\/\/www.mygreatlearning.com\/blog\/author\/greatlearning\/"}]}},"uagb_featured_image_src":{"full":["https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2020\/07\/iStock-1256897191.jpg",1355,774,false],"thumbnail":["https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2020\/07\/iStock-1256897191-150x150.jpg",150,150,true],"medium":["https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2020\/07\/iStock-1256897191-300x171.jpg",300,171,true],"medium_large":["https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2020\/07\/iStock-1256897191-768x439.jpg",768,439,true],"large":["https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2020\/07\/iStock-1256897191-1024x585.jpg",1024,585,true],"1536x1536":["https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2020\/07\/iStock-1256897191.jpg",1355,774,false],"2048x2048":["https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2020\/07\/iStock-1256897191.jpg",1355,774,false],"web-stories-poster-portrait":["https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2020\/07\/iStock-1256897191.jpg",640,366,false],"web-stories-publisher-logo":["https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2020\/07\/iStock-1256897191.jpg",96,55,false],"web-stories-thumbnail":["https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2020\/07\/iStock-1256897191.jpg",150,86,false]},"uagb_author_info":{"display_name":"Great Learning Editorial Team","author_link":"https:\/\/www.mygreatlearning.com\/blog\/author\/greatlearning\/"},"uagb_comment_info":0,"uagb_excerpt":"In real life, all the data we collect are in large amounts. To understand this data, we need a process. Manually, it is not possible to process them. Here's when the concept of feature extraction comes in. Suppose you want to work with some of the big machine learning projects or the coolest and most&hellip;","_links":{"self":[{"href":"https:\/\/www.mygreatlearning.com\/blog\/wp-json\/wp\/v2\/posts\/17442","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.mygreatlearning.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.mygreatlearning.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.mygreatlearning.com\/blog\/wp-json\/wp\/v2\/users\/41"}],"replies":[{"embeddable":true,"href":"https:\/\/www.mygreatlearning.com\/blog\/wp-json\/wp\/v2\/comments?post=17442"}],"version-history":[{"count":39,"href":"https:\/\/www.mygreatlearning.com\/blog\/wp-json\/wp\/v2\/posts\/17442\/revisions"}],"predecessor-version":[{"id":110761,"href":"https:\/\/www.mygreatlearning.com\/blog\/wp-json\/wp\/v2\/posts\/17442\/revisions\/110761"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.mygreatlearning.com\/blog\/wp-json\/wp\/v2\/media\/17774"}],"wp:attachment":[{"href":"https:\/\/www.mygreatlearning.com\/blog\/wp-json\/wp\/v2\/media?parent=17442"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.mygreatlearning.com\/blog\/wp-json\/wp\/v2\/categories?post=17442"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.mygreatlearning.com\/blog\/wp-json\/wp\/v2\/tags?post=17442"},{"taxonomy":"content_type","embeddable":true,"href":"https:\/\/www.mygreatlearning.com\/blog\/wp-json\/wp\/v2\/content_type?post=17442"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}