Postagens

Classical Computer Vision: Value Domain II: Threshold

Imagem
 Thresholding     Thresholding is the simplest segmentation method.      Imagine that I have an object in an image and I want to segment it from the background. The thresholding i s based on the variation of intensity between that object and the background.     Basically, we compare the pixel value to a threshold value and take an action. For example, we could put 0 for every pixel that is equal or lower than the  threshold. import matplotlib . pyplot as plt import skimage . io as io from skimage import data , color from skimage . transform import rescale , resize , downscale_local_mean from skimage . filters import threshold_mean import numpy as np apple_original = io . imread ( "red-apple-1326427.jpg" ) print ( apple_original .shape) plt . imshow ( apple_original ) plt . show () def image_binary_threshold ( image , min_thr , max_thr ): res = image .copy() for i in range ( 0 , 3 ): k = res [:, :, i ] ...

Classical Computer Vision: Value Domain

Imagem
     Let's now focus on the Value Domain of image processing.     In this domain, we can just apply filter and simplification to images, since we are dealing with each pixel individually, in an out of context fashion.     Let's explore some of the  techniques available in this domain Image Windowing     One of the most interesting techniques we have in the value domain is image windowing. Let's take medical radiodensity images as an example that the use of this resource is imperative.      Since we are unable to recognize 4000 shades of gray right on the spot, we can use this technique to focus on a single property of the image we are analyzing. Therefore, we  limit the number of Hounsfield units (which is the gray scale that describes radiodensity images) that a human or a computer is processing.      In practical terms, is a change of perspective. Sometimes we are analyzing the soft tissue, ...

Classical Computer Vision: Introduction to the Image Processing Domains

  Image Pre-processing Techniques I - Value, Space and Frequency Domains     The aim of pre-processing an image is to reduce the amount of information in it, by removing non-relevant information, such as noise.      Sometimes, the captured image is not ideal, so it could lead to poor computer vision results. Some techniques could allow us to modify our input image (filter it) so it its better "seen" by a computer.      Other times, we just need our computer vision to focus on something. For example, let's suppose we are trying to authenticate someone based on his/her face. It would be counter-productive if the computer is focusing on the background to try to check if it is a recognizable face. It would be much better if we could segment the image and run the face recognition on a person rather than on the background, wouldn't it?    When we are pre-processing an image, we could work it on three different domains: Value Spatial Frequ...