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

PLAI - Acceleration Program for Generative A.I. Startups
PLAI - Acceleration Program for Generative A.I. StartupsPLAI - Acceleration Program for Generative A.I. Startups
PLAI - Acceleration Program for Generative A.I. StartupsStefano
 
Enterprise Knowledge Graphs - Data Summit 2024
Enterprise Knowledge Graphs - Data Summit 2024Enterprise Knowledge Graphs - Data Summit 2024
Enterprise Knowledge Graphs - Data Summit 2024Enterprise Knowledge
 
Simplified FDO Manufacturing Flow with TPMs _ Liam at Infineon.pdf
Simplified FDO Manufacturing Flow with TPMs _ Liam at Infineon.pdfSimplified FDO Manufacturing Flow with TPMs _ Liam at Infineon.pdf
Simplified FDO Manufacturing Flow with TPMs _ Liam at Infineon.pdfFIDO Alliance
 
Free and Effective: Making Flows Publicly Accessible, Yumi Ibrahimzade
Free and Effective: Making Flows Publicly Accessible, Yumi IbrahimzadeFree and Effective: Making Flows Publicly Accessible, Yumi Ibrahimzade
Free and Effective: Making Flows Publicly Accessible, Yumi IbrahimzadeCzechDreamin
 
AI presentation and introduction - Retrieval Augmented Generation RAG 101
AI presentation and introduction - Retrieval Augmented Generation RAG 101AI presentation and introduction - Retrieval Augmented Generation RAG 101
AI presentation and introduction - Retrieval Augmented Generation RAG 101vincent683379
 
WSO2CONMay2024OpenSourceConferenceDebrief.pptx
WSO2CONMay2024OpenSourceConferenceDebrief.pptxWSO2CONMay2024OpenSourceConferenceDebrief.pptx
WSO2CONMay2024OpenSourceConferenceDebrief.pptxJennifer Lim
 
Powerful Start- the Key to Project Success, Barbara Laskowska
Powerful Start- the Key to Project Success, Barbara LaskowskaPowerful Start- the Key to Project Success, Barbara Laskowska
Powerful Start- the Key to Project Success, Barbara LaskowskaCzechDreamin
 
Where to Learn More About FDO _ Richard at FIDO Alliance.pdf
Where to Learn More About FDO _ Richard at FIDO Alliance.pdfWhere to Learn More About FDO _ Richard at FIDO Alliance.pdf
Where to Learn More About FDO _ Richard at FIDO Alliance.pdfFIDO Alliance
 
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo DiehlFuture Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo DiehlPeter Udo Diehl
 
Linux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdf
Linux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdfLinux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdf
Linux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdfFIDO Alliance
 
Structuring Teams and Portfolios for Success
Structuring Teams and Portfolios for SuccessStructuring Teams and Portfolios for Success
Structuring Teams and Portfolios for SuccessUXDXConf
 
Syngulon - Selection technology May 2024.pdf
Syngulon - Selection technology May 2024.pdfSyngulon - Selection technology May 2024.pdf
Syngulon - Selection technology May 2024.pdfSyngulon
 
Oauth 2.0 Introduction and Flows with MuleSoft
Oauth 2.0 Introduction and Flows with MuleSoftOauth 2.0 Introduction and Flows with MuleSoft
Oauth 2.0 Introduction and Flows with MuleSoftshyamraj55
 
Unpacking Value Delivery - Agile Oxford Meetup - May 2024.pptx
Unpacking Value Delivery - Agile Oxford Meetup - May 2024.pptxUnpacking Value Delivery - Agile Oxford Meetup - May 2024.pptx
Unpacking Value Delivery - Agile Oxford Meetup - May 2024.pptxDavid Michel
 
Intro in Product Management - Коротко про професію продакт менеджера
Intro in Product Management - Коротко про професію продакт менеджераIntro in Product Management - Коротко про професію продакт менеджера
Intro in Product Management - Коротко про професію продакт менеджераMark Opanasiuk
 
Introduction to FDO and How It works Applications _ Richard at FIDO Alliance.pdf
Introduction to FDO and How It works Applications _ Richard at FIDO Alliance.pdfIntroduction to FDO and How It works Applications _ Richard at FIDO Alliance.pdf
Introduction to FDO and How It works Applications _ Richard at FIDO Alliance.pdfFIDO Alliance
 
TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...
TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...
TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...marcuskenyatta275
 
Custom Approval Process: A New Perspective, Pavel Hrbacek & Anindya Halder
Custom Approval Process: A New Perspective, Pavel Hrbacek & Anindya HalderCustom Approval Process: A New Perspective, Pavel Hrbacek & Anindya Halder
Custom Approval Process: A New Perspective, Pavel Hrbacek & Anindya HalderCzechDreamin
 
Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...
Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...
Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...FIDO Alliance
 
Google I/O Extended 2024 Warsaw
Google I/O Extended 2024 WarsawGoogle I/O Extended 2024 Warsaw
Google I/O Extended 2024 WarsawGDSC PJATK
 

Recently uploaded (20)

PLAI - Acceleration Program for Generative A.I. Startups
PLAI - Acceleration Program for Generative A.I. StartupsPLAI - Acceleration Program for Generative A.I. Startups
PLAI - Acceleration Program for Generative A.I. Startups
 
Enterprise Knowledge Graphs - Data Summit 2024
Enterprise Knowledge Graphs - Data Summit 2024Enterprise Knowledge Graphs - Data Summit 2024
Enterprise Knowledge Graphs - Data Summit 2024
 
Simplified FDO Manufacturing Flow with TPMs _ Liam at Infineon.pdf
Simplified FDO Manufacturing Flow with TPMs _ Liam at Infineon.pdfSimplified FDO Manufacturing Flow with TPMs _ Liam at Infineon.pdf
Simplified FDO Manufacturing Flow with TPMs _ Liam at Infineon.pdf
 
Free and Effective: Making Flows Publicly Accessible, Yumi Ibrahimzade
Free and Effective: Making Flows Publicly Accessible, Yumi IbrahimzadeFree and Effective: Making Flows Publicly Accessible, Yumi Ibrahimzade
Free and Effective: Making Flows Publicly Accessible, Yumi Ibrahimzade
 
AI presentation and introduction - Retrieval Augmented Generation RAG 101
AI presentation and introduction - Retrieval Augmented Generation RAG 101AI presentation and introduction - Retrieval Augmented Generation RAG 101
AI presentation and introduction - Retrieval Augmented Generation RAG 101
 
WSO2CONMay2024OpenSourceConferenceDebrief.pptx
WSO2CONMay2024OpenSourceConferenceDebrief.pptxWSO2CONMay2024OpenSourceConferenceDebrief.pptx
WSO2CONMay2024OpenSourceConferenceDebrief.pptx
 
Powerful Start- the Key to Project Success, Barbara Laskowska
Powerful Start- the Key to Project Success, Barbara LaskowskaPowerful Start- the Key to Project Success, Barbara Laskowska
Powerful Start- the Key to Project Success, Barbara Laskowska
 
Where to Learn More About FDO _ Richard at FIDO Alliance.pdf
Where to Learn More About FDO _ Richard at FIDO Alliance.pdfWhere to Learn More About FDO _ Richard at FIDO Alliance.pdf
Where to Learn More About FDO _ Richard at FIDO Alliance.pdf
 
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo DiehlFuture Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
 
Linux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdf
Linux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdfLinux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdf
Linux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdf
 
Structuring Teams and Portfolios for Success
Structuring Teams and Portfolios for SuccessStructuring Teams and Portfolios for Success
Structuring Teams and Portfolios for Success
 
Syngulon - Selection technology May 2024.pdf
Syngulon - Selection technology May 2024.pdfSyngulon - Selection technology May 2024.pdf
Syngulon - Selection technology May 2024.pdf
 
Oauth 2.0 Introduction and Flows with MuleSoft
Oauth 2.0 Introduction and Flows with MuleSoftOauth 2.0 Introduction and Flows with MuleSoft
Oauth 2.0 Introduction and Flows with MuleSoft
 
Unpacking Value Delivery - Agile Oxford Meetup - May 2024.pptx
Unpacking Value Delivery - Agile Oxford Meetup - May 2024.pptxUnpacking Value Delivery - Agile Oxford Meetup - May 2024.pptx
Unpacking Value Delivery - Agile Oxford Meetup - May 2024.pptx
 
Intro in Product Management - Коротко про професію продакт менеджера
Intro in Product Management - Коротко про професію продакт менеджераIntro in Product Management - Коротко про професію продакт менеджера
Intro in Product Management - Коротко про професію продакт менеджера
 
Introduction to FDO and How It works Applications _ Richard at FIDO Alliance.pdf
Introduction to FDO and How It works Applications _ Richard at FIDO Alliance.pdfIntroduction to FDO and How It works Applications _ Richard at FIDO Alliance.pdf
Introduction to FDO and How It works Applications _ Richard at FIDO Alliance.pdf
 
TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...
TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...
TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...
 
Custom Approval Process: A New Perspective, Pavel Hrbacek & Anindya Halder
Custom Approval Process: A New Perspective, Pavel Hrbacek & Anindya HalderCustom Approval Process: A New Perspective, Pavel Hrbacek & Anindya Halder
Custom Approval Process: A New Perspective, Pavel Hrbacek & Anindya Halder
 
Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...
Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...
Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...
 
Google I/O Extended 2024 Warsaw
Google I/O Extended 2024 WarsawGoogle I/O Extended 2024 Warsaw
Google I/O Extended 2024 Warsaw
 

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