技术领域technical field
本发明涉及一种高动态范围全景图像的生成方法,属于数字图像处理技术领域。The invention relates to a method for generating a panoramic image with a high dynamic range, and belongs to the technical field of digital image processing.
背景技术Background technique
目前,大多数图像的每个颜色通道的深度都是用8位来存储的,但是在一些对质量要求苛刻和精密的传感器领域中,对深度更高的能力的需求正在快速增长。如在数字媒体领域,因为缺乏理想的对比度和亮度范围,通常要使用高动态范围图像,特别是在那些虚拟与真实的素材进行无缝融合的时候。Currently, the depth of each color channel of most images is stored in 8 bits, but in some quality-critical and sophisticated sensor areas, the demand for higher depth capabilities is growing rapidly. For example, in the field of digital media, due to the lack of ideal contrast and brightness range, high dynamic range images are often used, especially when those virtual and real materials are seamlessly blended.
基于增强现实的立体电影制作过程中,决定真实场景、角色同虚拟场景、角色合成效果真实感的一个关键技术是虚实融合的一致性技术,包括明暗、反射、阴影等方面。早期基于增强现实的立体电影制作过程中,光照效果的解决方案多是虚拟布光和后期调整,这种方法只能提供一种近似的逼真感,无法做到物理层面的逼真,并且这种方法需要花费大量的后期制作时间和精力,如果更换了环境,则需要对场景进行重新布光和调整。采用基于图像的光照技术,利用现实世界的光照图像来确定现实和虚拟场景的光照方法,可以得到以增强现实为目的的虚实无缝融合效果。真实场景中的光照相当复杂,来自各种各样的光源,比如天空光、面光源等直接光照以及物体之间相互反射而产生间接光照,很难用计算机图形学中的虚拟光源,如点光源、线光源、面光源或方向光源来表示。然而,高动态范围图像能记录真实场景中最亮区域和最暗区域的照明信息,基于图像的光照技术用它来代替虚拟光源“照亮”虚拟对象,能使虚拟对象很好地融入周围的真实场景,产生真实的光照效果。In the process of stereoscopic film production based on augmented reality, a key technology that determines the realism of real scenes, characters and virtual scenes, and character synthesis effects is the consistency technology of virtual and real fusion, including light and shade, reflection, shadows, etc. In the early stereoscopic film production process based on augmented reality, the solutions for lighting effects were mostly virtual lighting and post-adjustment. This method can only provide an approximate sense of realism, but cannot achieve physical reality, and this method It takes a lot of post-production time and effort, and if the environment is changed, the scene needs to be re-lit and adjusted. Using image-based lighting technology, using real-world lighting images to determine the lighting methods of real and virtual scenes, the seamless fusion effect of virtual and real for the purpose of augmented reality can be obtained. The lighting in real scenes is quite complicated, coming from various light sources, such as direct lighting such as sky light and surface light source, and indirect lighting caused by mutual reflection between objects. It is difficult to use virtual light sources in computer graphics, such as point light sources. , line light source, area light source or directional light source to represent. However, high dynamic range images can record the lighting information of the brightest and darkest areas in the real scene. Image-based lighting technology uses it to replace virtual light sources to "illuminate" virtual objects, which can make virtual objects blend well into the surrounding environment. Real scene, produce real lighting effect.
基于图像的光照,其核心技术是记录真实场景光照信息载体(高动态范围图像)的获取。目前,已经有很多方法合成高动态图像的方法,如Debevec与Malik算法、Nayar算法,以及它们的各种改算法。对于全景高动态范围图像,主要有Debevec等人提出的“light probe”(光探测器),光探测器实际上就是一个固定在杆子上的镜面球体,把这个球放置在想要记录照明和反射信息的点,然后用普通相机来拍摄一系列的照片,生成高动态范围图像。另外一种方式是拍摄多幅从不同方向观看的图像照片,然后使用图像拼合技术把它们结合起来,每次拍摄较大覆盖区域的一个好办法是使用鱼眼镜头,可以使用最少两幅图像来覆盖全部区域,由此来生成高动态范围图像。但是这两种方法存在操作或算法复杂的缺点。还有一种方式是直接通过全景相机获取高动态范围图像,但是该方法只能采用相机本身提供的固定方法,相机快门的设置数量固定或者无法直接显示。Image-based lighting, its core technology is to record the acquisition of real scene lighting information carrier (high dynamic range image). At present, there are already many methods for synthesizing high dynamic images, such as Debevec and Malik algorithm, Nayar algorithm, and their various modification algorithms. For panoramic high dynamic range images, there are mainly "light probes" (light detectors) proposed by Debevec et al. The light probe is actually a mirror sphere fixed on a pole. The points of information are then taken with an ordinary camera to take a series of pictures, producing a high dynamic range image. Another way is to take multiple pictures of images viewed from different directions, and then use image stitching technology to combine them. A good way to take a larger coverage area at a time is to use a fisheye lens. You can use a minimum of two images to Covers the entire area, thereby generating a high dynamic range image. However, these two methods have disadvantages of complex operations or algorithms. Another way is to directly obtain high dynamic range images through the panoramic camera, but this method can only use the fixed method provided by the camera itself, and the number of camera shutter settings is fixed or cannot be directly displayed.
发明内容Contents of the invention
本发明目的在于提供一种高动态范围全景图像的生成方法,其针对静止场景,具有高效、精准等优点,更适合在实际中使用。The purpose of the present invention is to provide a method for generating a high dynamic range panoramic image, which has the advantages of high efficiency and precision for static scenes, and is more suitable for practical use.
本发明的技术方案是这样实现的:一种高动态范围全景图像的生成方法,其特征在于:由Ladybug3TM全景摄像机、高性能图形工作站这里就是一台计算机组成,其中Ladybug3TM全景摄像机通过电缆与高性能图形工作站相连;具体的工作步骤如下:The technical scheme of the present invention is achieved in that a kind of generation method of high dynamic range panorama image is characterized in that: by Ladybug3TM panorama camera, high-performance graphic workstation here is exactly a computer to form, and wherein Ladybug3TM panorama camera passes cable and The high-performance graphics workstation is connected; the specific working steps are as follows:
步骤1、启动高性能图形工作站,将Ladybug3TM全景摄像机放置在场景中的适当位置,确保Ladybug3TM全景摄像机能够捕获到场景中的光源;Step 1. Start the high-performance graphics workstation, place the Ladybug3TM panoramic camera at an appropriate position in the scene, and ensure that the Ladybug3TM panoramic camera can capture the light source in the scene;
步骤2、依次设置Ladybug3TM全景摄像机中所有的摄像机的曝光系数N次,N为大于零的正整数,设曝光系数分别为E_i,其中i=1,2,3… N;每个曝光系数彼此都不相同;Step 2. Set the exposure coefficients of all the cameras in the Ladybug3TM panorama camera in sequence N times, where N is a positive integer greater than zero, and the exposure coefficients are respectively E_i, where i=1, 2, 3... N; are not the same;
步骤3、利用Ladybug3TM全景摄像机,获取曝光系数为E_i, i=1,2,3… N时的全景图像,并保存到image_i中,i=1,2,3… N;Step 3. Use the Ladybug3TM panoramic camera to obtain the panoramic image when the exposure coefficient is E_i, i=1,2,3...N, and save it in image_i, i=1,2,3...N;
步骤4、将文件名image_i,i=1,2,3…N,合成一个文件数组files,将曝光系数E_i,i=1,2,3… N,合成一个曝光数组expTimes;Step 4. Synthesize the file name image_i, i=1, 2, 3...N into a file array files, and combine the exposure coefficient E_i, i=1, 2, 3...N into an exposure array expTimes;
步骤5、利用matlab7.6.0工具软件中的的makehdr函数和文件数组files,曝光数组expTimes生成高动态全景图像数据hdr;Step 5, utilize the makehdr function and the file array files in the matlab7.6.0 tool software, the exposure array expTimes generates the high dynamic range image data hdr;
步骤6、利用matlab7.6.0工具软件中的hdrwrite,将高动态全景图像数据hdr保存到高动态全景图像HdrImage.hdr中;通过以上步骤便可以快速、高精度地生成高动态范围全景图像。Step 6. Using hdrwrite in the matlab7.6.0 tool software, save the high dynamic range image data hdr to the high dynamic range image HdrImage.hdr; through the above steps, a high dynamic range panoramic image can be generated quickly and with high precision.
本发明的积极效果是借助Ladybug3TM全景摄像机,通过精确设置相机的不同曝光量,每个相机都同时获取在相应曝光量条件下的多幅图像,然后利用matlab中的函数生成每个相机的高动态范围图像,该方法具有高效、精准等优点,更适合在实际用使用,为确保虚实融合后场景的光照一致性打下坚实的基础。The positive effect of the present invention is that with the help of the Ladybug3TM panoramic camera, by precisely setting the different exposures of the cameras, each camera simultaneously acquires multiple images under the corresponding exposure conditions, and then utilizes the function in matlab to generate the height of each camera. For dynamic range images, this method has the advantages of high efficiency and precision, and is more suitable for practical use, laying a solid foundation for ensuring the consistency of lighting in the scene after virtual-real fusion.
附图说明Description of drawings
图1是一种高动态范围全景图像的生成方法所需设备构成图,其中:1为Ladybug3TM全景摄像机,2为高性能图形工作站。Fig. 1 is a configuration diagram of equipment required for a generation method of a high dynamic range panoramic image, wherein: 1 is a Ladybug3TM panoramic camera, and 2 is a high-performance graphics workstation.
具体实施方式Detailed ways
下面结合附图和实施例对本发明做进一步的描述:如图1所示,一种高动态范围全景图像的生成方法,其特征在于:由Ladybug3TM全景摄像机1、高性能图形工作站2组成,其中Ladybug3TM全景摄像机1通过电缆与高性能图形工作站2相连;具体的工作步骤如下:Below in conjunction with accompanying drawing and embodiment the present invention is further described: as shown in Figure 1, a kind of generation method of high dynamic range panoramic image is characterized in that: be made up ofLadybug3TM panoramic camera 1, high-performance graphics workstation 2, wherein The Ladybug3TM panoramic camera 1 is connected to the high-performance graphics workstation 2 through a cable; the specific working steps are as follows:
步骤1、启动高性能图形工作站2,将Ladybug3TM全景摄像机1放置在场景中的适当位置,确保Ladybug3TM全景摄像机1能够捕获到场景中的光源。Step 1. Start the high-performance graphics workstation 2, place the Ladybug3TM panoramic camera 1 at an appropriate position in the scene, and ensure that the Ladybug3TM panoramic camera 1 can capture the light source in the scene.
步骤2、利用高性能图形工作站2中的LadybugCapPro1.14.3.6软件的API函数ladybugCreateContext,产生一个Ladybug3TM全景摄像机1的上下文。Step 2, using the LadybugCapPro1.14.3.6 API function ladybugCreateContext of the software LadybugCapPro1.14.3.6 in the high-performance graphics workstation 2 to generate a context of the Ladybug3TM panoramic camera 1 .
步骤3、利用高性能图形工作站2中的LadybugCapPro1.14.3.6软件的API函数ladybugInitializeFromIndex,初始化Ladybug3TM全景摄像机1。Step 3, using the API function ladybugInitializeFromIndex of the LadybugCapPro1.14.3.6 software in the high-performance graphics workstation 2 to initialize the Ladybug3TM panoramic camera 1 .
步骤4、利用高性能图形工作站2中的LadybugCapPro1.14.3.6软件的API函数ladybugGetCameraInfo,获取Ladybug3TM全景摄像机1中的信息。Step 4, using the API function ladybugGetCameraInfo of the LadybugCapPro1.14.3.6 software in the high-performance graphics workstation 2 to obtain the information in the Ladybug3TM panoramic camera 1 .
步骤5、利用高性能图形工作站2中的LadybugCapPro1.14.3.6软件的API函数ladybugLoadConfig,加载Ladybug3TM全景摄像机1性能的配置文件。Step 5, using the LadybugCapPro1.14.3.6 API function ladybugLoadConfig of the software LadybugCapPro1.14.3.6 in the high-performance graphics workstation 2 to load the performance configuration file of the Ladybug3TM panoramic camera 1 .
步骤6、利用高性能图形工作站2中的LadybugCapPro1.14.3.6软件的API函数ladybugSetFalloffCorrectionAttenuation,设置Ladybug3TM全景摄像机1的当前衰减修正值。Step 6: Use the API function ladybugSetFalloffCorrectionAttenuation of the LadybugCapPro1.14.3.6 software in the high-performance graphics workstation 2 to set the current attenuation correction value of the Ladybug3TM panoramic camera 1 .
步骤7、利用高性能图形工作站2中的LadybugCapPro1.14.3.6软件的API函数ladybugStartLockNext,启动Ladybug3TM全景摄像机1。Step 7. Use the API function ladybugStartLockNext of the LadybugCapPro1.14.3.6 software in the high-performance graphics workstation 2 to start the Ladybug3TM panoramic camera 1 .
步骤8、利用高性能图形工作站2中的LadybugCapPro1.14.3.6软件的API函数ladybugSetRegister,依次设置Ladybug3TM全景摄像机1中所有的摄像机的曝光系数N次,N为大于零的正整数,设曝光系数分别为E_i,其中i=1,2,3… N;每个曝光系数彼此都不相同。Step 8, use the API function ladybugSetRegister of the LadybugCapPro1.14.3.6 software in the high-performance graphics workstation 2 to set the exposure coefficients of all cameras in the Ladybug3TM panoramic camera 1 in sequence N times, and N is a positive integer greater than zero, and the exposure coefficient is set They are E_i, where i=1, 2, 3... N; each exposure factor is different from each other.
步骤9、利用高性能图形工作站2中的LadybugCapPro1.14.3.6软件的API函数ladybugConfigureOutputImages,配置Ladybug3TM全景摄像机1的输出图像样式。Step 9, using the LadybugCapPro1.14.3.6 API function ladybugConfigureOutputImages of the software LadybugCapPro1.14.3.6 in the high-performance graphics workstation 2 to configure the output image style of the Ladybug3TM panoramic camera 1 .
步骤10、利用高性能图形工作站2中的LadybugCapPro1.14.3.6软件的API函数ladybugLockNext捕获曝光系数为E_i, i=1,2,3… N的全景图像,并保存到image_i中,i=1,2,3… N。Step 10, utilizing the API function ladybugLockNext of the LadybugCapPro1.14.3.6 software in the high-performance graphics workstation 2 to capture the panoramic image whose exposure coefficient is E_i, i=1,2,3...N, and save it in image_i, i=1, 2,3...N.
步骤11、利用高性能图形工作站2中的LadybugCapPro1.14.3.6软件的API函数ladybugStop,关闭Ladybug3TM全景摄像机1。Step 11, use the API function ladybugStop of the LadybugCapPro1.14.3.6 software in the high-performance graphics workstation 2 to turn off the Ladybug3TM panoramic camera 1 .
步骤12、将文件名image_i,i=1,2,3…N,合成一个文件数组files,将曝光系数E_i,i=1,2,3… N,合成一个曝光数组expTimes。Step 12. Synthesize the file name image_i, i=1, 2, 3...N into a file array files, and combine the exposure coefficient E_i, i=1, 2, 3...N into an exposure array expTimes.
步骤13、利用matlab7.6.0工具软件中的的makehdr函数和文件数组files,曝光数组expTimes生成高动态全景图像数据hdr。Step 13, using the makehdr function in the matlab7.6.0 tool software, the file array files, and the exposure array expTimes to generate high dynamic panoramic image data hdr.
步骤14、利用matlab7.6.0软件中的hdrwrite,将高动态全景图像数据hdr保存到高动态全景图像HdrImage.hdr中。Step 14. Using hdrwrite in the matlab7.6.0 software, save the high dynamic range image data hdr into the high dynamic range image HdrImage.hdr.
通过以上步骤便可以快速、高精度地生成高动态范围全景图像。Through the above steps, a high dynamic range panoramic image can be generated quickly and with high precision.
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201510055158.3ACN104657963A (en) | 2015-02-03 | 2015-02-03 | High-dynamic range panoramic image generation method |
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201510055158.3ACN104657963A (en) | 2015-02-03 | 2015-02-03 | High-dynamic range panoramic image generation method |
| Publication Number | Publication Date |
|---|---|
| CN104657963Atrue CN104657963A (en) | 2015-05-27 |
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN201510055158.3APendingCN104657963A (en) | 2015-02-03 | 2015-02-03 | High-dynamic range panoramic image generation method |
| Country | Link |
|---|---|
| CN (1) | CN104657963A (en) |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN106210554A (en)* | 2016-07-29 | 2016-12-07 | 长春理工大学 | A kind of method synthesizing high dynamic range images |
| CN108449541A (en)* | 2018-03-12 | 2018-08-24 | 维沃移动通信有限公司 | A panoramic image shooting method and mobile terminal |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN101963751A (en)* | 2010-08-19 | 2011-02-02 | 西北工业大学 | Device and method for acquiring high-resolution full-scene image in high dynamic range in real time |
| CN103141079A (en)* | 2010-10-05 | 2013-06-05 | 索尼电脑娱乐公司 | Image generation device, and image generation method |
| US20140176757A1 (en)* | 2012-09-04 | 2014-06-26 | William Guie Rivard | Color balance in digital photography |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN101963751A (en)* | 2010-08-19 | 2011-02-02 | 西北工业大学 | Device and method for acquiring high-resolution full-scene image in high dynamic range in real time |
| CN103141079A (en)* | 2010-10-05 | 2013-06-05 | 索尼电脑娱乐公司 | Image generation device, and image generation method |
| US20140176757A1 (en)* | 2012-09-04 | 2014-06-26 | William Guie Rivard | Color balance in digital photography |
| Title |
|---|
| DREAMING_MM: "Matlab图像处理相关函数", 《百度文库》* |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN106210554A (en)* | 2016-07-29 | 2016-12-07 | 长春理工大学 | A kind of method synthesizing high dynamic range images |
| CN106210554B (en)* | 2016-07-29 | 2019-01-25 | 长春理工大学 | A method for synthesizing high dynamic range images |
| CN108449541A (en)* | 2018-03-12 | 2018-08-24 | 维沃移动通信有限公司 | A panoramic image shooting method and mobile terminal |
| Publication | Publication Date | Title |
|---|---|---|
| KR102057488B1 (en) | 3D 360 Degree Virtual Reality Camera Exposure Control | |
| CN103366352B (en) | Apparatus and method for producing the image that background is blurred | |
| CN102812497B (en) | Video providing device capable of providing subsequent experience video, video providing method | |
| TW201444364A (en) | Way of camera control | |
| JP2018513640A (en) | Automatic panning shot generation | |
| CN110458964B (en) | A Real-time Calculation Method for Dynamic Illumination in Real Environment | |
| WO2017101561A1 (en) | Method for generating high dynamic range image, and photographing apparatus, terminal and imaging method | |
| WO2013082832A1 (en) | Method and device for image processing | |
| US20210075988A1 (en) | Method controlling image sensor parameters | |
| CN104899913B (en) | A kind of fluid special effect making method true to nature under virtual stage environment | |
| CN108805919A (en) | Light effect processing method, device, terminal and computer-readable storage medium | |
| CN104052913A (en) | Method for providing light painting effect and device for realizing the method | |
| KR101725024B1 (en) | System for real time making of 360 degree VR video base on lookup table and Method for using the same | |
| CN113034661B (en) | MatCap map generation method and device | |
| WO2023090038A1 (en) | Information processing apparatus, image processing method, and program | |
| CN105847659A (en) | Method, device and intelligent terminal for generating watermark image | |
| KR101704362B1 (en) | System for real time making of panoramic video base on lookup table and Method for using the same | |
| CN104657963A (en) | High-dynamic range panoramic image generation method | |
| CN103888669A (en) | Approach for camera control | |
| CN110493540B (en) | A method and device for real-time acquisition of scene dynamic lighting | |
| CN103873780A (en) | Video capture method and electronic equipment | |
| US10321069B2 (en) | System and method for photographic effects | |
| EP2590398B1 (en) | Displaying of images with lighting on the basis of captured auxiliary images | |
| EP3229070B1 (en) | Three-dimensional, 360-degree virtual reality camera exposure control | |
| CN106878591A (en) | Method for generating photo containing object moving track and related photographic device |
| Date | Code | Title | Description |
|---|---|---|---|
| C06 | Publication | ||
| PB01 | Publication | ||
| C10 | Entry into substantive examination | ||
| SE01 | Entry into force of request for substantive examination |