Page 284 - Handbook of Deep Learning in Biomedical Engineering Techniques and Applications
P. 284

Chapter 10 Deep neural network in medical image processing  275




               signal where each pixel can be defined by a mathematical function
               f ðxÞ, which is dependent on three components, namely, RGB
               (R ¼ red, G ¼ green, B ¼ blue), the three primary colors. Each color
               can have a value between 0 and 255; each channel can have 256
               unique values so total number of possible colors will be
                  3
               256 ¼ 16; 777; 216 or 16 million approximately and add to that
               standard HD resolution of ð1920   1080Þ pixels, i.e., 2,073,600 pixels,
               and these figures have provided immense challenge to data
               scientists for a long time. But recent advances in processing power
               have enabled scientists to analyze. Whenever there is scarcity of
               processing power and color in the image is not of critical impor-
               tance to analyzing the image, then the image can be stored in
               grayscale. A grayscale image is stored in 8-bit color depth rather
               than 8 * (RGB), i.e., 24-bit color depth or in other words a single-
               channel image where 0 is for absolute black and 255 for white. In
               layman terms, such an image is called a black and white image,
               but in reality, such an image will mostly have different shades of
               gray; hence the scientific name grayscale. A third type of format
               “binary image” is also used when there is no requirement of too
               much details in an image; in this type of representation, only two
               colors are used to represent the image. This representation is
               also very helpful when we want to reduce the overhead on the
               processor and memory, and the areas we want to analyze are large
               regions. This format greatly reduces the size of the image as only a
               single bit is required to store a pixel (Fig. 10.1).

               2.3 Digital representation of an image

                  Image is represented in memory as a two-dimensional matrix
               (like a coordinate geometry plane) where each coordinate will
               have three variables, namely, RGB as discussed earlier. To store
               the image in a computer memory, each pixel is represented by
               a binary value, which represents a unique color. When we talk
               about handling images using python, we need to use packages
               such as opencv [1], pillow, Scikit-image, Scipy, and so on; most
               of these packages read the images in pixel arrays into numpy ar-
               rays (Fig. 10.2).

               2.4 Medical image formats
                  Image file formats offer a structured way of storing the photo
               definition information in a computer file. A medical image data
               set usually consists of one or more images representing the pro-
               jection of an anatomical volume on an image plane (projection or
               planar imagery), a sequence of images representing thin slices
   279   280   281   282   283   284   285   286   287   288   289