Image processing device, image processing method and program
Patent Information
- Application Number
- JP2022037599
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2022-03-10
- Publication Date
- 2024-09-13
- Estimated Expiration
- 2042-03-10
AI Technical Summary
Existing object detection methods struggle to accurately focus on the intended subject when multiple objects of the same category are overlapping, leading to unreliable detection and difficulty in preparing detection units for all possible subjects.
An image processing device that includes an image acquisition unit, likelihood map acquisition, and object region candidate selection and integration, using multilayer neural networks to determine the intended subject area by selecting and combining object region candidates based on user input and likelihood maps.
Enables precise detection of the subject area intended by the user, improving autofocus accuracy even when objects overlap, and addressing the limitations of existing methods in handling multiple subjects.
Smart Images

Figure 00000000_0000_ABST
Abstract
Description
[Technical Field]
[0001] The present invention relates to an image processing technique for detecting a subject. [Background technology]
[0002] Object detection is one field of computer vision research and has been widely studied. Computer vision is a technology that understands images input into a computer and recognizes various characteristics of those images. Object detection, among other things, is the task of estimating the location and type of objects present in natural images. In Non-Patent Document 1, a likelihood map indicating the center of an object is obtained using a multilayer neural network, and the center position of the object is detected by extracting the peak point of the likelihood map. In addition, the frame of the detected object can be obtained by inferring the offset amount corresponding to the center position and the object size.
[0003] Object detection can be applied to the autofocus function of an imaging device. Patent Document 1 (Patent Document 1) receives coordinates specified by a user and inputs them along with an image into a multilayer neural network to detect a main subject based on the user's intention, thereby achieving an autofocus function. Patent Document 1 generates a position map based on a likelihood map and a two-dimensional Gaussian spreading from the specified coordinates within the multilayer neural network. Furthermore, the position map and likelihood map are integrated within the multilayer neural network to detect the main subject. If a peak in the likelihood map is near the specified coordinates, the contribution of the position map in the integration process is increased; otherwise, it is reduced. Patent Document 1 also uses imaging information such as the electronic zoom ratio and the amount of camera shake to adjust the spread of the Gaussian when generating a position map from the specified coordinates. For example, when the amount of camera shake is acquired as imaging information, the spread of the position map is increased because it is considered difficult to specify the coordinates of the subject if the amount of camera shake is large. [Prior art documents] [Patent documents]
[0004] [Patent Document 1] Japanese Patent Application Publication No. 2020-173678 [Non-patent literature]
[0005] [Non-Patent Document 1] Objects as Points, Xingyi Zhou et al., 2019 Summary of the Invention [Problem to be solved by the invention]
[0006] As mentioned above, Patent Document 1 discloses a method for detecting a main subject that takes into account the user's intention. However, Patent Document 1 makes it difficult to autofocus on the intended subject when multiple subjects of the same category are present. For example, consider a situation in which two subjects of the same category are located in front and behind each other. In this case, the rear subject is partially hidden by the front subject, overlapping it. If the user specifies the rear subject in this case, the features of the rear subject may not be extracted well, resulting in a low reliability of the position map and a risk of the rear subject not being correctly detected. Alternatively, the reliability of the position map for the front subject, whose features can be extracted well, may be high, resulting in the front subject becoming the main subject. Furthermore, Patent Document 1 requires a main subject detection unit that responds to both a dog's face and a dog's body as features of the main subject. There are countless objects that could be the main subject, and it is difficult to prepare a main subject detection unit for each of them in advance.
[0007] As described above, we consider applying Non-Patent Document 1 to cases where subjects of the same category are located in front and behind each other, and using the detection result closest to the specified coordinates. It is difficult to separate the likelihood map showing the center into the front and rear subjects and make inference, and there is a high possibility that a peak in the likelihood map will appear in the front subject.
[0008] The present invention has been made in view of the above-mentioned problems, and has an object to provide an image processing device capable of detecting a subject area intended by a user, and also to provide a method and a program for doing so. [Means for solving the problem]
[0009] An image processing device according to the present invention has the following arrangement.
[0010] That is, an image processing device comprising: an image acquisition means for acquiring a captured image; an instruction receiving means for receiving instructions for the captured image acquired by the image acquisition means; a likelihood map acquisition means for representing the likelihood of an object being present in the captured image; an estimation means for estimating an area representing the position and size of an object in the captured image; and a determination means for determining an object area corresponding to the instruction using one or more object area candidates selected from the estimated area based on the position of the instruction received by the instruction receiving means and the likelihood map. [Effects of the Invention]
[0011] According to the present invention having the above configuration, it is possible to provide an image processing device that enables detection of a subject area intended by a user. [Brief explanation of the drawings]
[0012] [Figure 1] Schematic diagram of the image processing device [Figure 2] Processing flow diagram of embodiment 1 [Figure 3] An example of an image containing two subjects and its likelihood map [Figure 4] Example of object region candidates [Figure 5] Detailed flow of object region candidate selection [Figure 6] Example of object region candidate integration [Figure 7] Bilinear Interpolation Example [Figure 8] Example of object region candidate selection using interpolation [Figure 9] Detailed flow of object region correction means [Figure 10] Example of object area correction [Figure 11] FIG. 1 is a diagram showing the configuration of an image processing device having a second likelihood map acquisition means. [Figure 12] Detailed flow of image processing device having second likelihood map acquisition means DETAILED DESCRIPTION OF THE INVENTION
[0013] Hereinafter, the present invention will be described in detail based on preferred embodiments thereof with reference to the accompanying drawings. Note that the configurations shown in the following embodiments are merely examples, and the present invention is not limited to the illustrated configurations.
[0014] <Embodiment 1> A schematic configuration diagram of an image processing apparatus according to this embodiment is shown in Fig. 1. The configuration of this embodiment will be explained using Fig. 1. Note that only the outline will be explained here, and details will be described later.
[0015] The imaging device 110 is configured using an optical system, an imaging element, etc., and captures an image and outputs it to the image acquisition unit 101. For example, it is conceivable to use an imaging device such as a digital camera or a surveillance camera. The imaging device 110 also has an interface that accepts input from a user, and outputs the input from the user to the instruction acceptance unit 104. For example, it is conceivable to have a touch display as an interface, and output the result of a touch operation by the user to the instruction acceptance unit 104.
[0016] The image processing device 100 includes an image acquisition unit 101, a likelihood map acquisition unit 102, an estimation unit 103, an instruction reception unit 104, an object region candidate selection unit 105, and an object region candidate integration unit 106. The image acquisition unit 101 receives an image from an imaging device 110. The image is input to the likelihood map acquisition unit 102 and the estimation unit 103, which respectively acquire a likelihood map and an object region candidate. The instruction reception unit 104 acquires a user instruction from the imaging device 110. Specifically, it acquires one point of designated coordinates input by the user through a touch operation. The object region candidate selection unit 105 selects one or more object region candidates to be integrated from the object region candidates based on the likelihood map and the designated coordinates. The object region candidate integration unit 106 integrates the selected object region candidates to acquire one object region. A part of the functional configuration of the image processing device 100 (for example, the likelihood map acquisition unit 102, the estimation unit 103, the object region candidate selection unit 105, and the object region candidate integration unit 106) can be provided in an image processing device on a network as an image processing system. The image processing device 100 is also configured with hardware such as a CPU, ROM, RAM, and various interfaces as shown in the attached drawings.
[0017] The result output unit 120 outputs the object region, and the output object region is applied to, for example, the autofocus function of the camera. For example, several ranging points can be sampled from the object region and used for phase-difference AF. If the object region intended by the user can be detected with high accuracy, the autofocus accuracy will also improve.
[0018] 2 shows a flowchart of the processing in the image processing device 100 of this embodiment. Hereinafter, it is assumed that the flowchart is realized by the CPU executing a control program. Note that only an overview will be explained here, and details will be given later.
[0019] In S200, the imaging device 110 starts capturing an image. In S201, the image acquisition unit 101 of the image processing device 100 converts the captured image to a predetermined resolution. Based on the converted image, in S202, the likelihood map acquisition unit 102 acquires a likelihood map, and in S203, the estimation unit 103 acquires an object region candidate. In S204, the instruction acceptance unit 104 accepts a coordinate instruction from the user, and in S205, it is determined whether or not there is an instruction. If there is no instruction, the process proceeds to S210, where it outputs "no object region." If there is an instruction, the process proceeds to S206. In S206, the accepted instruction coordinates are converted to correspond to the resolution converted in S201. In S207, the object region candidate selection unit 105 selects an object region candidate based on the converted instruction coordinates. A detailed flow of S207 will be described later using FIG. 5. As a result of S207, it is determined in S208 whether or not an object region candidate has been selected. If not, the process proceeds to S210, where it outputs "no object region." If selected, the object region candidate integrating unit 106 integrates the one or more selected object region candidates in S209, and the result output unit 120 outputs one object region in S210. Although S207 to S209 are explained separately in Fig. 2, S207 to S209 are a series of steps for determining an object region.
[0020] <Image conversion> The image conversion shown in S201 in FIG. 2 will now be described. In this embodiment, shooting begins in S200, and a captured image is acquired. The captured image is, for example, an RGB image with a width of 6,000 pixels and a height of 4,000 pixels. In S201, the captured image is converted to a predetermined size to match the input format of the multilayer neural network that acquires the likelihood map and object region candidates. In this embodiment, the input size of the multilayer neural network is an RGB image with a width of 500 pixels and a height of 400 pixels. In this embodiment, 500 pixels are cropped from the left and right sides of the captured image to reduce it to one-tenth the original size. However, it is also possible to pad the top and bottom of the captured image with 400 pixels of black imagery to reduce it to one-twelfth the original size, or to directly crop a 500-pixel wide, 400-pixel high region from the captured image. The origin of the converted image is the pixel in the upper left corner, and its coordinates are (0,0). Coordinates (i,j) indicate the coordinates of row j, column i, and the pixel in the lower right corner has coordinates (499,399). Hereinafter, the coordinate system of the transformed image will be referred to as the image coordinate system.
[0021] <Obtaining the likelihood map> The acquisition of the likelihood map shown in 102 of FIG. 1 and S202 of FIG. 2 will be described with reference to FIG. 3. In this embodiment, as in Non-Patent Document 1, the likelihood map is acquired using a multilayer neural network. The input to the multilayer neural network is a resolution-converted image, which is an RGB image with a width of 500 pixels, a height of 400 pixels, and three channels. The output of the multilayer neural network is a tensor (matrix) with 10 columns, 8 rows, and one channel. The acquired tensor (matrix) is called a likelihood map. The likelihood map (the first channel) has its origin at the pixel in the upper left corner, and its coordinates are (0,0). Coordinates (i,j) indicate the coordinates of row j and column i, and the pixel in the lower right corner has coordinates (9,7). Hereinafter, the coordinate system of the likelihood map will be called a map coordinate system. The likelihood map can be acquired by calculation within the image processing device 100, or the likelihood map can be calculated outside the image processing device 100 and acquired by the likelihood map acquisition unit 102 within the image processing device 100.
[0022] The multilayer neural network that obtains the likelihood map is trained in advance using a large amount of training data (pairs of images and likelihood maps). For details, see Non-Patent Document 1. In this embodiment, the likelihood map is assumed to be a saliency map that responds to all objects, but it may also be one that responds only to specific objects. A saliency map is a map that responds to areas that people tend to focus on.
[0023] FIG. 3(a) shows an example of a captured image that has undergone image transformation, and FIG. 3(b) shows an example of the corresponding likelihood map. The transformed captured image 300 shows two objects: a rear object 301 and a front object 302. Each element of the likelihood map indicates the likelihood of an object existing at the location corresponding to that element. The likelihood of existence ranges from 0 to 255, with larger values indicating higher likelihood of existence. In FIG. 3(b), elements with lower likelihood are shown in white, and elements with higher likelihood are shown in black. The likelihood map 304 shows a particularly high likelihood for the front object 302, with the maximum likelihood being 204 at (6,4).
[0024] <Acquisition of object region candidates> The estimation of object region candidates shown in 103 in FIG. 1 and S203 in FIG. 2 will be described with reference to FIG. 4. Like the likelihood map, the object region candidates are also acquired using a multilayer neural network. As with the likelihood map acquisition, the input to the multilayer neural network is a resolution-converted image, a three-channel RGB image with a width of 500 pixels and a height of 400 pixels. The output of the multilayer neural network is a tensor with 10 columns, 8 rows, and 4 channels. The first channel of the tensor indicates the offset in the x direction from the corresponding element to the object center, and the second channel similarly indicates the offset in the y direction. The third channel of the tensor indicates the width of the object indicated by the corresponding element, and the fourth channel similarly indicates the height. From the information in these four channels, the center position and size of the object can be acquired. This tensor is called the object region candidate tensor. In this embodiment, each channel of the object region candidate tensor has the same number of rows and columns as the likelihood map, and their coordinate system is also the map coordinate system. The number of columns and the number of rows of each channel of the object region candidate tensor may differ from those of the likelihood map, and if they differ, the number of rows and the number of columns may be made to match by interpolation (for example, bilinear interpolation). The object region candidate can be obtained by calculation within the image processing device 100, or the object region candidate can be calculated outside the image processing device 100 and the object region candidate can be obtained by the estimation unit 103 within the image processing device 100.
[0025] The multilayer neural network that acquires the object region candidate tensor is trained in advance using a large amount of training data (pairs of images, offset amounts, and width and height), just as in the case of acquiring the likelihood map. In this embodiment, a multilayer neural network that simultaneously outputs information on four channels is used, but it is also possible to prepare four multilayer neural networks that each output one channel, and combine the results.
[0026] Figure 4(a) shows an example of a captured image after image transformation. Figures 4(b) to 4(d) show the x-direction offset map to the object center, the y-direction offset map to the object center, the object width map, and the object height map, respectively. The numerical values of the elements shown in Figures 4(b) to 4(d) are in pixels. The x-direction offset is positive in the right direction, and the y-direction offset is positive in the downward direction.
[0027] Here, attention is focused on the coordinates (6,4) in Figure 3(b) where the likelihood is maximized. The elements inverted in black and white in Figures 4(b) to (d) are the points of interest. In Figure 4(a), the point indicated by point 401 is the point on the image that corresponds to this point of interest. The offset amount in the x direction at the point of interest is -3, and the offset amount in the y direction is -2. In other words, the object center is acquired as point 402, located to the upper left of point 401, which is the point of interest.
[0028] Map coordinates can be converted to image coordinates using Equation 1 below.
[0029]
number
[0030] where I w , I h represent the width and height of the converted image, respectively, and M w , M h represent the width and height of the map, respectively. (I x ,I y ) represents a point in the image coordinate system, and (M x ,M y ) represents a point in the map coordinate system. According to Equation 1, the point (6,4) in the map coordinate system is converted to image coordinates as (325,225). That is, the image coordinates of point 401 in Figure 4 are (325,225), and the image coordinates of point 402 obtained by adding the offset amount to this are (322,222).
[0031] 4(d) and 4(e), the width and height of the object at the point of interest are 166 and 348, respectively. From the above, the object region candidate 400 at the point of interest is expressed as a rectangle with a width of 166 and a height of 348, centered at (322, 222) in the image coordinate system.
[0032] In this embodiment, the object region candidates are determined by the amount of offset in the up / down and left / right directions and the width and height of the object, but they may also be determined by the distance to the left / right edges and the top / bottom edges, for example.
[0033] <Object region candidate selection> The selection of object region candidates shown in 105 of FIG. 1 and S207 of FIG. 2 will be described with reference to the detailed flow diagram of FIG. 5. First, in preparation step S500, each variable is initialized. The variables are n and m, which are counters; N, which is the number of object region candidates to be selected; T, which is the likelihood threshold; D, which is the distance threshold; L, which is the likelihood threshold; ij is the likelihood, S ij is the object region candidate, (P x ,P y ) are the coordinates (instruction coordinates) acquired by the instruction receiving unit. x ,P y ) is a two-dimensional real vector that is obtained by converting the designated coordinates given in the image coordinate system into the map coordinate system based on Equation 1. In S501, the designated coordinates (P x ,P y ) is selected. (u,v) is a two-dimensional positive integer vector. If (u,v) exists in S502 and (P x ,P y If the distance is equal to or less than a threshold D, the process proceeds to the next step S503; if not, the process ends. In this embodiment, the Euclidean distance (Equation 2) is used as the distance function, but other distance functions may also be used.
[0034]
number
[0035] In S503, the likelihood map L corresponding to the map coordinates (u, v) is calculated. uvExtract L in S504 uv Compare with the likelihood threshold T, and L uv If L is equal to or greater than T, proceed to the next step S505. uv If m is less than T, the process proceeds to S508, increments m by 1, and returns to S501 so as not to select it as an object region candidate. uv In S506, the current likelihood and the object region candidate are respectively extracted as L n , S n In S507, n is compared with N, and if n is equal to or greater than N, the process ends. If n is less than N, n is incremented in S508, m is incremented by 1 in S509, and the process returns to S501. In this embodiment, a predetermined number N of object region candidates are selected, but the method for determining the number of object region candidates to be selected is not limited to this. For example, the likelihood L n Alternatively, the object region candidates may be selected so that the sum of the above is equal to or greater than a predetermined value.
[0036] <Object region candidate integration> The integration of object region candidates shown in 106 of FIG. 1 and S209 of FIG. 2 will be described with reference to FIG. 6. In this embodiment, it is assumed that the user selects the rear object 301, but the same process is performed when selecting the front object 302, with only the designated coordinates being different. When the user wants to select the rear object 301, the user designates a point 600 corresponding to the rear object 301, as shown in FIG. 6(a). The designated coordinates are (235, 245) in the image coordinate system, which becomes (4.2, 4.4) when converted to the map coordinate system using Equation 1. When the object region candidate selection process described above is performed, the hatched portion shown in 601, i.e., the points corresponding to the closest (4,4), second closest (4,5), and third closest (5,4) in the map coordinate system are selected. Therefore, likelihoods L1, L2, and L3 are each assigned a coordinate system L. 44 , L 45 , L 54 However, the object region candidates S1, S2, and S3 are each 44 , S 45 , S 54 are assigned to the areas 602, 603, and 604. 44 , S 45 , S 546(b) illustrates the object region candidates corresponding to 601. 605 to 609 in Fig. 6(b) respectively represent the likelihood, x offset, y offset, width, and height corresponding to 601. Fig. 6(c) shows the result of integrating the object region candidates. 610 is the center position of the integrated object region candidate, and 611 is the object region candidate with the width and height added to it.
[0037] The object region candidate integration will be explained using a specific calculation example. First, the center position of the object region candidate in the image coordinate system is calculated. From Figure 6(b), the object region candidate S 44 The x offset amount is -1 and the y offset amount is -41. From Equation 1, the image coordinate corresponding to the map coordinate (4,4) is (225,225). 44 Add the offset amount of (602) to obtain the center position (224, 184) of the object region candidate in the image coordinate system. 45 (603) center position (224,172), S 54 The center position (276, 223) of (604) can be obtained. The weighted average of likelihood is used to integrate the object region candidates. The weighted average of likelihood can be calculated using the following Equation 3.
[0038]
number
[0039] x n is the value of the object to be weighted averaged, and x is the result of the weighted average. For example, to find the x coordinate of the center position of the integrated object region, S n The x-coordinate of the center position of the object region candidate corresponding to n Similarly, by substituting the y coordinate of the center position, width, and height into Equation 3, the center position, width, and height of the integrated object region can be obtained.
[0040] Likelihood L nBy substituting 0 for the initial value of , it is possible to obtain an integrated object region using Equation 3 even when the number of object region candidates exceeding the likelihood threshold T within the range of the distance threshold D is less than the predetermined number N. In addition, all likelihoods L n If is 0, there is no object region.
[0041] The above embodiment will be summarized. First, an image transformation is performed on a captured image so that a likelihood map and object region candidates can be acquired. The likelihood map and object region candidate acquisition are realized by a multilayer neural network. An object region candidate selection unit selects three object region candidates located near the coordinates indicated by the user, which are acquired by the instruction reception unit. The selected object region candidates are weighted by the likelihood and averaged by the object region candidate integration unit, and integrated into a single object region. As a result, even if the likelihood map strongly responds to a front object as shown in FIG. 3, an object region 611 for a rear object, as intended by the user, is output as shown in FIG. 6(c).
[0042] <Variation 1> In the first embodiment, the value of the likelihood map is used when integrating the object region candidates, but the distance between the coordinates (instructed coordinates) acquired by the instruction receiving unit and the object region candidate may also be used. In the first modification, the shorter the distance between the indicated coordinates and the object region candidate, the larger the weight used in the weighted average when integrating the object region candidate. Specifically, as shown in the following formula 4, the indicated coordinates (P x ,P y The weight of the weighted average is calculated using the inverse of the distance between the candidate object region and the pixel value.
[0043]
number
[0044] where (u,v) n is the likelihood L n The distance is calculated using the Euclidean distance in the map coordinate system used in Equation 2. The likelihood L n Instead of the weight W calculated by Eq. nBy calculating the weighted average using the above, it becomes possible to integrate object region candidates taking into account the distance from the specified position.
[0045] In the above explanation, the weights of the weighted average are recalculated in the step of integrating the object region candidates, but a likelihood map that takes into account the distance from the designated coordinates may be calculated in advance. The likelihood map that takes into account the distance from the designated coordinates is called a modified likelihood map. Modified likelihood map K ij is calculated using the following formula 5.
[0046]
number
[0047] In Equation 5, the likelihood map L ij For all elements of the map, the distance between the specified coordinate and the element is divided by the distance, and the corrected likelihood map K ij is assigned to.
[0048] According to the first modification, object region candidates can be integrated with greater emphasis on object region candidates that are closer to the designated coordinates.
[0049] <Variation 2> In Modification 2, an example is shown in which the method for selecting object region candidates is expanded by interpolating each channel of the likelihood map and the object region candidate tensor.
[0050] First, interpolation will be explained using FIG. 7. FIG. 7 shows an excerpt from a portion of the width map of the object region candidate shown in FIG. 4(d) (the third channel of the object region candidate tensor described above). Here, an example is shown in which bilinear interpolation is applied when coordinate 701 is given in a width map 700 excerpted from map coordinates (4,4) to (5,5). The interpolation method is not limited to bilinear interpolation, and other interpolation methods, such as nearest neighbor interpolation and bicubic interpolation, may also be used. Similar interpolation processing can also be applied to ranges other than map coordinates (4,4) to (5,5). The value in parentheses shown for each element of width map 700 in FIG. 7 indicates the map coordinate, and the value shown to the right of the colon indicates the width of the object region candidate at that coordinate.
[0051] 7, the distances in the x and y directions between point 701 and each map coordinate are assumed to be x1, x2, y1, and y2, respectively. For example, if the map coordinates of point 701 are (4.2, 4.4), then x1 = 0.2, x2 = 0.8, y1 = 0.4, and y2 = 0.6. Bilinear interpolation is realized using the distances in the x and y directions between point 701 and each map coordinate, as shown in Equation 6 below.
[0052]
number
[0053] S ij is the value at the map coordinate (i,j) to be interpolated, and S is the interpolation result. In the example of Figure 7, S ij is the width of the object region candidate at map coordinates (i, j). An interpolated value can be calculated for the height of the object region candidate by performing a similar calculation. When interpolating the offset amount to the object candidate region, it is necessary to convert it to the center position of the object region candidate beforehand. For a method of converting the offset amount to the center position, see <Object Region Candidate Integration> in the first embodiment. An interpolated value can also be calculated for the likelihood map using a similar procedure.
[0054] By using interpolation, it is possible to obtain likelihoods and object region candidates for any coordinate position. Here, selection of object region candidates using interpolation will be explained using FIG. 8. Consider that a captured image 800 is given and a user wishes to select a subject 802, and that specified coordinates 801 are given. Consider multiple concentric circles (e.g., 803) with different radii spreading out from 801. The points (e.g., 804) obtained by dividing each concentric circle by a predetermined number are called a neighborhood point cloud. In this embodiment, the object region candidate selection unit selects values obtained by interpolating the object region candidate between the specified coordinates 801 and the neighborhood point cloud. However, points of the neighborhood point cloud that are outside the range of map coordinates are not selected.
[0055] The number of concentric circles is Nr, the difference in radius between the concentric circles is dr, and the difference in the number of divisions between the concentric circles is dq. These values are set in advance. For example, in Figure 8, Nr=3, dr=0.5, and dq=4 are set. Consider the nrth concentric circle from the specified coordinate 801, and its radius r nr is Equation 7, the number of divisions q nr is calculated from Equation 8.
[0056]
number
[0057] In Expressions 7 and 8, nr=0 indicates the specified coordinates 801, and the radius at that time is r0=0, and the number of divisions is q0=1. 803 in FIG. 8 is the third concentric circle from the center, with a radius of r3=3 and a number of divisions of q3=12.
[0058] The likelihood of an object at the specified coordinate 801 and the neighboring points is obtained by interpolating the likelihood map. Here, we define the index representing the neighboring points. Consider the neighboring points on the nrth concentric circle. The neighboring point located in the upper direction is numbered 0, and the numbers are assigned clockwise. The index of the qth neighboring point is (nr,q). The index of the neighboring point located one point to the left of the 0th neighboring point is (nr,q nr -1). 804 in FIG. 8 is expressed by index (3,3).
[0059] By modifying Equation 3 using the above index, it is possible to calculate a weighted average based on the likelihood of the object region candidates in this embodiment (Equation 9).
[0060]
number
[0061] where L (nr,q) is the interpolated value of the likelihood at the neighboring points represented by the index (nr,q). (nr,q) is the value to be weighted averaged at the neighboring points expressed by index (nr,q), and x is the result of the weighted average. For example, to find the x coordinate of the center position of the integrated object region, the interpolated value of the x coordinate of the center position of the object region candidate corresponding to the neighboring point expressed by index (nr,q) is x (nr,q) Similarly, by substituting the y coordinate of the center position, width, and height into Equation 3, the center position, width, and height of the integrated object region can be obtained.
[0062] Radius of the concentric circle r nr By using the above formula, the distance between the designated coordinates and the object region candidate can be taken into consideration as shown in Modification 1.
[0063]
number
[0064] r nr is the radius of the nrth concentric circle shown in Equation 7. L in Equation 9 (nr,q) W in Equation 10 (nr,q) By replacing it with, it becomes possible to integrate object region candidates taking into consideration the distance between the pointed coordinates and the object region candidates.
[0065] When a multilayer neural network must be made lightweight due to limitations on the circuitry installed in an imaging device, the resolution of the map coordinates that are its output becomes low. When the resolution of the map coordinates is low, even when map coordinates near the designated coordinates are selected, the discrepancy between the designated coordinates and the map coordinates becomes large. In Modification 2, by interpolating each channel of the likelihood map and the object region candidate tensor, it is possible to integrate object region candidates that are independent of the resolution of the map coordinates.
[0066] <Variation 3> The position of the object region determined in object region candidate integration S209 in embodiment 1 is calculated from the positions of the object candidate regions determined by object region candidate selection. However, depending on the accuracy of the likelihood map, the object region obtained by object region candidate integration S209 may differ from the region of the object intended by the user.
[0067] In the third modification, the object region obtained as a result of the object region candidate integration S209 in the first embodiment is corrected based on the coordinates (instruction coordinates) acquired by the instruction receiving unit and the values of the likelihood map.
[0068] A specific correction method will be described with reference to FIG.
[0069] First, a method for acquiring and correcting only the likelihood related to the object region will be described.
[0070] An object region likelihood is obtained, which indicates the likelihood of the object region 1001 obtained by the object region candidate integration S209. x ,C y ) and each point in the likelihood map (M x ,M y ) is converted to the image coordinate system. x ,I y ) is calculated using the same distance function as in Equation 2. x ,C y) is used to obtain the object region likelihood. The object region likelihood may be obtained, for example, from the likelihood map value corresponding to the point with the smallest Euclidean distance, or from the average of the likelihood map values corresponding to multiple points with close Euclidean distances. If the object region likelihood obtained in this way is equal to or less than a certain value, it is considered to be an object region estimated to have a low probability of existence of an object. Therefore, there is a possibility that an object region 1001 having a center position 1002 different from the position indicated by the user using the indicated coordinates 1004 has been estimated. By moving the center position 1002 of the object region in the direction of the indicated coordinates 1004, it is highly likely that it can be directly corrected to the region intended by the user. One possible method for moving the object region in the direction of the indicated coordinates is to swap the center position 1002 of the object region with the indicated coordinates 1004. The object region is also shifted to match the center position. There are other methods for calculating the object region likelihood L о As an example, the maximum value L output in the likelihood map can be determined by using the method described above. max and the object region likelihood L о , using a vector D1007 from the center position 1002 of the object area to the specified coordinates, each component V of a movement vector V1008 from the center position of the object area x、 V y is calculated using equations 11 and 12. The position of the object region can be corrected by applying vector V1008 to the center position 1002 of the object region.
[0071]
number
[0072] Another method is to correct the object area according to the value of the likelihood map near the designated coordinates. First, the object likelihood (designated coordinate object likelihood) for the area near the designated coordinates is obtained (S902). x ,S y ) and each point of the likelihood map transformed into the image coordinate system 1003(I x ,I y), calculate the Euclidean distance to one or more likelihood map points (I x ,I y ) to obtain a pointed-coordinate object likelihood for the vicinity of the pointed-coordinate. The pointed-coordinate object likelihood may be obtained, for example, from the likelihood map value corresponding to the closest point, or from the average of likelihood map values corresponding to the N points nearest to the pointed-coordinate. If the pointed-coordinate object likelihood obtained in this way is high, it can be said that the probability that an object exists near the specified coordinate is highly estimated. As with the correction based on the object region likelihood, the object region can be corrected to a position closer to the user's intended position by moving the center position 1002 of the object region in the pointed-coordinate direction.
[0073] Alternatively, a correction method may be considered in which both the object region likelihood and the pointed coordinate object likelihood are acquired and used. The flow of the correction method using both the object region likelihood and the pointed coordinate object likelihood will be described with reference to the flowchart in Fig. 9 and Fig. 10.
[0074] First, the object region likelihood is compared with the pointed-to coordinate object likelihood (S903), and if the pointed-to coordinate object likelihood is higher than the object region likelihood, correction processing is performed based on the position 1002 of the object region obtained by object region candidate integration S209 and the pointed-to coordinate 1004 (S904). On the other hand, if the pointed-to coordinate object likelihood is equal to or lower than the object region likelihood, the object region obtained by object region integration is output as is (S905).
[0075] The correction method will be explained using the example of Fig. 10. When the object area is a rectangle 1001, the width of the rectangle is 、 The height of the rectangle is the size of the object, and the center 1002 of the estimated rectangle (C x ,C y ) to point to coordinate 1004 (S x ,S y) is replaced with a new object region 1005, which is output as a corrected object region (S905). Another possible method is to move the object region in a direction where it is estimated that an object is more likely to exist, based on the object region likelihood of the object region 1001 and the value of the pointed coordinate object likelihood at the pointed coordinate 1004. The vector from the pointed coordinate 1004 to the center position 1002 of the object region is D1007, and the pointed coordinate object likelihood is L s , the object region likelihood is L о Using Equation 14 and Equation 15, each component V of vector V for moving the object region according to each likelihood is calculated as x、 V y The vector V thus obtained is applied to the center position 1002 of the object region, and the resulting position is set as the new center position of the object region, thereby correcting the object region 1001 in a direction with a higher likelihood.
[0076]
number
[0077] By using the object region correction unit described in the third modification, it is possible to correct the object region to be closer to the object intended by the user than the object region output by the object region integration S209 described in the first embodiment.
[0078] When a likelihood map estimation unit is implemented using limited computational resources, the accuracy of the likelihood map and object region candidate is limited, and there is a possibility that the position of the object may not be captured, as in object region 1001 in Figure 10. Even if the pointed-to coordinates 1004 accurately indicate the position of the object, the output object region may be estimated as an object region not intended by the user. In such cases, in Modification 3, the pointed-to coordinates 1004 and the likelihood map are used to correct the subject 1006 intended by the user to object region 1005, which is captured more accurately.
[0079] <Variation 4> In the image processing device of the above embodiment, a single likelihood map acquisition unit is used to acquire the likelihood of an object included in a captured image. Therefore, the accuracy of the likelihood map acquisition unit directly affects the accuracy of the object region obtained by the object region candidate integrating unit. To further improve the accuracy of the object region, a second likelihood map acquisition unit is introduced in this embodiment.
[0080] The configuration of the image processing apparatus of this embodiment will be described with reference to FIG.
[0081] Image processing device 1100 has the same configuration as in embodiment 1, and is equipped with second likelihood map acquisition unit 1101 and object region correction unit 1102. The configuration up to the point where object region candidate integrating unit 106 acquires one object region based on the captured image and designated coordinates obtained by image acquisition unit 101 and instruction receiving unit 104 is the same as in embodiment 1. Second likelihood map acquisition unit 1101 receives the captured image acquired by image acquisition unit 101 and outputs a second likelihood map. Object region correction unit 1102 receives the object region, designated coordinates, likelihood map, and second likelihood map, and outputs one object region correction result by result output unit 120.
[0082] Next, a specific processing flow will be described with reference to the flowchart of FIG.
[0083] First, the process from S200 (start of shooting) to S202 (likelihood map acquisition) is the same as in the first embodiment. Next, S1201 (second likelihood map acquisition) acquires a second likelihood map. S1201 (second likelihood map acquisition) outputs a likelihood map different from the likelihood map of the first embodiment. For example, a likelihood map acquisition unit using a color histogram or edge density may be used, or a likelihood map acquisition unit using a multilayer neural network trained by a different learning method from that of the first embodiment may be used. Following S1201 (second likelihood map acquisition), the process from S203 (object region candidate acquisition) to S209 (object region candidate integration) is the same as in the first embodiment. Correction is performed on one object region integrated by S209 (object region candidate integration) based on the specified coordinates, the likelihood map obtained in S202 (likelihood map acquisition), and the second likelihood map obtained by the second likelihood map acquisition unit.
[0084] For example, the correction method is as follows: first, a vector V1007 for correcting the object region is obtained by processing similar to that of the object correction unit described in Modification 3 using the indication coordinates and the likelihood map obtained in likelihood map acquisition S202. Next, the distance between the point obtained by converting each point of the second likelihood map into the image coordinate system and the point obtained by converting the indication coordinates into the image coordinate system is obtained, and the second likelihood map value corresponding to the second likelihood map coordinate to which the point is closest is set as the second indication coordinate object likelihood Ls2. Also, a position (C x ,C y ) and the second likelihood map values corresponding to one or more points that are close to the point obtained by transforming each point of the second likelihood map into the image coordinate system, and then obtain the second object region likelihood Lo2. The second object region likelihood obtaining method is the most (C x ,C y ) or a second likelihood map value close to (C x ,C y ) may be an average of second likelihood map values corresponding to a plurality of points that are close to the target point.
[0085] The second object region likelihood Lo obtained in this way is 2、 Second specified coordinate object likelihood Ls 2、 Using a vector D1007 from the center position of the object area to the indicated coordinates, the components of a second vector W for correcting the position of the object area are calculated using the following equations 16 and 17.
[0086]
number
[0087] A possible correction method is to apply the average vector of the vector V and the second vector W in the third modification example thus obtained to the center position of the object region output by the object candidate integration unit.
[0088] One object region corrected by the object region correction unit of the fifth embodiment is output by result output S210.
[0089] By using a second likelihood map acquisition unit in addition to the likelihood map acquisition unit in the above embodiment, it is possible to output a more likely object region.
[0090] By having the second likelihood map acquisition unit acquire a likelihood map from a color histogram or edge density, the validity of the object region output by the above-described embodiment can be determined using a method different from that of the likelihood map acquisition unit. Alternatively, the accuracy of the object region can be improved by using a multilayer neural network trained with different training data from that of the likelihood map acquisition unit of embodiment 1 for the second likelihood map acquisition unit. For example, one possible method is to train the second likelihood map acquisition unit to respond to specific objects that are prone to false detection, and then perform correction in the object region correction unit based on that information. This makes it possible to perform correction while taking into consideration from multiple angles the reliability of the likelihood map referenced when performing object region correction.
[0091] The present invention can also be realized by executing the following process: software (programs) that realize the functions of the above-described embodiments are supplied to a system or device via a network or various storage media, and the computer (or CPU, MPU, etc.) of the system or device reads and executes the programs. [Explanation of symbols]
[0092] 100 Image processing device 101 Image acquisition unit 102 Likelihood map acquisition unit 103 Estimation part 104 Instruction Reception Department 105 Object region candidate selection unit 106 Object region candidate integration unit 110 Imaging device 120 Result output section
Claims
1. Image acquisition means for acquiring a captured image; an instruction receiving means for receiving an instruction regarding the captured image acquired by the image acquisition means; a likelihood map acquisition means for indicating the likelihood of an object being present in a predetermined region into which the captured image is divided; an estimation means for estimating an area representing a position and a size of an object in the captured image; a determining means for determining an object region corresponding to the instruction by using one or more object region candidates selected from the estimated region based on a position of the instruction received by the instruction receiving means and the likelihood map; 13. An image processing device comprising:
2. The determining means selects a predetermined number of candidates in order from the object region located closest to the position of the instruction acquired by the instruction receiving means. The image processing device according to claim 1 .
3. The determining means does not use an object region in which the likelihood is equal to or less than a threshold and it is estimated that the probability of an object being present is low, when determining an object region corresponding to the instruction. The image processing device according to claim 1 .
4. The determining means is characterized in that the object region candidates are integrated using a weighted average of the values of the likelihood map. The image processing device according to claim 1 .
5. The determining means is characterized in that it integrates object region candidates based on a distance between a position of an instruction acquired by the instruction receiving means and the object region candidates. The image processing device according to claim 1 .
6. The present invention is characterized in that the object region is further modified based on the position of the instruction acquired by the instruction receiving means. The image processing device according to claim 1 .
7. The image processing device described in Claim 6, characterized in that when the likelihood of the position of the indication is higher than the likelihood of the object region determined by the determination means in the likelihood map, the correction means corrects the center position of the object region determined by the determination means to a position where the likelihood is higher.
8. 2 . The image processing apparatus according to claim 1 , wherein the determining means selects object region candidates corresponding to one or more coordinates located on concentric circles from the position of the instruction acquired by the instruction receiving means.
9. The likelihood map acquisition means acquires the likelihood map using a neural network having a plurality of layers. The image processing device according to claim 1 .
10. The estimation means estimates the region using a neural network having a plurality of layers. The image processing device according to claim 1 .
11. Image acquisition means for acquiring a captured image; an instruction receiving means for receiving an instruction regarding the captured image acquired by the image acquisition means; a likelihood map acquisition means for indicating the likelihood of an object being present in a predetermined region into which the captured image is divided; an estimation means for estimating an area representing a position and a size of an object in the captured image; An image processing system comprising: a determination means for determining an object area corresponding to the instruction using one or more object area candidates selected from the estimated area based on the position of an instruction received by the instruction receiving means and the likelihood map.
12. An image acquisition step of acquiring a captured image; an instruction receiving step of receiving an instruction regarding the captured image acquired by the image acquisition means; obtaining a likelihood map representing the likelihood of an object being present in a predetermined region into which the captured image is divided; an estimation step of estimating an area representing a position and a size of an object in the captured image; An image processing method comprising a determination step of determining an object area corresponding to the instruction using one or more object area candidates selected from the estimated area based on the position of an instruction received by the instruction receiving means and the likelihood map.
13. Computer, Image acquisition means for acquiring a captured image; an instruction receiving means for receiving an instruction regarding the captured image acquired by the image acquisition means; a likelihood map acquisition means for indicating the likelihood of an object being present in a predetermined region into which the captured image is divided; an estimation means for estimating an area representing a position and a size of an object in the captured image; A program for causing the device to function as a determination means for determining an object region corresponding to the instruction using one or more object region candidates selected from the estimated region based on the position of an instruction received by the instruction receiving means and the likelihood map.
