Direct Histogram Specify (continued)  
                        
                          
                              
                            Figure( 5. 9)                                | 
                           
                                                 
                        To obtain the z levels we apply the inverse of G  transform obtained, to the histogram equalized levels  .                          
                        Since we are dealing with inverse values an approximation must be made in the inverse mapping. For example the closest match to   is   or using the inverse  .  
                        Thus   is mapped to level  .Using this procedure yields the following mappings for
                                                
                          
                            
                              
                                
                                  
                                        
                                   
                                 
                               
                             
                           
                                               These results can be combined with those of histogram equalization to yield the following direct mappings                        
                          
                      Redistributing the pixels according to these mappings and dividing by n =4096 results in the histogram  
                      
                        
                            
                            Figure( 5.10)                             | 
                         
                                             Resulting histogram is not particularly close to the desired shape. Error decreases as no of levels increases.  
                      
                        
                           
  | 
                           
  | 
                           
  | 
                         
                        
                           
  | 
                          0   | 
                          0   | 
                         
                        
                           
  | 
                          0   | 
                          0   | 
                         
                        
                           
  | 
                          0   | 
                          0   | 
                         
                        
                           
  | 
                          790   | 
                          0.19   | 
                         
                        
                           
  | 
                          1023   | 
                          0.25   | 
                         
                        
                           
  | 
                          850   | 
                          0.21   | 
                         
                        
                           
  | 
                          985   | 
                          0.24   | 
                         
                        
                           
  | 
                          448   | 
                          0.11   | 
                         
                                              |