WO2018153149A1 - 一种基于感兴趣区域的自动聚焦方法及装置 - Google Patents
一种基于感兴趣区域的自动聚焦方法及装置 Download PDFInfo
- Publication number
- WO2018153149A1 WO2018153149A1 PCT/CN2017/117163 CN2017117163W WO2018153149A1 WO 2018153149 A1 WO2018153149 A1 WO 2018153149A1 CN 2017117163 W CN2017117163 W CN 2017117163W WO 2018153149 A1 WO2018153149 A1 WO 2018153149A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- normalized
- blocks
- sharpness
- width
- calculating
- Prior art date
Links
Images
Classifications
-
- G—PHYSICS
- G02—OPTICS
- G02B—OPTICAL ELEMENTS, SYSTEMS OR APPARATUS
- G02B7/00—Mountings, adjusting means, or light-tight connections, for optical elements
- G02B7/28—Systems for automatic generation of focusing signals
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N23/00—Cameras or camera modules comprising electronic image sensors; Control thereof
- H04N23/60—Control of cameras or camera modules
- H04N23/67—Focus control based on electronic image sensor signals
- H04N23/675—Focus control based on electronic image sensor signals comprising setting of focusing regions
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N23/00—Cameras or camera modules comprising electronic image sensors; Control thereof
- H04N23/60—Control of cameras or camera modules
- H04N23/67—Focus control based on electronic image sensor signals
-
- G—PHYSICS
- G03—PHOTOGRAPHY; CINEMATOGRAPHY; ANALOGOUS TECHNIQUES USING WAVES OTHER THAN OPTICAL WAVES; ELECTROGRAPHY; HOLOGRAPHY
- G03B—APPARATUS OR ARRANGEMENTS FOR TAKING PHOTOGRAPHS OR FOR PROJECTING OR VIEWING THEM; APPARATUS OR ARRANGEMENTS EMPLOYING ANALOGOUS TECHNIQUES USING WAVES OTHER THAN OPTICAL WAVES; ACCESSORIES THEREFOR
- G03B13/00—Viewfinders; Focusing aids for cameras; Means for focusing for cameras; Autofocus systems for cameras
- G03B13/32—Means for focusing
- G03B13/34—Power focusing
- G03B13/36—Autofocus systems
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/60—Analysis of geometric attributes
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/70—Determining position or orientation of objects or cameras
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/20—Special algorithmic details
- G06T2207/20021—Dividing image into blocks, subimages or windows
Definitions
- the present invention relates to the field of imaging technologies, and in particular, to an autofocus method and apparatus based on a region of interest.
- the device with auto focus function can adjust the focus lens by driving the focus motor to focus the target of interest on the camera image sensor.
- Each point on the target is imaged as a point on the sensor ( Strictly speaking, it is a spot small enough to approximate a point).
- the position of the focusing lens corresponding to the target at different distances is different.
- points A and B are two objects at different distances from the lens L (point L is the lens optical center), and the positions are different.
- the straight line LF is the axis passing through the center of the lens, and A is below the optical axis. B is below the optical axis and F is the focus of the lens.
- point A and point B are imaged at A' and B', respectively, and A1 and B1 are projection points of A' and B' on the optical axis, respectively.
- A1A' is in the image sensor plane
- the image A of the point A is sharply focused, and the image of the point B is blurred.
- B1B' is on the plane of the image sensor, the image B of the point B is clearly focused, and the image of the point A is blurred.
- the region of interest refers to the part of the user that is most concerned about the acquired image.
- ROI refers to the part of the user that is most concerned about the acquired image.
- an area can be set by the user, and then the image template in the area is used as the region of interest, so that the image of the area is clearly focused, the exposure is reasonable, and the quality is high during the focusing process.
- this method requires pre-storing the region of interest template and occupies storage space.
- the technical problem to be solved by the present invention is that the existing focus method based on the region of interest needs to store a template in advance and occupy a storage space.
- An embodiment of the present invention provides an autofocus method based on a region of interest, including the steps of: acquiring a target image of a divided block; respectively acquiring the sharpness of each of the blocks; and acquiring the region of interest at the target image.
- Normalized center coordinates and normalized dimensions respectively calculating horizontal and vertical half-width coefficients according to the normalized size; using a two-dimensional discretized Gaussian function, according to the normalized center coordinates and Calculating, according to the weight value and the sharpness of each of the blocks, a normalized overall definition of the target image; and determining, according to the weighted value of each of the blocks, a normalized overall definition; Focus on the degree.
- the step of separately calculating the FWHMs of the horizontal direction and the vertical direction according to the normalized size comprises: calculating, according to the number of the blocks in the horizontal direction and the width of the normalized size The full width at half maximum factor; the vertical width coefficient in the vertical direction is calculated according to the number of the blocks in the vertical direction and the height of the normalized size.
- the step of separately calculating weight values of each of the blocks according to the normalized center coordinates and the semi-aspect width coefficients comprises calculating, according to the normalized center coordinates, the block distribution a process of corresponding central coordinates, comprising: calculating an abscissa of the central coordinate according to a quantity of the block in a horizontal direction and an abscissa of the normalized center coordinate; according to the block in a vertical direction
- the ordinate of the center coordinate is calculated by the number and the ordinate of the normalized center coordinate.
- the weight value of the block is calculated by the following function:
- i and j represent the number of rows and columns of blocks is located, is an integer of 0, g i, j represents the value of the weight blocks, c1 is a constant greater than 0, represents the largest weight value , ⁇ h and ⁇ v respectively represent the abscissa and the ordinate of the central coordinate, and ⁇ h and ⁇ v represent the full width at half maximum in the horizontal direction and the vertical direction, respectively.
- the step of calculating the normalized overall resolution of the target image according to the weight value and the sharpness of each of the blocks comprises: respectively clearing each of the blocks according to the corresponding weight value Performing a weighting calculation; performing a summation calculation on the weighted calculated resolution of each of the blocks to obtain an overall resolution; performing a summation calculation on the weight values of each of the blocks; dividing the overall resolution by The sum of the weight values gives the normalized overall sharpness.
- the step of calculating a normalized overall definition of the target image according to weight values and sharpness of each of the blocks comprises: calculating a sum of the weight values of each of the blocks; respectively Dividing the weight value of each of the blocks by the sum of the weight values to obtain a corresponding normalized weight value; respectively calculating the normalized sharpness of the corresponding block by using the normalized weight value; The normalized sharpness of the block is summed to obtain the normalized overall sharpness.
- the embodiment of the present invention further provides an autofocus device based on a region of interest, comprising: a first acquiring unit, configured to acquire a target image of the divided block; and a second acquiring unit, configured to respectively acquire each of the blocks
- the third acquisition unit is configured to obtain a normalized center coordinate and a normalized size of the region of interest on the target image; a half-height width coefficient calculation unit, configured to respectively determine the size according to the normalized size Calculating a half-height width coefficient in a horizontal direction and a vertical direction; a weight value calculation unit for calculating a height of each of the blocks according to the normalized center coordinate and the half-width factor by using a two-dimensional discretized Gaussian function a weighted value; a normalized overall definition calculation unit, configured to calculate a normalized overall definition of the target image according to weight values and sharpness of each of the blocks; and a focusing unit for normalizing according to the normalization Focus on overall clarity.
- the FWHM calculation unit includes: a first FWHM calculation subunit, configured to calculate a horizontal direction according to the number of the block in the horizontal direction and the width of the normalized size. a half width factor; a second half width coefficient calculation subunit for calculating a vertical width coefficient according to the number of the blocks in the vertical direction and the height of the normalized size.
- the weight value calculation unit includes: a first central coordinate calculation subunit, configured to calculate the central coordinate according to the number of the block in the horizontal direction and the abscissa of the normalized center coordinate An abscissa; a second central coordinate calculation subunit for calculating an ordinate of the center coordinate according to the number of the block in the vertical direction and the ordinate of the normalized center coordinate.
- the normalized overall definition calculation unit includes: a first weighting calculation subunit, configured to perform weighting calculation on the sharpness of each of the blocks according to the corresponding weight value respectively; a subunit, configured to perform a summation calculation on the weighted calculated resolution of each of the blocks to obtain an overall definition; and a first summation subunit for using the weight of each of the blocks The multivalued summation calculation is performed; the normalization subunit is configured to divide the overall sharpness by the sum of the weight values to obtain the normalized overall sharpness.
- the normalized overall definition calculation unit includes: a second summation subunit, configured to calculate a sum of the weight values of each of the blocks; and a normalized weight value calculation subunit, configured to respectively And dividing a weight value of each of the blocks by a sum of the weight values to obtain a corresponding normalized weight value; and a second weighting calculation sub-unit, configured to calculate a corresponding block by using the normalized weight value respectively Normalized sharpness; a third summation sub-unit for summing the normalized sharpness of each of the blocks to obtain the normalized overall sharpness.
- the autofocus method based on the region of interest provided by the embodiment of the present invention automatically generates a focus by a Gaussian function by using a simple rectangular region selected by the user on the target image, that is, the region of interest, and using several simple parameters of the region of interest.
- the ROI template is used to avoid storing storage space for storing ROI template data.
- the generated template can be focused with the surrounding target when the user-set ROI center has no target.
- Figure 1 is a schematic diagram of imaging and focusing principles
- FIG. 3 is a schematic diagram of an image matrix of a region of interest template
- Figure 4 is a diagram showing the image clarity of the image shown in Figure 3;
- FIG. 5 is a schematic diagram of an image matrix of another region of interest template
- Figure 6 is a schematic illustration of the imaging sharpness of the image shown in Figure 5;
- Figure 7 is a waveform diagram of a Gaussian function when ⁇ and ⁇ take different values
- Embodiment 8 is a matrix G composed of weight values of respective blocks in Embodiment 2 of the present invention.
- Figure 10 is a schematic block diagram of an autofocus device in Embodiment 3 of the present invention.
- the embodiment provides an autofocus method based on a region of interest, which can be used for an imaging device or system with an autofocus function, such as a video surveillance system, a handheld camera, and a video captureable mobile phone.
- an imaging device or system with an autofocus function such as a video surveillance system, a handheld camera, and a video captureable mobile phone.
- the method includes the following steps:
- the acquired target image it can be filtered by a filter first, and then the filtered image is divided into N rows and M columns (M and N are positive integers greater than 1, in an automatic focusing process, the M and N is a constant) block of equal size, and the resolution evaluation parameter fv i,j (i ⁇ [0,N-1],j ⁇ [0,M-1]) of each block is calculated separately.
- the sub-sharpness evaluation parameters fv i,j are separately weighted and accumulated to obtain an overall sharpness evaluation parameter of the image, and then the auto focus is performed according to the overall sharpness evaluation parameter.
- the object A and the object B (to make the model simple, the objects A and B having a certain size and texture are respectively abstracted into one point) are respectively distributed in the upper and lower sides of the image. Position, divide the image into 13 ⁇ 9, (13x9 here is just to show ROI rights) For example, if you re-table, you can actually make any block, M and N are positive integers. As shown in FIG. 3, if the block near the target A is given the maximum weight value of 3, and the other blocks including the block near the target B are given a smaller weight value, as shown in FIG. 4, the target is as shown in FIG. Object A is clearly focused as a point, while target B is imaged to diffuse. As shown in FIG.
- the target is as shown in FIG.
- the object B is clearly focused to become a point, and the object A is imaged and dispersed.
- the autofocus method based on the region of interest automatically generates a focus by a Gaussian function by using a simple rectangular region selected by the user on the target image, that is, the region of interest, and using several simple parameters of the region of interest.
- the ROI template avoids storing storage space for the ROI template data.
- the sharpness evaluation parameters are clearly different when the image is clearly focused and unfocused
- the weighted resolution evaluation parameters in the region of interest are clear to the target image.
- the contribution of the degree evaluation parameter is large, and when the overall sharpness evaluation parameter is used for automatic focusing, the image in the region of interest is clear.
- the evaluation parameter contributes a large amount to the weighted overall sharpness evaluation parameter.
- the overall sharpness evaluation parameter is used for autofocusing, the focus is on the texture-rich target in the low-weight region, although the image of the low-weight region is clear at this time. Focus is correct.
- the step S4 that is, the step of separately calculating the FWHMs of the horizontal direction and the vertical direction according to the normalized size, includes:
- c 4 is a constant which can take values of 0.5, 1, 1.5, etc., which can take the same value as c 3 , where N is the number of the blocks in the vertical direction (ie, the number of rows) , n' is the height of the normalized size.
- the region of interest described in the embodiment of the present invention may be a rectangle, or may be other closed geometric shapes, such as a circle, a diamond, or the like.
- closed geometries that are not rectangular, in the process of calculation, they are equivalent to the circumscribed rectangle of the geometry, and the width and height are the width and height corresponding to the circumscribed rectangle.
- the step S5 that is, the step of separately calculating the weight values of each of the blocks according to the normalized center coordinates and the semi-aspect width coefficients, according to the normalization center
- the process of calculating the central coordinates corresponding to the block distribution including:
- the user selects a focus region (region of interest) on the interface.
- a focus region region of interest
- the normalized center coordinates ( ⁇ ' h , ⁇ v ') of the region of interest and the normalized window size m' ⁇ n' what needs to be obtained is the normalized center coordinates ( ⁇ ' h , ⁇ v ') of the region of interest and the normalized window size m' ⁇ n', and the size of the normalized image is 1 ⁇ . 1, that is, the coordinates of the upper left corner of the image are (0,0), and the coordinates of the lower right corner are (1,1), then: 0 ⁇ ' h ⁇ 1, 0 ⁇ v ' ⁇ 1, c 2 ⁇ m' ⁇ 1. c 2 ⁇ n' ⁇ 1.
- the weight values of the respective blocks can be calculated by the following function:
- i and j respectively represent the number of rows and columns in which the block is located, and are integers greater than or equal to 0. If the objective function is divided into blocks of M ⁇ N (M is the number of columns, N is the number of rows), Then i ⁇ [0, N-1], j ⁇ [0, M-1]; g i, j represents the weight value of the block; c1 is a constant greater than 0, represents the maximum weight value, may take any greater than A constant of 0, in this embodiment, in order to facilitate g i, j is generally taken as an integer greater than 1; ⁇ h and ⁇ v respectively represent the abscissa and ordinate of the central coordinate, and ⁇ h and ⁇ v respectively represent the horizontal direction And the full width at half maximum factor is a constant greater than zero.
- the autofocus region matrix of interest that is, the region of interest template is formed.
- the one-dimensional Gaussian function is: Normalize it, the integral on the (-inf, +inf) interval (actually the interval is the normalized width of the image, not the full space) is equal to 1, then: Where a, ⁇ , and ⁇ are constant and a>0, ⁇ is the center position of the peak, and ⁇ is proportional to the full width at half maximum (FWHM, the peak width at half the peak height). Therefore, modifying ⁇ can adjust the full width at half maximum of the Gaussian function peak, where we ⁇ is the full width at half maximum.
- Fig. 7 shows the waveform of the Gaussian function when ⁇ and ⁇ take different values.
- ⁇ h , ⁇ v , ⁇ h and ⁇ v are constants, ( ⁇ h , ⁇ v ) is the central position, and ⁇ is proportional to the full width at half maximum of the peak.
- the two-dimensional discrete Gaussian function is: Where i and j are the following table of each discrete unit, respectively, indicating that the i-th row and the j-th column are integers greater than or equal to 0; ⁇ h and ⁇ v are standard deviations in the horizontal direction and the vertical direction, respectively, and are constants greater than 0. .
- C1 is a constant, and any number greater than 0 can be taken as the maximum weight value. In this embodiment, an integer greater than 1 is generally taken.
- the above step S6 that is, calculating the normalized overall definition of the target image according to the weight value and the sharpness of each of the blocks
- the steps include:
- the resolution of each of the blocks is weighted according to the corresponding weight value, that is, g i,j *fv i,j ,i ⁇ [0,N-1],j ⁇ [0,M -1];
- the step S6 that is, the calculating the normalized overall definition of the target image according to the weight value and the sharpness of each of the blocks, includes:
- the embodiment provides an auto focus method based on a region of interest, and is specifically applicable to a video surveillance system, a video camera, and a video camera capable device, and includes the following steps:
- Step 1 Obtain the normalized center coordinates ( ⁇ ' h , ⁇ v ') and the normalized size m' ⁇ n' of the rectangular region of interest selected by the user on the target image, and the block in which the target image is divided.
- the third step after calculating the half-height width coefficient of the horizontal direction and the vertical direction of the region of interest and the coordinates of the center position according to the above method, calculating the weight value of each block according to the following formula, that is, obtaining the template matrix of the region of interest G:
- Step 4 Use the formula or After normalized overall resolution is calculated, autofocus is performed based on the normalized overall sharpness and other parameters.
- the embodiment provides an auto-focusing device based on the region of interest, which is a product implementation corresponding to the method provided in the first embodiment, and includes:
- a first acquiring unit U1 configured to acquire a target image of the divided block
- a second obtaining unit U2 configured to respectively acquire the sharpness of each of the blocks
- a third acquiring unit U3 configured to acquire a normalized center coordinate and a normalized size of the region of interest on the target image
- a half-height width coefficient calculation unit U4 for calculating a full-width factor of the horizontal direction and the vertical direction according to the normalized size
- a weight value calculation unit U5 configured to calculate a weight value of each of the blocks according to the normalized center coordinate and the half-width factor by using a two-dimensional discretized Gauss function
- a normalized overall definition calculation unit U6 for calculating a normalized overall definition of the target image according to weight values and sharpness of each of the blocks;
- the autofocus device based on the region of interest provided by the embodiment automatically generates a focus by a Gaussian function by using a simple rectangular region selected by the user on the target image, that is, the region of interest, and using several simple parameters of the region of interest.
- the ROI template avoids storing storage space for the ROI template data.
- the generated template can be focused with the surrounding target when the user-set ROI center has no target.
- the FWHM calculation unit U4 includes:
- a first half height-width coefficient calculation sub-unit configured to calculate a horizontal width-width factor according to the number of the blocks in the horizontal direction and the width of the normalized size
- a second half-width-width coefficient calculation sub-unit for calculating a full-width half-width factor according to the number of the blocks in the vertical direction and the height of the normalized size.
- the weight value calculation unit U5 includes:
- a first central coordinate calculation subunit configured to calculate an abscissa of the central coordinate according to the number of the block in the horizontal direction and the abscissa of the normalized center coordinate;
- a second central coordinate calculation subunit configured to calculate an ordinate of the central coordinate according to the number of the block in the vertical direction and the ordinate of the normalized center coordinate.
- the normalized overall definition calculation unit U6 includes:
- a first weighting calculation subunit configured to perform weighting calculation on the sharpness of each of the blocks according to the corresponding weight value
- the overall definition calculation sub-unit is configured to perform summation calculation on the weighted calculation of each of the blocks to obtain an overall definition
- a first summation subunit configured to perform a summation calculation on the weight values of each of the blocks
- the normalized overall definition calculation unit U6 includes:
- a second summation subunit configured to calculate a sum of the weight values of each of the blocks
- a normalized weight value calculation subunit configured to respectively divide the weight value of each of the blocks by the sum of the weight values to obtain a corresponding normalized weight value
- a second weighting calculation subunit configured to calculate a normalized definition of the corresponding block by using the normalized weight value respectively
- a third summation sub-unit for performing a summation calculation on the normalized sharpness of each of the blocks to obtain the normalized overall definition.
Landscapes
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Theoretical Computer Science (AREA)
- Geometry (AREA)
- Optics & Photonics (AREA)
- Studio Devices (AREA)
- Image Analysis (AREA)
Abstract
本发明提供的一种基于感兴趣区域的自动聚焦方法及装置,属于成像技术领域,该方法包括以下步骤:获取已划分区块的目标图像;分别获取各个区块的清晰度;获取感兴趣区域在目标图像上的归一化中心坐标和归一化尺寸;根据归一化尺寸分别计算水平方向和垂直方向的半高宽系数;利用二维离散化高斯函数,根据归一化中心坐标和半高宽系数分别计算各个区块的权重值;根据各个区块的权重值和清晰度计算目标图像的归一化整体清晰度;根据归一化整体清晰度进行聚焦。本发明可以自动计算感兴趣区域模板,从而避免了存储ROI模板数据占用存储空间。
Description
本发明涉及成像技术领域,具体涉及一种基于感兴趣区域的自动聚焦方法及装置。
目前,市面上已经存在很多带有摄像拍照功能的电子设备或者系统,例如视频监控系统、手持摄像机和可拍摄视频的手机等,这类设备均可以实时获取图像并显示在显示装置上。在拍摄图像或视频时需要将图像聚焦清楚,目前有两种聚焦方式:一种是自动聚焦,另一种是手动聚焦。带有自动聚焦功能的设备可以通过驱动聚焦电机调节调节聚焦镜片,将关注的目标物在摄像机图像传感器上聚焦清楚,目标物上清晰的每个点都在传感器(sensor)上成像为一个点(严格说是一个足够小近似为一个点的光斑)。不同距离的目标物对应的聚焦镜片的位置不同,当镜头的景深较小时(焦距长,光圈大)同一幅画面上具有不同距离且距离相差较大的目标物,只能选择某个距离的目标清楚,而其他距离的目标物则模糊。如图1所示,点A和B为距离透镜L(点L为透镜光心)不同距离的两个目标物,且位置不一样,直线LF为贯穿透镜中心的轴线,A在光轴下方而B在光轴下方,F为透镜的焦点。根据成像原理,点A和点B分别成像在A′和B′,A1和B1分别是A′和B′在光轴上的投影点。如果A1A′处在图像传感器平面
上则点A的像A′聚焦清楚、点B的像B′模糊,如果B1B′处在图像传感器平面上,则点B的像B′聚焦清楚、点A的像A′模糊。
感兴趣区域(ROI,region of interesting,关注区域)是指用户对获取到的图像中最关注的局部。现有技术中,可通过用户设置一个区域,然后将区域内的图像模板作为感兴趣区域,以在聚焦过程中使得该区域部分的图像聚焦清楚、曝光合理、质量较高。但是这种方法需要预先存储感兴趣区域模板,占用存储空间。
发明内容
因此,本发明要解决的技术问题在于现有基于感兴趣区域的聚焦方法需要预先存储模板,占用存储空间。
为此,本发明实施例提供了如下技术方案:
本发明实施例提供了一种基于感兴趣区域的自动聚焦方法,包括如下步骤:获取已划分区块的目标图像;分别获取各个所述区块的清晰度;获取感兴趣区域在所述目标图像上的归一化中心坐标和归一化尺寸;根据所述归一化尺寸分别计算水平方向和垂直方向的半高宽系数;利用二维离散化高斯函数,根据所述归一化中心坐标和所述半高宽系数分别计算各个所述区块的权重值;根据各个所述区块的权重值和清晰度计算所述目标图像的归一化整体清晰度;根据所述归一化整体清晰度进行聚焦。
可选地,所述根据所述归一化尺寸分别计算水平方向和垂直方向的半高宽系数的步骤包括:根据所述区块在水平方向上的数量和所述归一化尺寸的宽度计算水平方向的半高宽系数;根据所述区块在垂直方向上的数量和所述归一化尺寸的高度计算垂直方向的半高宽系数。
可选地,所述根据所述归一化中心坐标和所述半高宽系数分别计算各个所述区块的权重值的步骤包括根据所述归一化中心坐标计算与所述区块分布相对应的中心坐标的过程,包括:根据所述区块在水平方向上的数量和所述归一化中心坐标的横坐标计算所述中心坐标的横坐标;根据所述区块在垂直方向上的数量和所述归一化中心坐标的纵坐标计算所述中心坐标的纵坐标。
可选地,所述区块的权重值是通过以下函数计算得到的:
其中,i和j分别表示所述区块所在的行数和列数、为大于等于0的整数,gi,j表示所述区块的权重值,c1为大于0的常数、表示最大权重值,μh和μv分别表示所述中心坐标的横坐标和纵坐标,σh和σv分别表示水平方向和垂直方向的半高宽系数。
可选地,所述根据各个所述区块的权重值和清晰度计算所述目标图像的归一化整体清晰度的步骤包括:分别按照相应的所述权重值对各个所述区块的清晰度进行加权计算;对各个所述区块加权计算后的清晰度进行求和计算获得整体清晰度;对各个所述区块的所述权重值进行求和计算;将所述整体清晰度除以所述权重值之和得到所述归一化整体清晰度。
可选地,所述根据各个所述区块的权重值和清晰度计算所述目标图像的归一化整体清晰度的步骤包括:计算各个所述区块的所述权重值之和;分别将各个所述区块的权重值除以所述权重值之和得到对应的归一化权重值;分别利用所述归一化的权重值计算对应区块的归一化清晰度;对各个所述区块的归一化清晰度进行求和计算得到所述归一化整体清晰度。
本发明实施例还提供了一种基于感兴趣区域的自动聚焦装置,包括:第一获取单元,用于获取已划分区块的目标图像;第二获取单元,用于分别获取各个所述区块的清晰度;第三获取单元,用于获取感兴趣区域在所述目标图像上的归一化中心坐标和归一化尺寸;半高宽系数计算单元,用于根据所述归一化尺寸分别计算水平方向和垂直方向的半高宽系数;权重值计算单元,用于利用二维离散化高斯函数,根据所述归一化中心坐标和所述半高宽系数分别计算各个所述区块的权重值;归一化整体清晰度计算单元,用于根据各个所述区块的权重值和清晰度计算所述目标图像的归一化整体清晰度;聚焦单元,用于根据所述归一化整体清晰度进行聚焦。
可选地,所述半高宽系数计算单元包括:第一半高宽系数计算子单元,用于根据所述区块在水平方向上的数量和所述归一化尺寸的宽度计算水平方向的半高宽系数;第二半高宽系数计算子单元,用于根据所述区块在垂直方向上的数量和所述归一化尺寸的高度计算垂直方向的半高宽系数。
可选地,所述权重值计算单元包括:第一中心坐标计算子单元,用于根据所述区块在水平方向上的数量和所述归一化中心坐标的横坐标计算所述中心坐标的横坐标;第二中心坐标计算子单元,用于根据所述区块在垂直方向上的数量和所述归一化中心坐标的纵坐标计算所述中心坐标的纵坐标。
可选地,所述归一化整体清晰度计算单元包括:第一加权计算子单元,用于分别按照相应的所述权重值对各个所述区块的清晰度进行加权计算;整体清晰度计算子单元,用于对各个所述区块加权计算后的清晰度进行求和计算获得整体清晰度;第一求和子单元,用于对各个所述区块的所述权
重值进行求和计算;归一化子单元,用于将所述整体清晰度除以所述权重值之和得到所述归一化整体清晰度。
可选地,所述归一化整体清晰度计算单元包括:第二求和子单元,用于计算各个所述区块的所述权重值之和;归一化权重值计算子单元,用于分别将各个所述区块的权重值除以所述权重值之和得到对应的归一化权重值;第二加权计算子单元,用于分别利用所述归一化的权重值计算对应区块的归一化清晰度;第三求和子单元,用于对各个所述区块的归一化清晰度进行求和计算得到所述归一化整体清晰度。
本发明技术方案,具有如下优点:
本发明实施例提供的基于感兴趣区域的自动聚焦方法,通过用户在目标图像上选定的矩形区域,即感兴趣区域,再利用与该感兴趣区域的几个简单参数通过高斯函数自动生成聚焦用的ROI模板,从而避免了存储ROI模板数据占用存储空间。另外,生成的模板可以在用户设置的ROI中心没有目标物时利用周边目标物聚焦。
为了更清楚地说明本发明具体实施方式或现有技术中的技术方案,下面将对具体实施方式或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图是本发明的一些实施方式,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。
图1为成像、聚焦原理示意图;
图2为本发明实施例1中一种自动聚焦方法的流程图;
图3为一种感兴趣区域模板的图像矩阵示意图;
图4示出了图3所示的图像的成像清晰度的示意图;
图5为另一种感兴趣区域模板的图像矩阵示意图;
图6为图5所示的图像的成像清晰度的示意图;
图7为σ和μ取不同值时高斯函数的波形图;
图8为本发明实施例2中各个区块的权重值组成的矩阵G;
图9为本发明实施例2中各个区块的权重值组成的另一个矩阵H;
图10为本发明实施例3中一种自动聚焦装置的原理框图。
下面将结合附图对本发明的技术方案进行清楚、完整地描述,显然,所描述的实施例是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。
此外,下面所描述的本发明不同实施方式中所涉及的技术特征只要彼此之间未构成冲突就可以相互结合。
实施例1
本实施例提供一种基于感兴趣区域的自动聚焦方法,该方法可以用于带有自动聚焦功能的摄像设备或者系统,如视频监控系统、手持摄像机和可拍摄视频的手机等。如图2所示,该方法包括如下步骤:
S1:获取已划分区块的目标图像;
S2:分别获取各个区块的清晰度;
S3:获取感兴趣区域在目标图像上的归一化中心坐标和归一化尺寸;
S4:根据归一化尺寸分别计算水平方向和垂直方向的半高宽系数;
S5:利用二维离散化高斯函数,根据归一化中心坐标和半高宽系数分别计算各个区块的权重值;
S6:根据各个区块的权重值和清晰度计算目标图像的归一化整体清晰度;
S7:根据归一化整体清晰度进行聚焦。
对于获取到的目标图像,可以先利用滤波器对其进行滤波,然后将滤波后的图像分割成N行M列(M和N都是大于1的正整数,在一次自动聚焦过程中该M和N都是常数)尺寸相等的区块,并分别计算每个区块的清晰度评价参数fvi,j(i∈[0,N-1],j∈[0,M-1]),得到N×M个子清晰度评价参数的矩阵。在自动聚焦过程中,需要将上述子清晰度评价参数fvi,j分别加权后累加,得到该幅图像的整体清晰度评价参数,然后根据该整体清晰度评价参数进行自动聚焦。当该目标图像中具有多个不同物距的目标物时,由于摄像机景深有限,会有多种聚焦清晰的结果,此时就需要根据用户的需求,将用户设置的感兴趣区域聚焦清楚。为了将用户设置的感兴趣区域聚焦清楚,在计算整体清晰度评价参数时需要将感兴趣区域所在的区块赋予较大的权重值,其他区块赋予较小的权重值。利用通过该方法计算出来的整体清晰度评价参数进行自动聚焦时,就会有很大概率聚焦在感兴趣区域的目标物上,使该目标物成像清晰。
例如,如图3-图6所示,目标物A和目标物B(为使模型简单,将具有一定大小和纹理的目标物A和B分别抽象成一个点)分别分布在图像中间的上下两个位置,将图像划分为13×9,(这里13x9只是为了展示ROI权
重表而设例子,实际可以使任意分块,M、N为正整数)个区块。如图3所示,如果将目标物A附近的区块赋予最大的权重值3,而将其他区块包括目标物B附近的区块赋予较小的权重值,则如图4所示,目标物A聚焦清楚成为一个点,而目标物B成像弥散。如图5所示,如果将目标物B附近的区块赋予最大的权重值3,而将其他区块包括目标物A附近的区块赋予较小的权重值,则如图6所示,目标物B聚焦清楚成为一个点,而目标物A成像弥散。
本实施例提供的基于感兴趣区域的自动聚焦方法,通过用户在目标图像上选定的矩形区域,即感兴趣区域,再利用与该感兴趣区域的几个简单参数通过高斯函数自动生成聚焦用的ROI模板,从而避免了存储ROI模板数据占用存储空间。另外,如果感兴趣区域内有足够的纹理信息(图像聚焦清楚和未聚焦清楚时清晰度评价参数有明显差别),此时感兴趣区域内的加权后的清晰度评价参数对目标图像的整体清晰度评价参数的贡献较大,利用该整体清晰度评价参数进行自动聚焦时,感兴趣区域内的图像清楚。如果感兴趣区域内没有足够的纹理信息(图像聚焦清楚和未聚焦清楚清晰度评价参数没有明显差别),而权重值较小的区域有足够的纹理信息,则此时低权重区域的局部清晰度评价参数对加权后的整体清晰度评价参数贡献较大,利用该整体清晰度评价参数进行自动聚焦时,聚焦在低权重区域内纹理丰富的目标上,虽然此时低权重区域的图像清楚,但是聚焦正确。
具体地,上述步骤S4,即所述根据所述归一化尺寸分别计算水平方向和垂直方向的半高宽系数的步骤包括:
根据所述区块在水平方向上的数量和所述归一化尺寸的宽度计算水平方向的半高宽系数。具体是根据以下公式计算的:σh=c3*M*m′,σh为
水平方向的半高宽系数,c3为可以取0.5、1、1.5等值的常数,M为所述区块在水平方向上的数量(即列数),m′为归一化尺寸的宽度。
根据所述区块在垂直方向上的数量和所述归一化尺寸的高度计算垂直方向的半高宽系数,具体是根据以下公式计算的:σv=c4*N*n′,σv为垂直方向的半高宽系数,c4为可以取0.5、1、1.5等值的常数,其可与c3取相同的数值,N为所述区块在垂直方向上的数量(即行数),n′为归一化尺寸的高度。
需要说明的是,本发明实施例中所述的感兴趣区域可以是矩形,也可以是其它封闭的几何形状,例如,圆形,菱形等。对于非矩形的其它封闭的几何形状,在计算的过程中,将其等效为该几何形状的外切矩形,其宽高为该外切矩形对应的宽高。
作为具体的实施方式,上述步骤S5,也即所述根据所述归一化中心坐标和所述半高宽系数分别计算各个所述区块的权重值的步骤中包括根据所述归一化中心坐标计算与所述区块分布相对应的中心坐标的过程,包括:
首先,根据所述区块在水平方向上的数量和所述归一化中心坐标的横坐标计算所述中心坐标的横坐标,具体是根据以下公式计算的:μh=(M-1)*μ′h,μh为中心坐标的横坐标(通过四舍五入取整),M为所述区块在水平方向上的数量(即列数),μ′h为所述归一化中心坐标的横坐标;
然后,根据所述区块在垂直方向上的数量和所述归一化中心坐标的纵坐标计算所述中心坐标的纵坐标,具体是根据以下公式计算的:μv=(N-1)*μv′,μv为中心坐标的纵坐标(通过四舍五入取整),N为所述区块在垂直方向上的数量(即行数),μv′为归一化中心坐标的纵坐标。
本实施例中,由于需要生成的感兴趣区域模板是与目标图像划分的区块相对应的,并非是与图像自身的尺寸相对应的,因此用户在界面上画框选取聚焦区域(感兴趣区域)后,需要获取的是该感兴趣区域的归一化中心坐标(μ′h、μv′)和归一化窗口尺寸大小m′×n′,归一化后图像的尺寸大小是1×1,即图像左上角坐标为(0,0)、右下角坐标为(1,1),则:0<μ′h<1、0<μv′<1、c2<m′<1、c2<n′<1。c2是预设的最小感兴趣区域尺寸,是一个常数,目的是防止用户选择的感兴趣区域过小以至于在有些情况下无法自动聚焦,如果用户选择的感兴趣区域的宽度m′<c2或n′<c2,则选择m′=c2、n′=c2。
具体地,在根据上述方法分别计算得到感兴趣区域的水平方向和垂直方向的半高宽系数以及中心位置的坐标后,上述步骤S5中,各个区块的权重值可以通过以下函数计算得到的:
其中,i和j分别表示所述区块所在的行数和列数、为大于等于0的整数,如果目标函数被划分为M×N(M为列数、N为行数)个区块,则i∈[0,N-1],j∈[0,M-1];gi,j表示所述区块的权重值;c1为大于0的常数、表示最大权重值,可以取任何大于0的常数,本实施例中为了便于gi,j取整一般取大于1的整数;μh和μv分别表示所述中心坐标的横坐标和纵坐标,σh和σv分别表示水平方向和垂直方向的半高宽系数,为大于0的常数。在分别按照上述公式(1)计算出各个区块的权重值后,组成自动聚焦感兴趣区域矩阵,也即感兴趣区域模板。
上述公式(1)是通过以下过程得到的:
首先,一维高斯函数为:对其进行归一化,在(-inf,+inf)区间(实际上该区间是图像的归一化宽度,不能是全空间)上的积分等于1,则:其中a、μ和σ为常数且a>0,μ为峰的中心位置,σ和峰的半高宽(FWHM,峰值高度一半时的峰宽度)成正比,因此修改σ可以调整高斯函数峰的半高宽,这里我们σ为半高宽系数。图7示出了σ和μ取不同值时高斯函数的波形。
然后,归一化的二维高斯函数为:
其中,μh、μv、σh和σv均为常数,(μh、μv)为中心位置,σ和峰的半高宽成正比。
最后,二维离散高斯函数为:其中,i和j分别是各个离散单元的下表,表示第i行第j列,为大于等于0的整数;σh和σv分别是水平方向和垂直方向的标准差,为大于0的常数。c1为常数,可以取任何大于0的数,为最大权重值,本实施例中一般取大于1的整数。
在根据上述公式计算出各个区块的权重值gi,j后,上述步骤S6,即所述根据各个所述区块的权重值和清晰度计算所述目标图像的归一化整体清晰度的步骤包括:
首先,分别按照相应的所述权重值对各个所述区块的清晰度进行加权计算,即gi,j*fvi,j,i∈[0,N-1],j∈[0,M-1];
然后,对各个所述区块加权计算后的清晰度进行求和计算获得整体清晰度,即Σ(gi,j*fvi,j);
再对各个所述区块的所述权重值进行求和计算,即Σgi,j;
作为可替换的具体实施方式,上述步骤S6,即所述根据各个所述区块的权重值和清晰度计算所述目标图像的归一化整体清晰度的步骤包括:
首先,计算各个所述区块的所述权重值之和,即Σgi,j;
再分别利用所述归一化的权重值计算对应区块的归一化清晰度,即g′i,j*fvi,j;
最后,对各个所述区块的归一化清晰度进行求和计算得到所述归一化整体清晰度,即fvsum=Σ(g′i,j*fvi,j)。
实施例2
本实施例提供了一种基于感兴趣区域的自动聚焦方法,具体可用于视频监控系统、摄像机和可拍摄视频的手机等设备,包括如下步骤:
第一步:获取用户选择的矩形感兴趣区域在目标图像上的归一化中心坐标(μ′h,μv′)和归一化尺寸m′×n′,以及目标图像被划分的区块数M×N(宽×高)。如果m′<c2,则m′=c2,如果n′<c2,则n′=c2,c2是预设的最小感兴趣区域尺寸。例如,用户选择目标图像的中心位置作为感兴趣区域即归一化中心坐标为(0.5,0.5),目标图像被划分的区块数为13
×9(M=13,N=9),其中,m′和n′的值可以根据用户需求进行选择,例如对于M=13,N=9的窗口划分,如果是m’=0.38,n’=0.44,那么用户选择的ROI区域大约是5×4个小窗口。
第二步:分别根据公式μh=(M-1)*μ′h、μv=(N-1)*μv′计算中心坐标的横纵坐标,分别根据公式σh=c3*M*m′、σv=c4*N*n′计算水平方向和垂直方向的半高宽系数。
以图8和图9两个示例来进行描述:
如图8所示,当选择中心区域聚焦时,归一化中心坐标为(0.5,0.5),并且M=13,N=9,c1=4,c2=0.2,c3=0.5,c4=0.5,m′=1,n′=1,μ′h=0.5,μ′v=0.5时,计算得到μh=6、μv=4、σh=6.5、σv=4.5,最终的权重和为350。
如图9所示,用户选择画面右下方的区域聚焦时,并且M=13,N=9,c1=4,c2=0.2,c3=0.5,c4=0.5,m′=0.4,n′=0.3,μ′h=0.6,μ′v=0.7,计算得到μh=7.2、μv=5.6、σh=2.6、σv=1.35,最终得到的权重和为83。
第三步:在根据上述方法分别计算得到感兴趣区域的水平方向和垂直方向的半高宽系数以及中心位置的坐标后,根据以下公式计算各个区块的权重值,即得到感兴趣区域模板矩阵G:
当c1=4、μh=6、μv=4、σh=5.5、σv=4.5时,gi,j四舍五入取整,计算得到的矩阵G如图8所示。
实施例3
如图10所示,本施例提供一种基于感兴趣区域的自动聚焦装置,是与上述实施例1提供的方法对应的产品实施方式,包括:
第一获取单元U1,用于获取已划分区块的目标图像;
第二获取单元U2,用于分别获取各个所述区块的清晰度;
第三获取单元U3,用于获取感兴趣区域在所述目标图像上的归一化中心坐标和归一化尺寸;
半高宽系数计算单元U4,用于根据所述归一化尺寸分别计算水平方向和垂直方向的半高宽系数;
权重值计算单元U5,用于利用二维离散化高斯函数,根据所述归一化中心坐标和所述半高宽系数分别计算各个所述区块的权重值;
归一化整体清晰度计算单元U6,用于根据各个所述区块的权重值和清晰度计算所述目标图像的归一化整体清晰度;
聚焦单元U7,用于根据所述归一化整体清晰度进行聚焦。
本实施例提供的基于感兴趣区域的自动聚焦装置,通过用户在目标图像上选定的矩形区域,即感兴趣区域,再利用与该感兴趣区域的几个简单参数通过高斯函数自动生成聚焦用的ROI模板,从而避免了存储ROI模板数据占用存储空间。另外,生成的模板可以在用户设置的ROI中心没有目标物时利用周边目标物聚焦。
作为具体的实施方式,所述半高宽系数计算单元U4包括:
第一半高宽系数计算子单元,用于根据所述区块在水平方向上的数量和所述归一化尺寸的宽度计算水平方向的半高宽系数;
第二半高宽系数计算子单元,用于根据所述区块在垂直方向上的数量和所述归一化尺寸的高度计算垂直方向的半高宽系数。
作为具体的实施方式,所述权重值计算单元U5包括:
第一中心坐标计算子单元,用于根据所述区块在水平方向上的数量和所述归一化中心坐标的横坐标计算所述中心坐标的横坐标;
第二中心坐标计算子单元,用于根据所述区块在垂直方向上的数量和所述归一化中心坐标的纵坐标计算所述中心坐标的纵坐标。
作为其中一种具体实施方式,所述归一化整体清晰度计算单元U6包括:
第一加权计算子单元,用于分别按照相应的所述权重值对各个所述区块的清晰度进行加权计算;
整体清晰度计算子单元,用于对各个所述区块加权计算后的清晰度进行求和计算获得整体清晰度;
第一求和子单元,用于对各个所述区块的所述权重值进行求和计算;
归一化子单元,用于将所述整体清晰度除以所述权重值之和得到所述归一化整体清晰度。
作为可替换的具体实施方式,所述归一化整体清晰度计算单元U6包括:
第二求和子单元,用于计算各个所述区块的所述权重值之和;
归一化权重值计算子单元,用于分别将各个所述区块的权重值除以所述权重值之和得到对应的归一化权重值;
第二加权计算子单元,用于分别利用所述归一化的权重值计算对应区块的归一化清晰度;
第三求和子单元,用于对各个所述区块的归一化清晰度进行求和计算得到所述归一化整体清晰度。
显然,上述实施例仅仅是为清楚地说明所作的举例,而并非对实施方式的限定。对于所属领域的普通技术人员来说,在上述说明的基础上还可以做出其它不同形式的变化或变动。这里无需也无法对所有的实施方式予以穷举。而由此所引伸出的显而易见的变化或变动仍处于本发明创造的保护范围之中。
Claims (11)
- 一种基于感兴趣区域的自动聚焦方法,其特征在于,包括如下步骤:获取已划分区块的目标图像;分别获取各个所述区块的清晰度;获取感兴趣区域在所述目标图像上的归一化中心坐标和归一化尺寸;根据所述归一化尺寸分别计算水平方向和垂直方向的半高宽系数;利用二维离散化高斯函数,根据所述归一化中心坐标和所述半高宽系数分别计算各个所述区块的权重值;根据各个所述区块的权重值和清晰度计算所述目标图像的归一化整体清晰度;根据所述归一化整体清晰度进行聚焦。
- 根据权利要求1所述的方法,其特征在于,所述根据所述归一化尺寸分别计算水平方向和垂直方向的半高宽系数的步骤包括:根据所述区块在水平方向上的数量和所述归一化尺寸的宽度计算水平方向的半高宽系数;根据所述区块在垂直方向上的数量和所述归一化尺寸的高度计算垂直方向的半高宽系数。
- 根据权利要求1所述的方法,其特征在于,所述根据所述归一化中心坐标和所述半高宽系数分别计算各个所述区块的权重值的步骤包括根据所述归一化中心坐标计算与所述区块分布相对应的中心坐标的过程,包括:根据所述区块在水平方向上的数量和所述归一化中心坐标的横坐标计 算所述中心坐标的横坐标;根据所述区块在垂直方向上的数量和所述归一化中心坐标的纵坐标计算所述中心坐标的纵坐标。
- 根据权利要求1所述的方法,其特征在于,所述根据各个所述区块的权重值和清晰度计算所述目标图像的归一化整体清晰度的步骤包括:分别按照相应的所述权重值对各个所述区块的清晰度进行加权计算;对各个所述区块加权计算后的清晰度进行求和计算获得整体清晰度;对各个所述区块的所述权重值进行求和计算;将所述整体清晰度除以所述权重值之和得到所述归一化整体清晰度。
- 根据权利要求1所述的方法,其特征在于,所述根据各个所述区块的权重值和清晰度计算所述目标图像的归一化整体清晰度的步骤包括:计算各个所述区块的所述权重值之和;分别将各个所述区块的权重值除以所述权重值之和得到对应的归一化权重值;分别利用所述归一化的权重值计算对应区块的归一化清晰度;对各个所述区块的归一化清晰度进行求和计算得到所述归一化整体清晰度。
- 一种基于感兴趣区域的自动聚焦装置,其特征在于,包括:第一获取单元,用于获取已划分区块的目标图像;第二获取单元,用于分别获取各个所述区块的清晰度;第三获取单元,用于获取感兴趣区域在所述目标图像上的归一化中心坐标和归一化尺寸;半高宽系数计算单元,用于根据所述归一化尺寸分别计算水平方向和垂直方向的半高宽系数;权重值计算单元,用于利用二维离散化高斯函数,根据所述归一化中心坐标和所述半高宽系数分别计算各个所述区块的权重值;归一化整体清晰度计算单元,用于根据各个所述区块的权重值和清晰度计算所述目标图像的归一化整体清晰度;聚焦单元,用于根据所述归一化整体清晰度进行聚焦。
- 根据权利要求7所述的装置,其特征在于,所述半高宽系数计算单元包括:第一半高宽系数计算子单元,用于根据所述区块在水平方向上的数量和所述归一化尺寸的宽度计算水平方向的半高宽系数;第二半高宽系数计算子单元,用于根据所述区块在垂直方向上的数量和所述归一化尺寸的高度计算垂直方向的半高宽系数。
- 根据权利要求7所述的装置,其特征在于,所述权重值计算单元包括:第一中心坐标计算子单元,用于根据所述区块在水平方向上的数量和所述归一化中心坐标的横坐标计算所述中心坐标的横坐标;第二中心坐标计算子单元,用于根据所述区块在垂直方向上的数量和所述归一化中心坐标的纵坐标计算所述中心坐标的纵坐标。
- 根据权利要求7所述的装置,其特征在于,所述归一化整体清晰度计算单元包括:第一加权计算子单元,用于分别按照相应的所述权重值对各个所述区块的清晰度进行加权计算;整体清晰度计算子单元,用于对各个所述区块加权计算后的清晰度进行求和计算获得整体清晰度;第一求和子单元,用于对各个所述区块的所述权重值进行求和计算;归一化子单元,用于将所述整体清晰度除以所述权重值之和得到所述归一化整体清晰度。
- 根据权利要求7所述的装置,其特征在于,所述归一化整体清晰度计算单元包括:第二求和子单元,用于计算各个所述区块的所述权重值之和;归一化权重值计算子单元,用于分别将各个所述区块的权重值除以所述权重值之和得到对应的归一化权重值;第二加权计算子单元,用于分别利用所述归一化的权重值计算对应区块的归一化清晰度;第三求和子单元,用于对各个所述区块的归一化清晰度进行求和计算得到所述归一化整体清晰度。
Priority Applications (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
EP17897500.9A EP3588934B1 (en) | 2017-02-21 | 2017-12-19 | Automatic focusing method and apparatus based on region of interest |
US16/546,889 US11050922B2 (en) | 2017-02-21 | 2019-08-21 | Automatic focusing method and apparatus based on region of interest |
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710094614.4A CN106973219B (zh) | 2017-02-21 | 2017-02-21 | 一种基于感兴趣区域的自动聚焦方法及装置 |
CN201710094614.4 | 2017-02-21 |
Related Child Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
US16/546,889 Continuation US11050922B2 (en) | 2017-02-21 | 2019-08-21 | Automatic focusing method and apparatus based on region of interest |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2018153149A1 true WO2018153149A1 (zh) | 2018-08-30 |
Family
ID=59328395
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2017/117163 WO2018153149A1 (zh) | 2017-02-21 | 2017-12-19 | 一种基于感兴趣区域的自动聚焦方法及装置 |
Country Status (4)
Country | Link |
---|---|
US (1) | US11050922B2 (zh) |
EP (1) | EP3588934B1 (zh) |
CN (1) | CN106973219B (zh) |
WO (1) | WO2018153149A1 (zh) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112950626A (zh) * | 2021-03-31 | 2021-06-11 | 网易传媒科技(北京)有限公司 | 清晰度的确定方法、介质、装置和计算设备 |
Families Citing this family (18)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106973219B (zh) * | 2017-02-21 | 2019-06-28 | 苏州科达科技股份有限公司 | 一种基于感兴趣区域的自动聚焦方法及装置 |
CN108200342B (zh) * | 2018-01-19 | 2020-12-15 | 广东顺德墨赛生物科技有限公司 | 自动聚焦方法、装置、计算机设备和存储介质 |
TWI668637B (zh) * | 2018-06-29 | 2019-08-11 | 金佶科技股份有限公司 | 指紋感測裝置以及指紋感測方法 |
CN110769220B (zh) * | 2018-11-08 | 2021-12-14 | 成都极米科技股份有限公司 | 投影设备的对焦方法及对焦装置 |
CN109801288A (zh) * | 2019-01-25 | 2019-05-24 | 淮阴师范学院 | 一种基于方向统计特性的图像聚焦测度实现方法 |
CN109859194B (zh) * | 2019-01-25 | 2023-06-02 | 淮阴师范学院 | 一种基于局部边缘检测的图像聚焦测度实现方法 |
CN109743487A (zh) * | 2019-01-28 | 2019-05-10 | 四川长虹电器股份有限公司 | 一种自动对焦的超短焦投影装置及其自动对焦方法 |
TWI711007B (zh) * | 2019-05-02 | 2020-11-21 | 緯創資通股份有限公司 | 調整感興趣區域的方法與其運算裝置 |
CN110278383B (zh) * | 2019-07-25 | 2021-06-15 | 浙江大华技术股份有限公司 | 聚焦方法、装置以及电子设备、存储介质 |
CN110519580B (zh) * | 2019-10-11 | 2021-10-22 | 成都极米科技股份有限公司 | 一种投影仪自动调焦方法、装置、设备及可读存储介质 |
CN112904548B (zh) * | 2019-12-03 | 2023-06-09 | 精微视达医疗科技(武汉)有限公司 | 一种内窥镜对焦方法及装置 |
CN113382155B (zh) * | 2020-03-10 | 2023-02-28 | 浙江宇视科技有限公司 | 自动聚焦方法、装置、设备和存储介质 |
CN113572947B (zh) * | 2020-04-29 | 2023-03-24 | 浙江大华技术股份有限公司 | 图像传感器的调整方法及装置、存储介质、电子装置 |
CN112001387B (zh) * | 2020-09-18 | 2022-09-30 | 展讯半导体(南京)有限公司 | 对焦区域的确定方法及装置、终端、存储介质 |
CN112333383A (zh) * | 2020-10-27 | 2021-02-05 | 浙江华创视讯科技有限公司 | 一种自动聚焦方法及装置 |
CN113261940B (zh) * | 2021-02-23 | 2024-03-15 | 上海市医疗器械检验研究院 | 一种磁共振图像质量的检测方法及装置 |
CN113989696B (zh) * | 2021-09-18 | 2022-11-25 | 北京远度互联科技有限公司 | 目标跟踪方法、装置、电子设备及存储介质 |
CN115937324B (zh) * | 2022-09-09 | 2024-03-26 | 郑州思昆生物工程有限公司 | 一种装配质量评价方法、装置、设备及存储介质 |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101079948A (zh) * | 2006-05-25 | 2007-11-28 | 致伸科技股份有限公司 | 影像主体位置检测方法 |
CN102169275A (zh) * | 2010-04-28 | 2011-08-31 | 上海盈方微电子有限公司 | 一种基于黄金分割非均匀采样窗口规划的数码相机自动聚焦系统 |
US20120314960A1 (en) * | 2009-12-07 | 2012-12-13 | Hiok Nam Tay | Auto-focus image system |
CN103424953A (zh) * | 2012-05-25 | 2013-12-04 | 中兴通讯股份有限公司 | 自动聚焦方法及装置 |
CN103702032A (zh) * | 2013-12-31 | 2014-04-02 | 华为技术有限公司 | 图像处理方法、装置和终端设备 |
CN105472250A (zh) * | 2015-12-23 | 2016-04-06 | 浙江宇视科技有限公司 | 自动聚焦方法及装置 |
CN106973219A (zh) * | 2017-02-21 | 2017-07-21 | 苏州科达科技股份有限公司 | 一种基于感兴趣区域的自动聚焦方法及装置 |
Family Cites Families (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20060078217A1 (en) * | 2004-05-20 | 2006-04-13 | Seiko Epson Corporation | Out-of-focus detection method and imaging device control method |
CN101840055B (zh) * | 2010-05-28 | 2012-01-18 | 浙江工业大学 | 基于嵌入式媒体处理器的视频自动聚焦系统 |
CN101943839B (zh) * | 2010-07-06 | 2012-09-05 | 浙江大学 | 一体化的自动聚焦摄像机装置的自动聚焦方法 |
CN102542545A (zh) * | 2010-12-24 | 2012-07-04 | 方正国际软件(北京)有限公司 | 一种多焦距照片融合方法、系统及拍照装置 |
CA2832749C (en) * | 2011-04-12 | 2016-11-22 | Tripath Imaging, Inc. | Method for preparing quantitative video-microscopy and associated system |
WO2013035004A1 (en) * | 2011-09-05 | 2013-03-14 | Forus Health Pvt. Ltd. | A method and system for detecting and capturing focused image |
US20130176457A1 (en) * | 2012-01-09 | 2013-07-11 | Sawada Yasuhiro | Auto processing images having arbitrary regions of interest |
CN102968784B (zh) * | 2012-10-17 | 2015-06-17 | 北京航空航天大学 | 一种多视角拍摄进行孔径合成成像方法 |
US9354489B2 (en) * | 2014-02-10 | 2016-05-31 | Raytheon Company | Robust autofocus algorithm for multi-spectral imaging systems |
AU2014277853A1 (en) * | 2014-12-22 | 2016-07-07 | Canon Kabushiki Kaisha | Object re-identification using self-dissimilarity |
US9549130B2 (en) * | 2015-05-01 | 2017-01-17 | Seek Thermal, Inc. | Compact row column noise filter for an imaging system |
-
2017
- 2017-02-21 CN CN201710094614.4A patent/CN106973219B/zh active Active
- 2017-12-19 EP EP17897500.9A patent/EP3588934B1/en active Active
- 2017-12-19 WO PCT/CN2017/117163 patent/WO2018153149A1/zh unknown
-
2019
- 2019-08-21 US US16/546,889 patent/US11050922B2/en active Active
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101079948A (zh) * | 2006-05-25 | 2007-11-28 | 致伸科技股份有限公司 | 影像主体位置检测方法 |
US20120314960A1 (en) * | 2009-12-07 | 2012-12-13 | Hiok Nam Tay | Auto-focus image system |
CN102169275A (zh) * | 2010-04-28 | 2011-08-31 | 上海盈方微电子有限公司 | 一种基于黄金分割非均匀采样窗口规划的数码相机自动聚焦系统 |
CN103424953A (zh) * | 2012-05-25 | 2013-12-04 | 中兴通讯股份有限公司 | 自动聚焦方法及装置 |
CN103702032A (zh) * | 2013-12-31 | 2014-04-02 | 华为技术有限公司 | 图像处理方法、装置和终端设备 |
CN105472250A (zh) * | 2015-12-23 | 2016-04-06 | 浙江宇视科技有限公司 | 自动聚焦方法及装置 |
CN106973219A (zh) * | 2017-02-21 | 2017-07-21 | 苏州科达科技股份有限公司 | 一种基于感兴趣区域的自动聚焦方法及装置 |
Non-Patent Citations (1)
Title |
---|
See also references of EP3588934A4 * |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112950626A (zh) * | 2021-03-31 | 2021-06-11 | 网易传媒科技(北京)有限公司 | 清晰度的确定方法、介质、装置和计算设备 |
Also Published As
Publication number | Publication date |
---|---|
EP3588934A4 (en) | 2020-01-08 |
EP3588934A1 (en) | 2020-01-01 |
CN106973219A (zh) | 2017-07-21 |
US11050922B2 (en) | 2021-06-29 |
EP3588934B1 (en) | 2022-01-26 |
CN106973219B (zh) | 2019-06-28 |
US20200021747A1 (en) | 2020-01-16 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2018153149A1 (zh) | 一种基于感兴趣区域的自动聚焦方法及装置 | |
US9998650B2 (en) | Image processing apparatus and image pickup apparatus for adding blur in an image according to depth map | |
CN110717942B (zh) | 图像处理方法和装置、电子设备、计算机可读存储介质 | |
US9215381B2 (en) | Image blurring method and apparatus, and electronic devices | |
JP6047807B2 (ja) | リフォーカスを実現するための方法および電子装置 | |
US8315476B1 (en) | Super-resolution with the focused plenoptic camera | |
CN104717427B (zh) | 一种自动变焦方法、装置和移动终端 | |
CN108076278B (zh) | 一种自动对焦方法、装置及电子设备 | |
US11209268B2 (en) | Depth measuring method and system | |
US20170366804A1 (en) | Light field collection control methods and apparatuses, light field collection devices | |
TWI538512B (zh) | 調整對焦位置的方法及電子裝置 | |
CN107690673B (zh) | 图像处理方法、装置及服务器 | |
WO2016070680A1 (en) | Methods and apparatus for controlling light field capture | |
CN108234858B (zh) | 图像虚化处理方法、装置、存储介质及电子设备 | |
US9100559B2 (en) | Image processing apparatus, image pickup apparatus, image processing method, and image processing program using compound kernel | |
US20170324950A1 (en) | Methods and apparatus for controlling light field capture | |
KR20170005009A (ko) | 3d 라돈 이미지의 생성 및 사용 | |
CN107749944A (zh) | 一种拍摄方法及装置 | |
CN109348108B (zh) | 一种术野摄像头、术野摄像头的调节方法、计算机设备及可读存储介质 | |
JP7378219B2 (ja) | 撮像装置、画像処理装置、制御方法、及びプログラム | |
WO2022126430A1 (zh) | 辅助对焦方法、装置及系统 | |
WO2017190415A1 (zh) | 一种图像优化方法、装置及终端 | |
US10638030B1 (en) | Angular focus stacking | |
CN113225473A (zh) | 自动聚焦的方法、装置、设备和介质 | |
CN115272124A (zh) | 一种畸变图像校正方法、装置 |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 17897500 Country of ref document: EP Kind code of ref document: A1 |
|
NENP | Non-entry into the national phase |
Ref country code: DE |
|
ENP | Entry into the national phase |
Ref document number: 2017897500 Country of ref document: EP Effective date: 20190923 |