SlideShare a Scribd company logo
1 of 16
Pixel Processing

SS 2008 – Image Processing
   Multimedia Computing, Universität Augsburg
   Rainer.Lienhart@informatik.uni-augsburg.de
       www.multimedia-computing.{de,org}
Reference

Bernd Jähne. Digital Image Processing.
Springer Verlag.

  Chapter on Pixel Processing
  (chap 8 in 4th edition)


  Most Figures are taken from that book

     © 2005-2008 Prof. Dr. R. Lienhart, Head of Multimedia Computing, Institut für Informatik, Universität Augsburg   2
         Eichleitnerstr. 30, D-86135 Augsburg, Germany; email: Rainer.Lienhart@informatik.uni-augsburg.de
Point Operations
:= modification of gray value at individual
  pixels dependent only on the gray value
  and possibly on the position of the pixel
             I ' ( x, y)  Px, y I ( x, y)




       © 2005-2008 Prof. Dr. R. Lienhart, Head of Multimedia Computing, Institut für Informatik, Universität Augsburg   3
           Eichleitnerstr. 30, D-86135 Augsburg, Germany; email: Rainer.Lienhart@informatik.uni-augsburg.de
Homogeneous Point Operations
:= Point operation independent of position of pixel
   I ' ( x, y)  PI ( x, y)

• Map set of gray values onto itself
• Generally not invertible:
   – Example: Thresholding                                            0                q  threshold
                                                              P(q)  
                                                                     255               q  threshold

                                                                Not invertible


   – Example: Invertion                                        Pnegation(q)  255  q , q  I ( x, y)

                                                               Invertible


            © 2005-2008 Prof. Dr. R. Lienhart, Head of Multimedia Computing, Institut für Informatik, Universität Augsburg   4
                Eichleitnerstr. 30, D-86135 Augsburg, Germany; email: Rainer.Lienhart@informatik.uni-augsburg.de
Image Thresholding
Two principles
• Fixed threshold;
• Adaptive threshold;

void cvThreshold( const CvArr* src,
    CvArr* dst, double threshold, double
    max_value, int threshold_type );

src = Source array (single-channel, 8-bit
    of 32-bit floating point).
dst = Destination array; must be either the
    same type as src or 8-bit.
threshold = threshold value.
max_value = Maximum value to use with
    CV_THRESH_BINARY and
    CV_THRESH_BINARY_INV
    thresholding types.
threshold_type = Thresholding type (see
    the discussion)


             © 2005-2008 Prof. Dr. R. Lienhart, Head of Multimedia Computing, Institut für Informatik, Universität Augsburg   5
                 Eichleitnerstr. 30, D-86135 Augsburg, Germany; email: Rainer.Lienhart@informatik.uni-augsburg.de
Adaptive Thresholding
void cvAdaptiveThreshold( const CvArr* src, CvArr*                          The function cvAdaptiveThreshold transforms
     dst, double max_value, int                                                 grayscale image to binary image according
     adaptive_method=CV_ADAPTIVE_THRESH_MEA                                     to the formulae:
     N_C, int threshold_type=CV_THRESH_BINARY, int
     block_size=3, double param1=5 );
                                                                            threshold_type=CV_THRESH_BINARY:
Src = source image.                                                         •   dst(x,y) = max_value, if src(x,y)>T(x,y) 0,
Dst = Destination image.                                                        otherwise
max_value = Maximum value that is used with
     CV_THRESH_BINARY and
     CV_THRESH_BINARY_INV.                                                  threshold_type=CV_THRESH_BINARY_INV:
adaptive_method = Adaptive thresholding algorithm to                        •   dst(x,y) = 0, if src(x,y)>T(x,y) max_value,
     use: CV_ADAPTIVE_THRESH_MEAN_C or                                          otherwise where T is a threshold calculated
     CV_ADAPTIVE_THRESH_GAUSSIAN_C (see the                                     individually for each pixel.
     discussion).
threshold_type = Thresholding type; must be one of
      CV_THRESH_BINARY,
      CV_THRESH_BINARY_INV
                                                                            For the method
block_size = The size of a pixel neighborhood that is                            CV_ADAPTIVE_THRESH_MEAN_C it is a
    used to calculate a threshold value for the pixel: 3,
    5, 7, ...                                                                    mean of block_size × block_size pixel
Param1 = The method-dependent parameter. For the                                 neighborhood, subtracted by param1.
    methods CV_ADAPTIVE_THRESH_MEAN_C and                                   For the method
    CV_ADAPTIVE_THRESH_GAUSSIAN_C it is a                                        CV_ADAPTIVE_THRESH_GAUSSIAN_C it
    constant subtracted from mean or weighted mean                               is a weighted sum (gaussian) of block_size
    (see the discussion), though it may be negative.                             × block_size pixel neighborhood,
                                                                                 subtracted by param1.


                  © 2005-2008 Prof. Dr. R. Lienhart, Head of Multimedia Computing, Institut für Informatik, Universität Augsburg   6
                      Eichleitnerstr. 30, D-86135 Augsburg, Germany; email: Rainer.Lienhart@informatik.uni-augsburg.de
LUT Operations
:= Look-up tables operations  efficient way to implement homogeneous point operations on large
    images

Example:
      –    Homogeneous point operation on 1920x1080 8u_C1 image  Need an LUT array of size 256.
      –    P(q) := log (q)  only 256 log operations with LUT vs. 1920*1080 log operations with out LUT

void cvLUT( const CvArr* src, CvArr* dst, const CvArr* lut );
 Performs look-up table transform of array

src = Source array of 8-bit elements.
dst = Destination array of arbitrary depth and of the same number of channels as the source array.
lut = Look-up table of 256 elements; should have the same depth as the destination array.

The function cvLUT fills the destination array with values from the look-up table. Indices of the entries
    are taken from the source array. That is, the function processes each element of src as following:
           dst(I)=lut[src(I)+DELTA]
where DELTA=0 if src has depth CV_8U, and DELTA=128 if src has depth CV_8S.




                  © 2005-2008 Prof. Dr. R. Lienhart, Head of Multimedia Computing, Institut für Informatik, Universität Augsburg   7
                      Eichleitnerstr. 30, D-86135 Augsburg, Germany; email: Rainer.Lienhart@informatik.uni-augsburg.de
LUT Example




© 2005-2008 Prof. Dr. R. Lienhart, Head of Multimedia Computing, Institut für Informatik, Universität Augsburg   8
    Eichleitnerstr. 30, D-86135 Augsburg, Germany; email: Rainer.Lienhart@informatik.uni-augsburg.de
Evaluating & Optimizing Illumination

                                                                                                                      Doesn’t reveal
                                                                                                                      spatial variance




Histogram                                                                                                             Histogram
equalization                                                                                                          equalization &
                                                                                                                      quantization




               © 2005-2008 Prof. Dr. R. Lienhart, Head of Multimedia Computing, Institut für Informatik, Universität Augsburg            9
                   Eichleitnerstr. 30, D-86135 Augsburg, Germany; email: Rainer.Lienhart@informatik.uni-augsburg.de
Detection of Under-/Overflow




   © 2005-2008 Prof. Dr. R. Lienhart, Head of Multimedia Computing, Institut für Informatik, Universität Augsburg   10
       Eichleitnerstr. 30, D-86135 Augsburg, Germany; email: Rainer.Lienhart@informatik.uni-augsburg.de
Contrast Enhancement




© 2005-2008 Prof. Dr. R. Lienhart, Head of Multimedia Computing, Institut für Informatik, Universität Augsburg   11
    Eichleitnerstr. 30, D-86135 Augsburg, Germany; email: Rainer.Lienhart@informatik.uni-augsburg.de
Contrast Enhancement (2)
Example 1:
      Void
      NormalizeImageTo255 ( IplImage *in, IplImage *out )
      {
          double InputMin, InputMax;
          cvMinMaxLoc( in, &InputMin, &InputMax );
          cvConvertScale ( in, in, 1, -InputMin);
          cvConvertScale ( in, out, 255.0 / (InputMax - InputMin), 0);
      }


Example 2:
      Void
      NormalizeImageTo255 ( IplImage *in, IplImage *out, double cutOffPercent=2.5)
      {
          Ipp8u InputMin=0, InputMax=255;
          Ipp32u sum=0, sumT= in->width * (in->height * cutOffPercent);
          Ipp32u histo[256] = {0};
          calcHisto( in, histo );

          for (sum=0 ; InputMin<256 && sum<sumT; InputMin++) sum+=histo[i];
          InputMin--;
          for (sum=0 ; InputMax>=0 && sum<sumT; InputMax--) sum+=histo[i];
          InputMax++;

          cvConvertScale ( in, in, 1, -InputMin);
          cvConvertScale ( in, out, 255.0 / (InputMax - InputMin), 0);
      }



                © 2005-2008 Prof. Dr. R. Lienhart, Head of Multimedia Computing, Institut für Informatik, Universität Augsburg   12
                    Eichleitnerstr. 30, D-86135 Augsburg, Germany; email: Rainer.Lienhart@informatik.uni-augsburg.de
Inhomogeneous Point Op.
:= Point operation dependent of position of pixel
                      I ' ( x, y)  Px, y I ( x, y)


• Mostly related to calibration procedures
• Example:
   – Subtraction of a background image without objects
     I ' ( x, y)  Px, y I ( x, y)  I ( x, y)  B( x, y)


   – Temporal image averaging
                                                      
      I ' ( x, y, t )  Px , y I ( x, y, t )       w( )I ( x, y, )
                                                    



             © 2005-2008 Prof. Dr. R. Lienhart, Head of Multimedia Computing, Institut für Informatik, Universität Augsburg   13
                 Eichleitnerstr. 30, D-86135 Augsburg, Germany; email: Rainer.Lienhart@informatik.uni-augsburg.de
Temporal Image Averaging




  © 2005-2008 Prof. Dr. R. Lienhart, Head of Multimedia Computing, Institut für Informatik, Universität Augsburg   14
      Eichleitnerstr. 30, D-86135 Augsburg, Germany; email: Rainer.Lienhart@informatik.uni-augsburg.de
Illumination Correction
Where is always
    – Uneven illumination
    – Dust on lenses
    – Uneven spatial CCD
      sensitivity
 Introduce systematic errors

                     I ( x, y )
  I ' ( x, y )  c                        Ref image taken
                     R ( x, y )           with full illumination


                     I ( x, y )  B( x, y )
  I ' ( x, y )  c
                     R( x, y )  B( x, y)
                                               BG image taken without
                                               illumination (fixed pattern
                                               noise on CCD)

                © 2005-2008 Prof. Dr. R. Lienhart, Head of Multimedia Computing, Institut für Informatik, Universität Augsburg   15
                    Eichleitnerstr. 30, D-86135 Augsburg, Germany; email: Rainer.Lienhart@informatik.uni-augsburg.de
Windowing




© 2005-2008 Prof. Dr. R. Lienhart, Head of Multimedia Computing, Institut für Informatik, Universität Augsburg   16
    Eichleitnerstr. 30, D-86135 Augsburg, Germany; email: Rainer.Lienhart@informatik.uni-augsburg.de

More Related Content

Viewers also liked

Histogram based enhancement
Histogram based enhancementHistogram based enhancement
Histogram based enhancementliba manopriya.J
 
Image Processing(Beta1)
Image Processing(Beta1)Image Processing(Beta1)
Image Processing(Beta1)Thedarkangel1
 
Digital image processing Tool presentation
Digital image processing Tool presentationDigital image processing Tool presentation
Digital image processing Tool presentationdikshabehl5392
 
Image Processing 4
Image Processing 4Image Processing 4
Image Processing 4jainatin
 
Class Interval Histograms
Class Interval HistogramsClass Interval Histograms
Class Interval HistogramsPassy World
 
Spatial filtering using image processing
Spatial filtering using image processingSpatial filtering using image processing
Spatial filtering using image processingAnuj Arora
 
Histogram Equalization(Image Processing Presentation)
Histogram Equalization(Image Processing Presentation)Histogram Equalization(Image Processing Presentation)
Histogram Equalization(Image Processing Presentation)CherryBerry2
 
Powerpoint presentation histogram
Powerpoint presentation   histogramPowerpoint presentation   histogram
Powerpoint presentation histogramJanu Meera Suresh
 
Digital Image Processing - Image Compression
Digital Image Processing - Image CompressionDigital Image Processing - Image Compression
Digital Image Processing - Image CompressionMathankumar S
 
06 spatial filtering DIP
06 spatial filtering DIP06 spatial filtering DIP
06 spatial filtering DIPbabak danyal
 
Spandana image processing and compression techniques (7840228)
Spandana   image processing and compression techniques (7840228)Spandana   image processing and compression techniques (7840228)
Spandana image processing and compression techniques (7840228)indianspandana
 
05 histogram processing DIP
05 histogram processing DIP05 histogram processing DIP
05 histogram processing DIPbabak danyal
 
Fields of digital image processing slides
Fields of digital image processing slidesFields of digital image processing slides
Fields of digital image processing slidesSrinath Dhayalamoorthy
 

Viewers also liked (20)

Histogram based enhancement
Histogram based enhancementHistogram based enhancement
Histogram based enhancement
 
Image Processing(Beta1)
Image Processing(Beta1)Image Processing(Beta1)
Image Processing(Beta1)
 
Digital image processing Tool presentation
Digital image processing Tool presentationDigital image processing Tool presentation
Digital image processing Tool presentation
 
Image Processing 4
Image Processing 4Image Processing 4
Image Processing 4
 
Class Interval Histograms
Class Interval HistogramsClass Interval Histograms
Class Interval Histograms
 
SPATIAL FILTER
SPATIAL FILTERSPATIAL FILTER
SPATIAL FILTER
 
Histograms
HistogramsHistograms
Histograms
 
Application of image processing
Application of image processingApplication of image processing
Application of image processing
 
Spatial filtering using image processing
Spatial filtering using image processingSpatial filtering using image processing
Spatial filtering using image processing
 
Histogram Equalization(Image Processing Presentation)
Histogram Equalization(Image Processing Presentation)Histogram Equalization(Image Processing Presentation)
Histogram Equalization(Image Processing Presentation)
 
Powerpoint presentation histogram
Powerpoint presentation   histogramPowerpoint presentation   histogram
Powerpoint presentation histogram
 
Histogram
HistogramHistogram
Histogram
 
Digital Image Processing - Image Compression
Digital Image Processing - Image CompressionDigital Image Processing - Image Compression
Digital Image Processing - Image Compression
 
06 spatial filtering DIP
06 spatial filtering DIP06 spatial filtering DIP
06 spatial filtering DIP
 
Spandana image processing and compression techniques (7840228)
Spandana   image processing and compression techniques (7840228)Spandana   image processing and compression techniques (7840228)
Spandana image processing and compression techniques (7840228)
 
05 histogram processing DIP
05 histogram processing DIP05 histogram processing DIP
05 histogram processing DIP
 
Fields of digital image processing slides
Fields of digital image processing slidesFields of digital image processing slides
Fields of digital image processing slides
 
JPEG Image Compression
JPEG Image CompressionJPEG Image Compression
JPEG Image Compression
 
Histogram
HistogramHistogram
Histogram
 
Image compression
Image compressionImage compression
Image compression
 

Similar to S S08 D I P Lec07 Pixel Operations

IMAGE STEGANOGRAPHY WITH CONTRAST ENHANCEMENT USING HISTOGRAM SHIFTING
IMAGE STEGANOGRAPHY WITH CONTRAST ENHANCEMENT USING HISTOGRAM SHIFTINGIMAGE STEGANOGRAPHY WITH CONTRAST ENHANCEMENT USING HISTOGRAM SHIFTING
IMAGE STEGANOGRAPHY WITH CONTRAST ENHANCEMENT USING HISTOGRAM SHIFTINGIRJET Journal
 
Digital Image Processing (Lab 07)
Digital Image Processing (Lab 07)Digital Image Processing (Lab 07)
Digital Image Processing (Lab 07)Moe Moe Myint
 
Tomato Classification using Computer Vision
Tomato Classification using Computer VisionTomato Classification using Computer Vision
Tomato Classification using Computer VisionRaman Pandey
 
Application's of Numerical Math in CSE
Application's of Numerical Math in CSEApplication's of Numerical Math in CSE
Application's of Numerical Math in CSEsanjana mun
 
Fast and Bootstrap Robust for LTS
Fast and Bootstrap Robust for LTSFast and Bootstrap Robust for LTS
Fast and Bootstrap Robust for LTSdessybudiyanti
 
02 image processing
02 image processing02 image processing
02 image processingankit_ppt
 
Basics of Digital Images
Basics of  Digital ImagesBasics of  Digital Images
Basics of Digital ImagesSaad Al-Momen
 
Ai_Project_report
Ai_Project_reportAi_Project_report
Ai_Project_reportRavi Gupta
 
Computational Intelligence Assisted Engineering Design Optimization (using MA...
Computational Intelligence Assisted Engineering Design Optimization (using MA...Computational Intelligence Assisted Engineering Design Optimization (using MA...
Computational Intelligence Assisted Engineering Design Optimization (using MA...AmirParnianifard1
 
Modified clahe an adaptive algorithm for contrast enhancement of aerial medi...
Modified clahe an adaptive algorithm for contrast enhancement of aerial  medi...Modified clahe an adaptive algorithm for contrast enhancement of aerial  medi...
Modified clahe an adaptive algorithm for contrast enhancement of aerial medi...IAEME Publication
 
An Open Shop Approach in Approximating Optimal Data Transmission Duration in ...
An Open Shop Approach in Approximating Optimal Data Transmission Duration in ...An Open Shop Approach in Approximating Optimal Data Transmission Duration in ...
An Open Shop Approach in Approximating Optimal Data Transmission Duration in ...cscpconf
 
AN OPEN SHOP APPROACH IN APPROXIMATING OPTIMAL DATA TRANSMISSION DURATION IN ...
AN OPEN SHOP APPROACH IN APPROXIMATING OPTIMAL DATA TRANSMISSION DURATION IN ...AN OPEN SHOP APPROACH IN APPROXIMATING OPTIMAL DATA TRANSMISSION DURATION IN ...
AN OPEN SHOP APPROACH IN APPROXIMATING OPTIMAL DATA TRANSMISSION DURATION IN ...csandit
 
Seam Carving Approach for Multirate Processing of Digital Images
Seam Carving Approach for Multirate Processing of Digital ImagesSeam Carving Approach for Multirate Processing of Digital Images
Seam Carving Approach for Multirate Processing of Digital ImagesIJLT EMAS
 
Quality Measurements of Lossy Image Steganography Based on H-AMBTC Technique ...
Quality Measurements of Lossy Image Steganography Based on H-AMBTC Technique ...Quality Measurements of Lossy Image Steganography Based on H-AMBTC Technique ...
Quality Measurements of Lossy Image Steganography Based on H-AMBTC Technique ...AM Publications,India
 
Drobics, m. 2001: datamining using synergiesbetween self-organising maps and...
Drobics, m. 2001:  datamining using synergiesbetween self-organising maps and...Drobics, m. 2001:  datamining using synergiesbetween self-organising maps and...
Drobics, m. 2001: datamining using synergiesbetween self-organising maps and...ArchiLab 7
 
High capacity histogram shifting based reversible data hiding with data compr...
High capacity histogram shifting based reversible data hiding with data compr...High capacity histogram shifting based reversible data hiding with data compr...
High capacity histogram shifting based reversible data hiding with data compr...IAEME Publication
 

Similar to S S08 D I P Lec07 Pixel Operations (20)

IMAGE STEGANOGRAPHY WITH CONTRAST ENHANCEMENT USING HISTOGRAM SHIFTING
IMAGE STEGANOGRAPHY WITH CONTRAST ENHANCEMENT USING HISTOGRAM SHIFTINGIMAGE STEGANOGRAPHY WITH CONTRAST ENHANCEMENT USING HISTOGRAM SHIFTING
IMAGE STEGANOGRAPHY WITH CONTRAST ENHANCEMENT USING HISTOGRAM SHIFTING
 
Digital Image Processing (Lab 07)
Digital Image Processing (Lab 07)Digital Image Processing (Lab 07)
Digital Image Processing (Lab 07)
 
Visual Techniques
Visual TechniquesVisual Techniques
Visual Techniques
 
Tomato Classification using Computer Vision
Tomato Classification using Computer VisionTomato Classification using Computer Vision
Tomato Classification using Computer Vision
 
Application's of Numerical Math in CSE
Application's of Numerical Math in CSEApplication's of Numerical Math in CSE
Application's of Numerical Math in CSE
 
Fast and Bootstrap Robust for LTS
Fast and Bootstrap Robust for LTSFast and Bootstrap Robust for LTS
Fast and Bootstrap Robust for LTS
 
02 image processing
02 image processing02 image processing
02 image processing
 
Xgboost
XgboostXgboost
Xgboost
 
Basics of Digital Images
Basics of  Digital ImagesBasics of  Digital Images
Basics of Digital Images
 
Ai_Project_report
Ai_Project_reportAi_Project_report
Ai_Project_report
 
Log polar coordinates
Log polar coordinatesLog polar coordinates
Log polar coordinates
 
Computational Intelligence Assisted Engineering Design Optimization (using MA...
Computational Intelligence Assisted Engineering Design Optimization (using MA...Computational Intelligence Assisted Engineering Design Optimization (using MA...
Computational Intelligence Assisted Engineering Design Optimization (using MA...
 
Modified clahe an adaptive algorithm for contrast enhancement of aerial medi...
Modified clahe an adaptive algorithm for contrast enhancement of aerial  medi...Modified clahe an adaptive algorithm for contrast enhancement of aerial  medi...
Modified clahe an adaptive algorithm for contrast enhancement of aerial medi...
 
An Open Shop Approach in Approximating Optimal Data Transmission Duration in ...
An Open Shop Approach in Approximating Optimal Data Transmission Duration in ...An Open Shop Approach in Approximating Optimal Data Transmission Duration in ...
An Open Shop Approach in Approximating Optimal Data Transmission Duration in ...
 
AN OPEN SHOP APPROACH IN APPROXIMATING OPTIMAL DATA TRANSMISSION DURATION IN ...
AN OPEN SHOP APPROACH IN APPROXIMATING OPTIMAL DATA TRANSMISSION DURATION IN ...AN OPEN SHOP APPROACH IN APPROXIMATING OPTIMAL DATA TRANSMISSION DURATION IN ...
AN OPEN SHOP APPROACH IN APPROXIMATING OPTIMAL DATA TRANSMISSION DURATION IN ...
 
Seam Carving Approach for Multirate Processing of Digital Images
Seam Carving Approach for Multirate Processing of Digital ImagesSeam Carving Approach for Multirate Processing of Digital Images
Seam Carving Approach for Multirate Processing of Digital Images
 
G04654247
G04654247G04654247
G04654247
 
Quality Measurements of Lossy Image Steganography Based on H-AMBTC Technique ...
Quality Measurements of Lossy Image Steganography Based on H-AMBTC Technique ...Quality Measurements of Lossy Image Steganography Based on H-AMBTC Technique ...
Quality Measurements of Lossy Image Steganography Based on H-AMBTC Technique ...
 
Drobics, m. 2001: datamining using synergiesbetween self-organising maps and...
Drobics, m. 2001:  datamining using synergiesbetween self-organising maps and...Drobics, m. 2001:  datamining using synergiesbetween self-organising maps and...
Drobics, m. 2001: datamining using synergiesbetween self-organising maps and...
 
High capacity histogram shifting based reversible data hiding with data compr...
High capacity histogram shifting based reversible data hiding with data compr...High capacity histogram shifting based reversible data hiding with data compr...
High capacity histogram shifting based reversible data hiding with data compr...
 

Recently uploaded

Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxRustici Software
 
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUKSpring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUKJago de Vreede
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfOverkill Security
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...apidays
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesrafiqahmad00786416
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...apidays
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsNanddeep Nachan
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistandanishmna97
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDropbox
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 
Cyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdfCyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdfOverkill Security
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native ApplicationsWSO2
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024The Digital Insurer
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...Zilliz
 

Recently uploaded (20)

Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUKSpring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdf
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Cyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdfCyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdf
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 

S S08 D I P Lec07 Pixel Operations

  • 1. Pixel Processing SS 2008 – Image Processing Multimedia Computing, Universität Augsburg Rainer.Lienhart@informatik.uni-augsburg.de www.multimedia-computing.{de,org}
  • 2. Reference Bernd Jähne. Digital Image Processing. Springer Verlag. Chapter on Pixel Processing (chap 8 in 4th edition) Most Figures are taken from that book © 2005-2008 Prof. Dr. R. Lienhart, Head of Multimedia Computing, Institut für Informatik, Universität Augsburg 2 Eichleitnerstr. 30, D-86135 Augsburg, Germany; email: Rainer.Lienhart@informatik.uni-augsburg.de
  • 3. Point Operations := modification of gray value at individual pixels dependent only on the gray value and possibly on the position of the pixel I ' ( x, y)  Px, y I ( x, y) © 2005-2008 Prof. Dr. R. Lienhart, Head of Multimedia Computing, Institut für Informatik, Universität Augsburg 3 Eichleitnerstr. 30, D-86135 Augsburg, Germany; email: Rainer.Lienhart@informatik.uni-augsburg.de
  • 4. Homogeneous Point Operations := Point operation independent of position of pixel I ' ( x, y)  PI ( x, y) • Map set of gray values onto itself • Generally not invertible: – Example: Thresholding  0 q  threshold P(q)   255 q  threshold  Not invertible – Example: Invertion Pnegation(q)  255  q , q  I ( x, y)  Invertible © 2005-2008 Prof. Dr. R. Lienhart, Head of Multimedia Computing, Institut für Informatik, Universität Augsburg 4 Eichleitnerstr. 30, D-86135 Augsburg, Germany; email: Rainer.Lienhart@informatik.uni-augsburg.de
  • 5. Image Thresholding Two principles • Fixed threshold; • Adaptive threshold; void cvThreshold( const CvArr* src, CvArr* dst, double threshold, double max_value, int threshold_type ); src = Source array (single-channel, 8-bit of 32-bit floating point). dst = Destination array; must be either the same type as src or 8-bit. threshold = threshold value. max_value = Maximum value to use with CV_THRESH_BINARY and CV_THRESH_BINARY_INV thresholding types. threshold_type = Thresholding type (see the discussion) © 2005-2008 Prof. Dr. R. Lienhart, Head of Multimedia Computing, Institut für Informatik, Universität Augsburg 5 Eichleitnerstr. 30, D-86135 Augsburg, Germany; email: Rainer.Lienhart@informatik.uni-augsburg.de
  • 6. Adaptive Thresholding void cvAdaptiveThreshold( const CvArr* src, CvArr* The function cvAdaptiveThreshold transforms dst, double max_value, int grayscale image to binary image according adaptive_method=CV_ADAPTIVE_THRESH_MEA to the formulae: N_C, int threshold_type=CV_THRESH_BINARY, int block_size=3, double param1=5 ); threshold_type=CV_THRESH_BINARY: Src = source image. • dst(x,y) = max_value, if src(x,y)>T(x,y) 0, Dst = Destination image. otherwise max_value = Maximum value that is used with CV_THRESH_BINARY and CV_THRESH_BINARY_INV. threshold_type=CV_THRESH_BINARY_INV: adaptive_method = Adaptive thresholding algorithm to • dst(x,y) = 0, if src(x,y)>T(x,y) max_value, use: CV_ADAPTIVE_THRESH_MEAN_C or otherwise where T is a threshold calculated CV_ADAPTIVE_THRESH_GAUSSIAN_C (see the individually for each pixel. discussion). threshold_type = Thresholding type; must be one of CV_THRESH_BINARY, CV_THRESH_BINARY_INV For the method block_size = The size of a pixel neighborhood that is CV_ADAPTIVE_THRESH_MEAN_C it is a used to calculate a threshold value for the pixel: 3, 5, 7, ... mean of block_size × block_size pixel Param1 = The method-dependent parameter. For the neighborhood, subtracted by param1. methods CV_ADAPTIVE_THRESH_MEAN_C and For the method CV_ADAPTIVE_THRESH_GAUSSIAN_C it is a CV_ADAPTIVE_THRESH_GAUSSIAN_C it constant subtracted from mean or weighted mean is a weighted sum (gaussian) of block_size (see the discussion), though it may be negative. × block_size pixel neighborhood, subtracted by param1. © 2005-2008 Prof. Dr. R. Lienhart, Head of Multimedia Computing, Institut für Informatik, Universität Augsburg 6 Eichleitnerstr. 30, D-86135 Augsburg, Germany; email: Rainer.Lienhart@informatik.uni-augsburg.de
  • 7. LUT Operations := Look-up tables operations  efficient way to implement homogeneous point operations on large images Example: – Homogeneous point operation on 1920x1080 8u_C1 image  Need an LUT array of size 256. – P(q) := log (q)  only 256 log operations with LUT vs. 1920*1080 log operations with out LUT void cvLUT( const CvArr* src, CvArr* dst, const CvArr* lut );  Performs look-up table transform of array src = Source array of 8-bit elements. dst = Destination array of arbitrary depth and of the same number of channels as the source array. lut = Look-up table of 256 elements; should have the same depth as the destination array. The function cvLUT fills the destination array with values from the look-up table. Indices of the entries are taken from the source array. That is, the function processes each element of src as following: dst(I)=lut[src(I)+DELTA] where DELTA=0 if src has depth CV_8U, and DELTA=128 if src has depth CV_8S. © 2005-2008 Prof. Dr. R. Lienhart, Head of Multimedia Computing, Institut für Informatik, Universität Augsburg 7 Eichleitnerstr. 30, D-86135 Augsburg, Germany; email: Rainer.Lienhart@informatik.uni-augsburg.de
  • 8. LUT Example © 2005-2008 Prof. Dr. R. Lienhart, Head of Multimedia Computing, Institut für Informatik, Universität Augsburg 8 Eichleitnerstr. 30, D-86135 Augsburg, Germany; email: Rainer.Lienhart@informatik.uni-augsburg.de
  • 9. Evaluating & Optimizing Illumination Doesn’t reveal spatial variance Histogram Histogram equalization equalization & quantization © 2005-2008 Prof. Dr. R. Lienhart, Head of Multimedia Computing, Institut für Informatik, Universität Augsburg 9 Eichleitnerstr. 30, D-86135 Augsburg, Germany; email: Rainer.Lienhart@informatik.uni-augsburg.de
  • 10. Detection of Under-/Overflow © 2005-2008 Prof. Dr. R. Lienhart, Head of Multimedia Computing, Institut für Informatik, Universität Augsburg 10 Eichleitnerstr. 30, D-86135 Augsburg, Germany; email: Rainer.Lienhart@informatik.uni-augsburg.de
  • 11. Contrast Enhancement © 2005-2008 Prof. Dr. R. Lienhart, Head of Multimedia Computing, Institut für Informatik, Universität Augsburg 11 Eichleitnerstr. 30, D-86135 Augsburg, Germany; email: Rainer.Lienhart@informatik.uni-augsburg.de
  • 12. Contrast Enhancement (2) Example 1: Void NormalizeImageTo255 ( IplImage *in, IplImage *out ) { double InputMin, InputMax; cvMinMaxLoc( in, &InputMin, &InputMax ); cvConvertScale ( in, in, 1, -InputMin); cvConvertScale ( in, out, 255.0 / (InputMax - InputMin), 0); } Example 2: Void NormalizeImageTo255 ( IplImage *in, IplImage *out, double cutOffPercent=2.5) { Ipp8u InputMin=0, InputMax=255; Ipp32u sum=0, sumT= in->width * (in->height * cutOffPercent); Ipp32u histo[256] = {0}; calcHisto( in, histo ); for (sum=0 ; InputMin<256 && sum<sumT; InputMin++) sum+=histo[i]; InputMin--; for (sum=0 ; InputMax>=0 && sum<sumT; InputMax--) sum+=histo[i]; InputMax++; cvConvertScale ( in, in, 1, -InputMin); cvConvertScale ( in, out, 255.0 / (InputMax - InputMin), 0); } © 2005-2008 Prof. Dr. R. Lienhart, Head of Multimedia Computing, Institut für Informatik, Universität Augsburg 12 Eichleitnerstr. 30, D-86135 Augsburg, Germany; email: Rainer.Lienhart@informatik.uni-augsburg.de
  • 13. Inhomogeneous Point Op. := Point operation dependent of position of pixel I ' ( x, y)  Px, y I ( x, y) • Mostly related to calibration procedures • Example: – Subtraction of a background image without objects I ' ( x, y)  Px, y I ( x, y)  I ( x, y)  B( x, y) – Temporal image averaging  I ' ( x, y, t )  Px , y I ( x, y, t )    w( )I ( x, y, )  © 2005-2008 Prof. Dr. R. Lienhart, Head of Multimedia Computing, Institut für Informatik, Universität Augsburg 13 Eichleitnerstr. 30, D-86135 Augsburg, Germany; email: Rainer.Lienhart@informatik.uni-augsburg.de
  • 14. Temporal Image Averaging © 2005-2008 Prof. Dr. R. Lienhart, Head of Multimedia Computing, Institut für Informatik, Universität Augsburg 14 Eichleitnerstr. 30, D-86135 Augsburg, Germany; email: Rainer.Lienhart@informatik.uni-augsburg.de
  • 15. Illumination Correction Where is always – Uneven illumination – Dust on lenses – Uneven spatial CCD sensitivity  Introduce systematic errors I ( x, y ) I ' ( x, y )  c Ref image taken R ( x, y ) with full illumination I ( x, y )  B( x, y ) I ' ( x, y )  c R( x, y )  B( x, y) BG image taken without illumination (fixed pattern noise on CCD) © 2005-2008 Prof. Dr. R. Lienhart, Head of Multimedia Computing, Institut für Informatik, Universität Augsburg 15 Eichleitnerstr. 30, D-86135 Augsburg, Germany; email: Rainer.Lienhart@informatik.uni-augsburg.de
  • 16. Windowing © 2005-2008 Prof. Dr. R. Lienhart, Head of Multimedia Computing, Institut für Informatik, Universität Augsburg 16 Eichleitnerstr. 30, D-86135 Augsburg, Germany; email: Rainer.Lienhart@informatik.uni-augsburg.de