the following description and drawings are illustrative of the invention and are not to be construed as limiting the invention . numerous specific details are described to provide a thorough understanding of the present invention . however , in certain instances , well known or conventional details are not described in order to avoid obscuring the description of the present invention . references to one or an embodiment in the present disclosure are not necessarily references to the same embodiment ; and , such references mean at least one . in one embodiment of the present invention , details in different ranges and different regions of a high dynamic range scene are blended into a composite image with a lower dynamic range suitable for a low dynamic range device ( e . g ., a monitor or a printer ). fig1 illustrates a method to combine low dynamic range images of a high dynamic range scene to generate a low dynamic range image representative of the high dynamic range scene according to one embodiment of the present invention . in fig1 , low dynamic range images ( 101 and 103 ) capture the details in different ranges and in different regions of a scene . for example , the high exposure image ( 101 ) has a region ( 105 ) which corresponds to a high radiance region and is saturated . the details in the high radiance region ( 105 ) in the high exposure image ( 101 ) are not recognizable . however , the details in the region outside the high radiance region ( 105 ) are well captured in the high exposure image ( 101 ). on the other hand , the details in the high radiance region ( 107 ) are well captured in the low exposure image ( 103 ). however , the details in the low radiance regions outside the high radiance region ( 107 ) are not recognizable in the low exposure image ( 103 ). in a typical example which includes images such as images 101 and 103 , the image 101 captures more light than the image 103 ( e . g ., image 101 is taken at f / 2 for 1 / 30 of a second while image 103 is taken f / 8 for 1 / 30 of a second ; or image 101 is taken at f / 4 for 1 / 30 of a second while image 103 is taken at f / 4 for 1 / 60 of a second ). in one embodiment of the present invention , the low dynamic range images ( 101 and 103 ) are blended into one image ( 121 ) which provides more recognizable details in a single image . when an observer looks into different regions , his visual system adapts to the local radiance level . since the blended image ( 121 ) presents local details according to the local radiance level , viewing different portions of the image ( 121 ) provides an experience similar as an observer looks into different portions of the high dynamic range scene . in one embodiment of the present invention , the low dynamic range images are blended according to a weight distribution ( 113 ) which based on the distribution of different ranges in different locations in the scene and this blending and the calculation of the weight distributions may be performed automatically ( e . g ., by a computer or camera or other data processing system ). for example , in one embodiment , a mask ( 111 ) is generated ( 131 ) from the high exposure image ( 101 ) to capture the saturated area which can be better represented by the corresponding portion of the low exposure image ( 103 ). the mask ( 111 ) shows a region ( 115 ) corresponding to the saturated area ( 105 ) of the high exposure image ( 101 ). the mask ( 111 ) can be used directly to insert the details from the corresponding region in the low exposure image ( 103 ) into the corresponding region in the high exposure image ( 101 ). alternatively , to provide a transition and avoid abrupt changes , the mask ( 111 ) is blurred ( 133 ) to generate the weight distribution ( 113 ). inside the region ( 117 ), the weight distribution has heavier weight for the low exposure image ( 103 ) and lighter weight for the high exposure image ( 101 ); outside the region ( 117 ), the weight distribution has lighter weight for the low exposure image ( 103 ) and heavier weight for the high exposure image ( 101 ); and the weight transitions smoothly in between . thus , when the low dynamic range images ( 101 and 103 ) are blended ( 135 ) using the weight distribution ( 113 ) into the blended image ( 121 ), the details captured in the region ( 107 ) of the low exposure image ( 103 ) are shown in the region ( 123 ) of the blended image ( 121 ) and the details captured outside the region ( 105 ) of the high exposure image ( 101 ) shown outside the region ( 123 ) of the blended image ( 121 ). in fig1 , the processing may also start with the low exposure image ( 103 ) to determine a mask for the region where details of the scene are not well captured due to the limitation on dynamic range . the mask generated from the low exposure image may appear to be similar to the mask ( 111 ) generated from the high exposure image ( 101 ). the mask generated from the low exposure image can be blurred to generate a weight distribution to blend the details captured in the high exposure image into the dark region of the low exposure image . in one embodiment of the present invention , more than two images can be blended into a resulting image in a similar way . for example , a first image of one exposure setting can be examined to determine the dark regions and bright regions where the details may not be well captured under the exposure setting . for example , the bright regions and the dark regions may be the regions with pixels having pixel values reaching the upper or lower saturation values , or within a threshold away from the saturated values ( e . g ., larger than 95 % of the upper saturation value or less than 5 % of the lower saturation value ). a second image having an exposure setting higher than the first image can be used to capture the details in the dark regions . the mask showing the dark regions can be blurred to generate the weight distribution to blend the details captured in the second image into the dark regions of the first image . similarly , a third image having an exposure setting lower than the first image can be used to capture the details in the bright region ; and the weight distribution generated according to the shape of the bright region can be used to blend the details captured in the third image into the bright region of the first image . further , the second image may have dark regions , within which details can be further captured using a fourth image that has a exposure setting higher than the second image . thus , the details captured in the fourth image can be blended into the resulting image using the mask showing the dark regions of the second image . similarly , the third image may have bright regions , within which details can be further captured using a fifth image that has a exposure setting lower than the third image ; and the details captured in the fifth image can be blended into the resulting image using the mask showing the bright regions of the third image . thus , different exposure settings can be used to capture details in different ranges , which are typically in different regions of the scene . in one embodiment of the present invention , the shape of the regions are used to derive the weight distributions , which are used to blend the details captured in different regions and different ranges into the resulting image . in such away , visible details in various regions of the high dynamic range scene are captured in the resulting low dynamic range image . the resulting image allows an observer to look at a particular region to obtain the details in that region . the resulting image provides a similar viewing experience as the original high dynamic range scene . in one embodiment of the present invention , the mapping from the radiance in the scene to the pixel values in the resulting image is monotonic . thus , the overall look and feel of the high dynamic range scene is preserved in the resulting low dynamic range image . for example , when blending the details captured in the first image and the details captured in the second image , the pixel values of the first and second images can be scaled so that in the blended image the pixel values in the region corresponding to the dark region of the first image , which takes the details from the corresponding region in the second image , has pixel values lower than the pixel values in other regions that are brighter than the dark region in the first image . in one embodiment of the present invention , the mapping from the radiance in the scene to the pixel values in the resulting image is not monotonic . for example , when blending the details captured in the first image and the details captured in the second image , pixels of the resulting image showing the details captured in the first image and pixels of the resulting image showing the details captured in the second image may be in the same pixel value range , even though in the high dynamic range scene the details captured in the first and second image are in different radiance ranges . such an arrangement in the resulting image may change the overall look and feel of the scene . however , using a portion of pixel value range to map the details of different radiance range can expand the pixel value ranges available to show the details . thus , the details in first and second resulting images in different ranges of radiances can be better presented in the resulting low dynamic range image . in one embodiment of the present invention , the tradeoff between showing the overall look and feel of the global differences in radiance ranges in different regions and showing the details in different regions in different ranges of radiance ranges can be made through adjusting the degree of overlapping in the pixel value ranges in the corresponding regions of the resulting low dynamic range image . fig2 - 6 illustrate methods to render a high dynamic range image into a low dynamic range image according to one embodiment of the present invention . in fig2 - 6 , distributions along a line in the images are illustrated . from the illustration along the line in the image , a person skilled in the art can see the processing for the two dimensional array of pixels . in fig2 , the distribution of logarithm of radiance ( 201 ) is shown . a high dynamic range image typically includes information to show the distribution of radiance in the array of pixels . the range of the radiance is typically much high than the available range for a display or a print . for example , in fig2 , the available dynamic range for a display device may correspond to the range between z min ( 205 ) and z max ( 203 ). the low dynamic range [ z min , z max ] can accommodate only a portion of the range of radiance of the high dynamic range image ( 201 ). using different exposure settings , different portions of the radiance of the high dynamic range image can be captured . for example , using a high exposure setting , a lower portion of the radiance distribution is captured ( 207 ) as the distribution ( 211 ), which has a portion ( 213 ) saturated at the upper limit z max . similarly , when a low exposure setting is used , a higher portion of the radiance distribution is captured ( 209 ) as the distribution ( 215 ), which has a portion saturated at the lower limit z min . although fig2 shows capturing of details in portions of the entire dynamic range of the original image through a line mapping , it is understood that in general nonlinear mapping can also be used . a typical photographing process typically involves a nonlinear mapping g such that where e is irradiance which is proportional to the radiance l ; t is the exposure duration ; and z is the pixel value . thus , in general , a liner or nonlinear mapping g can be used to capture a portion of the dynamic range of the high dynamic range image ( e . g ., 201 ) to generate a low dynamic range image ( e . g ., 211 or 215 ), in a way similar to taking a picture of the high dynamic range scene . it is seen that different exposure settings lead to different detail visibility in different portions of the high dynamic range image . in one embodiment of the present invention , details in different ranges of the high dynamic range image are blended into a low dynamic range to show the details in different regions in the same image . for example , in fig3 , a threshold value , z threshold , is used to determine the region for improvement based on the low dynamic range image ( 221 ). the threshold value can be a saturation value , such as z max , or a value close to z max ( e . g ., 95 % of z max ). a region that reaches the threshold is then determined ( 225 ) to generate a mask ( 227 ). the mask ( 227 ) shows the region that reaches the threshold , in which the details of the original image is not well captured and improvement can be performed through blending the details from a higher portion of range of the original image . to provide a smooth transition , the mask ( 227 ) can be used to generate a smooth weight function . for example , the mask 227 showing the region can be blurred ( 229 ) to generate the weight function ( 231 ) through a typically gaussian blur operation of image processing . the weight function allows a blending process to preserve the details of the distribution ( 221 ) outside the detected region that reaches the threshold and to fill the detected region with details from a different range of the high dynamic range image . for example , in fig4 , different ranges of the high dynamic range image are captured as low dynamic range images ( 241 and 245 ), which have radiances l a and l b respectively . it is seen that the image ( 241 ) has a region ( 243 ) which is saturated to the upper limit ( z max ) and can be enhanced with the details captured in the corresponding region in the image ( 245 ). the weight distribution ( 249 ) can be derived from blurring the region that reaches z max ; and the weight distribution ( 247 ) is compliment to the weight distribution ( 249 ) such that w a = 1 − w b . blending ( 251 ) the images ( 241 and 245 ) using the weight distributions ( 247 and 249 ) leads to the resulting image ( 253 ) which shows the details in regions both inside and outside the region corresponding to the saturated region ( 243 ) of the image ( 241 ). when the low dynamic image ( 253 ) in fig4 is compared to the high dynamic range image ( 201 ) in fig4 , it is seen that the overall look or feel is altered , since information in different ranges in the high dynamic range image is mapped into the same range of the low dynamic range image . however , the local details are well preserved in various regions of the low dynamic range image . to preserve look and feel of the overall image , details from different ranges of the dynamic range image can be mapped to different ranges of the low dynamic range image . for example , in fig5 , the image ( 241 ) of fig4 is scaled to occupy only a portion of the target low dynamic range . for example , a linear scaling can be performed so that the image ( 261 ) uses the range [ z min , z c ] instead of [ z min , z max ]. similarly , the scaling can be performed so that the information in a range above that captured in the image ( 261 ) is in the range of [ z c , z min ] in image 263 . after the images ( 261 and 263 ) are blended ( 251 ) using the weight distributions ( 247 and 249 ), the resulting image ( 265 ) shows the overall look and feel of the high dynamic range image . in general , a tradeoff between the global look and feel and the visibility of local details can be balanced through the partial overlapping the target ranges mapped from non - overlapping ranges of the high dynamic range image . for example , in fig6 , the details from one range of the original image are mapped into the target range [ z min , z a ] in the image ( 271 ); and the details from another range of the original image , which is high than that represented by the image ( 271 ), are mapped into the target range [ z b , z max ] in the image ( 273 ). the ranges [ z min , z a ] and [ z b , z max ] partially overlap with each other . the less the overlapping , the better the overall look and feel is , but the less recognizable local details . when the overlapping increases , the ranges available to show the details in each of images ( 271 and 273 ) increase , which leads to better rendering of local details . the images ( 271 and 273 ) can then be blended ( 251 ) using the weight distributions ( 247 and 249 ) into the resulting low dynamic range image ( 275 ), which provides the tradeoff between the overall look and feel and the visibility of local details . in general , it is not necessary to create the intermediate low dynamic range images , such as images ( 271 and 273 ), to generate the resulting low dynamic image , such as the image ( 275 ). the information showing in the intermediate low dynamic range images , such as images ( 271 and 273 ), are readily available from the high dynamic range image , which can be used to directly compute the weight distributions and generate the resulting low dynamic range image ( 275 ). for example , the dynamic range of a high dynamic range image can be spliced into a plurality of source ranges , such as [ l 1 , l 2 ], [ l 2 , l 3 ], . . . , [ l n , l n + 1 ]. the regions corresponding to l & gt ; l 2 , l & gt ; l 3 , . . . , l & gt ; l n can be determined from the pixel values of the high dynamic range image . masks m 2 , m 3 , . . . , m n corresponding to these regions can be blurred to generate the weight distributions w 2 , w 3 , . . . , w n respectively . the details in the plurality of source ranges can be mapped into corresponding target ranges [ z 1l , z 1u ], [ z 2l , z 2u ], . . . , [ z nl , z nu ] through mappings h 1 , h 2 , . . . , h n . typically , the mappings h 1 , h 2 , . . . , h n are of the same type ( e . g ., linear mapping for logarithm of radiance ). however , different types of mappings can also be used for different source ranges . the target ranges [ z 1l , z 1u ], [ z 2l , z 2u ], . . . , [ z nl , z nu ] may be the same ( e . g ., [ z min , z max ]) to emphasis the visibility of details in each of the source ranges , or partially overlapping to balance the overall look and feel and the visibility of local details . in one embodiment , weighted averages of the target ranges ( e . g ., weighted according to the pixels in the corresponding regions ) increase monotonically to show the overall look and feel of brightness in various regions in the scene . alternatively , the source ranges are monotonically mapped into the target range [ z min , z max ] to emphasis the overall look and feel . h n ( l )× w n +( 1 − w n )×( h n − 1 ( l )× w n − 1 +( 1 − w n − 1 )×( . . . +( 1 − w 2 )× h 1 ( l ))) z 2 = h 1 ( l )×( 1 − w 2 )+ h 2 ( l )× w 2 z i = z i − 1 ×( 1 − w i )+ h i ( l )× w i in one embodiment of the present invention , the process starts with the mid - tone range . details in the bright regions and dark regions are then blended in using the weight functions derived from the shape of the bright regions and dark regions . in one embodiment of the present invention , the entire radiance range of the high dynamic range image is segmented into more than two source ranges . combining the details from different source ranges in different regions into a final low dynamic range image , which has the appearance of a high dynamic range image , can be performed in one step or in multiple steps ( e . g ., using the above direct expression or the above expressions for the iterative process ). when one step is used to combine the details , information from n segments of the entire dynamic range of the high dynamic range image is determined and mixed based on n − 1 masks . when multiple steps are used , more details captured in adjacent range segments can be mixed into an image that is initially based on a selected range segment ( e . g ., a mid tone segment ), until the information from a desirable portion of the entire dynamic range of the original image is covered . for example , the details from adjacent range segments can be mixed in to the image one at a time , until the saturated regions in the image are small enough such that one can ignore the details within the saturated regions . fig7 shows a method to generate a low dynamic range image for a dynamic range scene according to one embodiment of the present invention . operation 301 detects one or more regions in a first image of a high dynamic range scene according to an intensity threshold . operation 303 computes a weight distribution according to the one or more regions . operation 305 combines a second image of the same scene with the first image to generate a low dynamic range image . the weight distribution allows the content within the one or more regions to be replaced with the content in the corresponding regions of the second image . thus , details captured with different exposure settings in different portions of a high dynamic range scene can be merged into one low dynamic image . the first and second images may be directly obtained from a digital camera . alternatively , the first and second images may be constructed from a high dynamic range image . fig8 shows a method to generate a low dynamic range image for a dynamic range scene according to one embodiment of the present invention . in fig8 , if operation 311 determines that there is a saturated bright region in a low dynamic range image of a high dynamic range scene , operation 313 detects one or more saturated bright regions in the image according to an intensity threshold . the bright regions with pixels having pixel values above the threshold are considered as saturated regions . operation 315 blurs the one or more regions to generate a weight distribution . operation 317 blends the image , using the weight distribution , with another image of the same scene obtained at a lower exposure setting . note that the lower exposure setting may not be able to capture all details in the bright region . after the details captured in the image with the lower exposure setting is blended into the low dynamic range image , the low dynamic range image may still have one or more saturated bright regions within the previously determined bright regions . thus , operations 313 - 317 may be repeated for a further lower exposure setting . if operation 319 determines that there is a saturated dark region in the image , operation 321 detects one or more saturated dark regions in the image according to an intensity threshold . the dark regions with pixels having pixel values below the threshold are considered as saturated regions . operation 323 blurs the one or more regions to generate a weight distribution . operation 325 blends the image using the weight distribution with another image of the same scene obtained at a higher exposure setting . note that the higher exposure setting may not be able to capture all details in the dark region . after the details captured in the image with the higher exposure setting is blended into the low dynamic range image , the low dynamic range image may still have one or more saturated dark regions within the previously determined dark regions . thus , operations 321 - 325 may be repeated for a further higher exposure setting . operations 311 - 325 can be repeated until there is no further saturated regions in the resulting low dynamic range image ( or when the saturated regions are small enough ). fig9 shows an example of an image taking system which may be used in embodiments of the invention . this imaging device 401 may be , for example , a digital still or video ( movie ) camera . the imaging device 401 includes a microcontroller or microprocessor 405 which is coupled by a bus 402 to a memory 403 , an input / output ( i / o ) port 411 , a ccd ( charge coupled device ) image sensor 409 , and a rom ( read only memory ) 407 . the imaging device 401 may also include a liquid crystal display ( lcd ) 421 , which is also coupled to the bus 402 and which may be used to display images which are captured or recorded by the imaging device 401 . the lcd 421 serves as a viewfinder of a camera and there may optionally be other types of image display devices on imaging device 401 which can serve as a viewfinder . the imaging device 401 also includes an imaging lens 413 which can be disposed over ccd 409 . the microprocessor 405 controls the operation of the imaging device 401 ; and , it may do so by executing a software program stored in rom 407 , or in the microprocessor 405 , or in both rom 407 and the microprocessor 405 . the microprocessor 405 controls the image processing operation ; and , it controls the storage of a captured image in memory 403 . the microprocessor 405 also controls the exporting of image data ( which may or may not be color corrected ) to an external general purpose computer or special purpose computer through one of the i / o ports 411 . the microprocessor 405 also responds to user commands ( e . g ., a command to “ take ” a picture by capturing an image on the ccd and storing it in memory or a command to select an option for contrast enhancement and color balance adjustment ). the rom 407 may store software instructions for execution by the microprocessor 405 to derive an exposure function and generate high dynamic range images from series of images with different exposure duration . the memory 403 is used to store captured / recorded images which are received from the ccd 409 . it will be appreciated that other alternative architectures of a camera can be used with the various embodiments of the invention . in one embodiment , the imaging device 401 has a housing ( not shown in fig9 ) and the lens 413 and lcd 421 are coupled to the housing . the microcontroller 405 and image sensor 409 are enclosed within the housing . in one embodiment , the rom 407 and memory 403 are also enclosed within the housing . in one embodiment , when the imaging device 401 is instructed to capture a high dynamic range image of a scene , a set of images are taken automatically with a number of different exposure durations . the microcontroller ( 405 ) then merges the set of images into one low image showing the details captured in the set of images for regions of different ranges . the user may select the option of preserving the global look and feel or presenting more details , or a degree of tradeoff between these two conflicting goals . the resulting low dynamic range image can then be displayed on the lcd 421 . in one embodiment , a high dynamic range image is also derived from the set of images . examples and details of deriving a high dynamic range image from a plurality of images of different exposure settings can be found in a co - pending u . s . patent application , attorney docket no . 04860 . p3534 , entitled “ transfer function and high dynamic range images ”, filed on the same day with the present invention , which is hereby incorporated herein by reference . in one embodiment , a software and / or hardware module is built into a printer to generate and print a low dynamic range image with a high dynamic range appearance when a high dynamic range image is received for printing . many of the methods of the present invention may be performed with a digital processing system , such as a conventional , general - purpose computer system . special purpose computers , which are designed or programmed to perform only one function , may also be used . fig1 shows one example of a typical computer system which may be used with the present invention . note that while fig1 illustrates various components of a computer system , it is not intended to represent any particular architecture or manner of interconnecting the components as such details are not germane to the present invention . it will also be appreciated that network computers and other data processing systems which have fewer components or perhaps more components may also be used with the present invention . the computer system of fig1 may , for example , be an apple macintosh computer . as shown in fig1 , the computer system 501 , which is a form of a data processing system , includes a bus 502 which is coupled to a microprocessor 503 and a rom 507 and volatile ram 505 and a non - volatile memory 506 . the microprocessor 503 , which may be , for example , a g3 , g4 , or c5 microprocessor from motorola , inc . or ibm is coupled to cache memory 504 as shown in the example of fig1 . the bus 502 interconnects these various components together and also interconnects these components 503 , 507 , 505 , and 506 to a display controller and display device 508 and to peripheral devices such as input / output ( i / o ) devices which may be mice , keyboards , modems , network interfaces , printers , scanners , video cameras and other devices which are well known in the art . typically , the input / output devices 510 are coupled to the system through input / output controllers 509 . the volatile ram 505 is typically implemented as dynamic ram ( dram ) which requires power continually in order to refresh or maintain the data in the memory . the non - volatile memory 506 is typically a magnetic hard drive a magnetic optical drive or an optical drive or a dvd ram or other type of memory systems which maintain data even after power is removed from the system . typically , the non - volatile memory will also he a random access memory although this is not required . while fig1 shows that the non - volatile memory is a local device coupled directly to the rest of the components in the data processing system , it will be appreciated that the present invention may utilize a non - volatile memory which is remote from the system , such as a network storage device which is coupled to the data processing system through a network interface such as a modem or ethernet interface . the bus 502 may include one or more buses connected to each other through various bridges , controllers and / or adapters as is well known in the art . in one embodiment the i / o controller 509 includes a usb ( universal serial bus ) adapter for controlling usb peripherals , and / or an ieee - 1394 bus adapter for controlling ieee - 1394 peripherals . it will be apparent from this description that aspects of the present invention may be embodied , at least in part , in software . that is , the techniques may be carried out in a computer system or other data processing system response to its processor , such as a microprocessor , executing sequences of instructions contained in a memory , such as rom 507 , volatile ram 505 , non - volatile memory 506 , cache 504 or a remote storage device . in various embodiments , hardwired circuitry may be used in combination with software instructions to implement the present invention . thus , the techniques are not limited to any specific combination of hardware circuitry and software nor to any particular source for the instructions executed by the data processing system . in addition , throughout this description , various functions and operations are described as being performed by or caused by software code to simplify description . however , those skilled in the art will recognize what is meant by such expressions is that the functions result from execution of the code by a processor , such as the microprocessor 503 . a machine readable medium can be used to store software and data which when executed by a data processing system causes the system to perform various methods of the present invention . this executable software and data may be stored in various places including for example rom 507 , volatile ram 505 , non - volatile memory 506 and / or cache 504 as shown in fig1 . portions of this software and / or data may be stored in any one of these storage devices . thus , a machine readable medium includes any mechanism that provides ( i . e ., stores and / or transmits ) information in a form accessible by a machine ( e . g ., a computer , network device , personal digital assistant , manufacturing tool , any device with a set of one or more processors , etc .). for example , a machine readable medium includes recordable / non - recordable media ( e . g ., read only memory ( rom ); random access memory ( ram ); magnetic disk storage media ; optical storage media ; flash memory devices ; etc . ), as well as electrical , optical , acoustical or other forms of propagated signals ( e . g ., carrier waves , infrared signals , digital signals , etc . ); etc . the methods of the present invention can be implemented using dedicated hardware ( e . g ., using field programmable gate arrays , or application specific integrated circuit , which many be integrated with image sensors , such as ccd or cmos based image sensors ) or shared circuitry ( e . g ., microprocessors or microcontrollers under control of program instructions stored in a machine readable medium , such as memory chips ) for an imaging device , such as system 401 in fig9 . the methods of the present invention can also be implemented as computer instructions for execution on a data processing system , such as system 501 of fig1 . in the foregoing specification , the invention has been described with reference to specific exemplary embodiments thereof . it will be evident that various modifications may be made thereto without departing from the broader spirit and scope of the invention as set forth in the following claims . the specification and drawings are , accordingly , to be regarded in an illustrative sense rather than a restrictive sense .