Image processing device and control method thereof
The image processing device enhances object detection by calculating likelihood maps and area tensors, selecting and integrating object region candidates, and correcting positions to accurately identify the intended subject area, addressing errors in existing systems.
Patent Information
- Application Number
- JP2022138342
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Filing Date
- 2022-08-31
- Publication Date
- 2024-10-11
- Estimated Expiration
- 2042-08-31
AI Technical Summary
Existing object detection systems struggle to accurately identify the intended subject when user-specified coordinates are outside the subject or vary in type, size, and appearance, leading to errors in estimating the subject's existence or vector, resulting in incorrect identification.
An image processing device that acquires a captured image, calculates a likelihood map and area tensor, receives user coordinates, selects and integrates object region candidates, and corrects positions using a likelihood map to accurately determine the intended subject area.
Enables users to more accurately specify the intended subject area, even when user-specified coordinates are off-center, by integrating object region candidates and correcting positions based on likelihood maps, thus improving object detection accuracy.
Smart Images

Figure 0007565986000004 
Figure 0007565986000005 
Figure 0007565986000006
Abstract
Description
[Technical field]
[0001] The present invention relates to a method for designating object regions in an image. [Background technology]
[0002] Computer vision is a technology that understands images input to a computer and recognizes various characteristics of the images. Among them, object detection is a task of estimating the position and type of an object present in a natural image. Non-Patent Document 1 discloses a technology that uses a multi-layer neural network to obtain a likelihood map that indicates the center of an object, and detects the center position of the object by extracting the peak point of the likelihood map.
[0003] Object detection can be used for autofocus (AF) control of an imaging device. Patent Document 1 discloses a technology that receives coordinates specified by a user and inputs them together with an image into a multi-layer neural network to identify a main subject based on the user's intention and perform autofocus control. [Prior art documents] [Patent documents]
[0004] [Patent Document 1] JP 2020-173678 A [Non-patent literature]
[0005] [Non-Patent Document 1] Xingyi Zhou et al.,"Objects as Points",2019 Summary of the Invention [Problem to be solved by the invention]
[0006] However, in Patent Document 1, if the position designated by the user is not the subject, it is difficult to identify the subject intended by the user. In addition, depending on the type, size, and appearance of the object designated by the user, it becomes even more difficult to identify the subject intended by the user. Therefore, an error in estimating the likelihood of the subject being present or an error in estimating the vector to the subject may result in identifying another subject not intended by the user.
[0007] The present invention has been made in consideration of such problems, and has an object to provide a technique that enables a user to more accurately specify a subject area that is intended by the user. [Means for solving the problem]
[0008] In order to solve the above-mentioned problems, the image processing device according to the present invention has the following arrangement. An acquisition means for acquiring a captured image; a likelihood acquisition means for acquiring a likelihood map representing the likelihood of an object existing at each position of the captured image; an area acquisition means for acquiring an area tensor indicating a position and a size of an object based on each position of the captured image; A receiving means for receiving a first position coordinate for the captured image; a region determining means for determining an object region corresponding to the first position coordinates based on the region tensor and the likelihood of the likelihood map corresponding to two or more region candidates each represented by the region tensor based on the first position coordinates; has. Effect of the Invention
[0009] According to the present invention, it is possible to provide a technique that enables a user to more accurately specify a subject area that is intended by the user. [Brief description of the drawings]
[0010] [Figure 1]1 is a diagram illustrating a functional configuration of an image processing device according to a first embodiment. [Diagram 2] 4 is a process flowchart of the image processing device in the first embodiment. [Diagram 3] 1A and 1B are diagrams illustrating an example of a captured image containing two subjects and a likelihood map thereof. [Figure 4] FIG. 11 is a diagram showing an example of obtaining object region candidates (S203). [Diagram 5] 13 is a detailed flowchart of the selection of object region candidates (S207). [Figure 6] 13 is a diagram showing an example of integrating object region candidates (S209) and correcting the selection position (S210). FIG. [Figure 7] FIG. 11 is a diagram illustrating a functional configuration of an image processing device according to a second embodiment. [Figure 8] 13 is a process flowchart of an information processing device according to the second embodiment. [Figure 9] 13A and 13B are diagrams showing examples of success and failure in selection position correction (S210). [Figure 10] FIG. 1 is a diagram illustrating a hardware configuration of an image processing device. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0011] Hereinafter, the embodiments will be described in detail with reference to the attached drawings. Note that the following embodiments do not limit the invention according to the claims. Although the embodiments describe a number of features, not all of these features are essential to the invention, and the features may be combined in any manner. Furthermore, in the attached drawings, the same reference numbers are used for the same or similar configurations, and duplicated descriptions are omitted.
[0012] (First embodiment) As a first embodiment of an image processing device according to the present invention, an image processing device that specifies an object region in a captured image will be described below as an example.
[0013] <Device configuration> 1 is a diagram showing the functional configuration of an image processing device 100 according to a first embodiment. The image processing device 100 performs an object region specification process (described later) on a captured image obtained by an image capturing device 110, and outputs information on the specified object region to a processing device 120.
[0014] The imaging device 110 has an optical system, an imaging element, etc., and outputs a captured image to the image processing device 100. For example, a digital camera or a surveillance camera can be used as the imaging device 110. The imaging device 110 also has an interface that accepts input from a user, and outputs information based on the input to the image processing device 100. For example, the imaging device 110 is equipped with a touch panel display as an interface, and outputs data of the result of a touch operation from the user (touched position coordinates).
[0015] The processing device 120, which is an external device, performs processing (such as an autofocus function of a camera) using information on the object area acquired from the image processing device 100. For example, some distance measuring points can be sampled from within the object area and used for phase difference AF.
[0016] The image processing device 100 includes an image acquisition unit 101, a likelihood map acquisition unit 102, a candidate acquisition unit 103, an instruction reception unit 104, a selection unit 105, an integration unit 106, and a position correction unit 107. The image processing device 100 may be included in a digital camera or a surveillance camera, or may be an independent processing device.
[0017] The image acquisition unit 101 acquires an image (captured image) output from the image capture device 110. The likelihood map acquisition unit 102 calculates a likelihood map from the acquired image. The candidate acquisition unit 103 calculates object region candidates from the acquired image.
[0018] The instruction receiving unit 104 receives a user instruction. Here, it is assumed that the instruction receiving unit 104 receives, from the imaging device 110, coordinates of an instruction made by a touch operation performed by a user on the imaging device 110.
[0019] A selection unit 105 selects one or more object region candidates from the object region candidates based on the likelihood map and the indicated coordinates. A merging unit 106 merges the selected object region candidates to calculate one object region. A position correction unit 107 calculates a selection position for reselecting an object region candidate based on the calculated "object region only" or "combination of the object region and the likelihood map."
[0020] Fig. 10 is a diagram showing a hardware configuration of an image processing device. The image processing device 100 can be configured using a general-purpose information processing device, and includes a CPU 1101, a memory 1102, an input unit 1103, a storage unit 1104, a display unit 1105, and a communication unit 1106. Each functional unit of the image processing device 100 shown in Fig. 1 is realized by the CPU 1101 executing a control program.
[0021] <Device Operation> 2 is a process flowchart of the image processing device in the first embodiment. First, an outline of the overall operation will be described, and then each step will be described in detail later.
[0022] In S200, the imaging device 110 starts capturing images and outputs images (frame images constituting a moving image). Then, the image acquisition unit 101 of the image processing device 100 acquires the images output from the imaging device 110.
[0023] In S201, the image acquisition unit 101 converts the captured image to a predetermined resolution. In S202, the likelihood map acquisition unit 102 calculates the likelihood that the center of an object is present at each position (small region) of the image whose resolution has been converted in S202, and calculates a likelihood map. In S203, the candidate acquisition unit 103 calculates object region candidates in the image whose resolution has been converted in S202. As will be described later, the object region candidates are calculated in the form of tensors.
[0024] In S204, the instruction receiving unit 104 receives a coordinate instruction from the user. As described above, here, the instruction receiving unit 104 receives, from the imaging device 110, the instruction coordinates that the user instructed the imaging device 110. In S205, the process branches based on the presence or absence of an instruction in S204. If an instruction is given, the process proceeds to S206, and if no instruction is given, the process proceeds to S212.
[0025] In S206, the instruction receiving unit 104 converts the coordinates indicated by the received coordinate instruction into coordinates corresponding to the image with the resolution converted in S201. In S207, the selection unit 105 selects one or more object region candidates based on given position coordinates (the coordinates converted in S206 or the coordinates calculated in S210 of the previous processing loop). Details of S207 will be described later with reference to FIG. 5.
[0026] In S208, the selection unit 105 determines whether or not one or more object region candidates have been selected in S207. If selected, the process proceeds to S209, and if not selected, the process proceeds to S212. In S209, the integration unit 106 integrates the selected one or more object region candidates into one region.
[0027] In S210, the position correction unit 107 calculates a selected position by correcting the coordinates (position) used to select the object region candidate in S207, based on the region integrated in S209 and the likelihood map calculated in S202.
[0028] In S211, the integration unit 106 determines whether the number of times the position correction unit 107 has calculated the selected position is less than a predetermined number. If the number of times is less than the predetermined number, the process proceeds to S207, and the process loop of S207 to S211 is executed again with the corrected selected position as new coordinates. On the other hand, if the number of times reaches the predetermined number, the process proceeds to S212.
[0029] In S212, the integration unit 106 outputs the area integrated in S209 to the processing device 120. Note that if it is determined No in S205 or No in S208 (in the first processing loop of S207 to S211), it outputs "no area".
[0030] <Image conversion (S201) details> Here, the image acquired in S200 is described as an RGB image having a width of 5000 pixels and a height of 4000 pixels, for example. In S201, the captured image is converted to a predetermined size to match the input format of a multilayer neural network that calculates a likelihood map and object region candidates.
[0031] 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. Therefore, in this embodiment, it is assumed that the captured image acquired in S200 is reduced to one tenth, but other methods may be used for reduction. For example, a black image may be padded on the top, bottom, left, and right of the captured image to generate an RGB image with a width of 6000 pixels and a height of 4800 pixels, and then the image may be reduced to one twelfth. Alternatively, a predetermined area may be directly cut out from the captured image. In the transformed image, the vertex at the upper left corner is assumed to have the origin coordinates (0,0). Coordinates (i,j) indicate the coordinates of the pixel in the jth row and ith column of the image, and the pixel at the vertex at the lower right corner has coordinates (499,399). Hereinafter, the coordinate system of the transformed image is called the "image coordinate system".
[0032] <Details of obtaining the likelihood map (S202)> In this embodiment, as in Non-Patent Document 1, it is assumed that the likelihood map is calculated by a multilayer neural network. A neural network in an imaging device can be used, or a likelihood map calculated by a neural network in an external device can be acquired via a communication network and used. As described above, the input of the multilayer neural network is a resolution-converted image, which is an image with a width of 500 pixels, a height of 400 pixels, and three channels (RGB). The output of the multilayer neural network is a tensor (matrix) with 10 columns, 8 rows, and one channel. The calculated tensor (matrix) is called a likelihood map. In the likelihood map (the first channel), the vertex in the upper left corner is assumed to have the origin coordinates (0,0). The coordinates (i,j) indicate the coordinates of the pixel in the jth row and the ith column, and the pixel of the vertex in the lower right corner has the coordinates (9,7). Hereinafter, the coordinate system of the likelihood map is called a "map coordinate system".
[0033] The multilayer neural network that calculates 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, it is assumed that the likelihood map is a saliency map that responds to all objects, but it may be a saliency map that responds only to specific objects. The saliency map means a map that represents, in an image, the parts that people tend to focus on.
[0034] Fig. 3 is a diagram showing an example of a captured image containing two subjects and a likelihood map thereof, in which Fig. 3(a) shows an example of a captured image that has been image-converted, and Fig. 3(b) shows an example of a likelihood map corresponding to this captured image.
[0035] The converted captured image 300 shows two subjects: a rear (back) subject 301 and a front (nearby) subject 302. Each element area of the likelihood map indicates the likelihood of an object existing at the location corresponding to that element area. For convenience of illustration, element areas are used, but element areas can also correspond to pixels. The likelihood of existence (value of each element area) ranges from 0 to 255, with larger values indicating higher likelihood of existence. In FIG. 3(b), each element area is shown whiter when the likelihood is lower and blacker when the likelihood is higher. The likelihood map 304 is calculated to have a particularly high likelihood for the front subject 302, with the maximum likelihood of "204" at coordinates (6,4).
[0036] <Details of Obtaining Object Region Candidates (S203)> As with the likelihood map, the object region candidates are calculated using a multilayer neural network. A neural network in the imaging device can be used, or object region candidates calculated by a neural network in an external device can be acquired via a communication network and used. As with the calculation of the likelihood map, the input to the multilayer neural network is a resolution-converted image, which is a 3-channel RGB image with a width of 500 pixels and a height of 400 pixels. The output of the multilayer neural network is a 4-channel tensor with 10 columns and 8 rows. In other words, it is a region tensor at the position of each small region obtained by dividing the resolution-converted image into j×i small regions with j rows and i columns (here, j=10, i=8).
[0037] The first channel of the region tensor indicates the distance from each element region to the left edge of the object contour, the second channel indicates the distance to the top edge of the object contour, the third channel indicates the distance to the left edge of the object contour, and the fourth channel indicates the distance to the bottom edge of the object contour. The center position and size of the object can be calculated from the information in these four channels. This region tensor is hereafter referred to as the "object region candidate tensor."
[0038] In addition, two more channels may be added to the object region candidate tensor to create an offset map that indicates the horizontal and vertical distances to the object center position. However, since the present embodiment focuses on a method for calculating the object center position by a selection position correction, which will be described later, the following description will be given assuming that the object region candidate tensor has only four channels.
[0039] In the following description, 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. However, the number of columns and rows of each channel of the object region candidate tensor may be different from that of the likelihood map, and if different, the number of rows and columns may be matched by interpolation (e.g., bilinear interpolation).
[0040] The multilayer neural network that calculates the object region candidate tensor is trained in advance using a large amount of training data (sets of distances up, down, left, and right to the image and the object contour), similar to the calculation of the likelihood map. In this embodiment, a multilayer neural network that simultaneously outputs four channels of information is assumed. However, four multilayer neural networks that output one channel each may be prepared, and the results may be combined.
[0041] Fig. 4 is a diagram showing an example of object region candidate acquisition (S203). Fig. 4(a) shows an example of a captured image that has been image converted, and Figs. 4(b) to (e) show distance maps relating to a rectangle 400 that surrounds an object. More specifically, Fig. 4(b) shows a distance map to the top end of rectangle 400, Fig. 4(c) shows a distance map to the bottom end of rectangle 400, Fig. 4(d) shows a distance map to the right end of rectangle 400, and Fig. 4(e) shows a distance map to the left end of rectangle 400. The unit of distance (numerical value) shown in each element region is pixels.
[0042] Here, attention is paid to the coordinates (6,4) in Fig. 3(b) where the likelihood is maximum. The elemental regions inverted in Fig. 4(b) to (e) are the corresponding points of interest. In Fig. 4(a), the point indicated by point 401 is the position on the image that corresponds to this point of interest. Map coordinates can be converted to image coordinates using the following formula (1).
[0043]
number
[0044] Here, I w , I h represent the width and height of the converted captured image, respectively, and M w , M h represent the width and height of the map, respectively. x ,I y ) is a point in the image coordinate system, and (M x ,M y ) represents a point in the map coordinate system. According to formula (1), the point (6,4) in the map coordinates is converted to image coordinates as (325,225). That is, the image coordinates of point 401 in FIG. 4 are (325,225).
[0045] 4(b) to 4(e), the distances to the ends (top, bottom, left, right) of the rectangle surrounding the object at the point of interest are "344," "348," "178," and "166," respectively. From the above, object region candidate 400 at the point of interest is expressed as a four-sided rectangle located at distances of "344," "348," "178," and "166" in four directions (top, bottom, left, right), based on coordinates (325, 225) in the image coordinate system.
[0046] In this embodiment, the object region candidate is expressed by the distance to the rectangular edge (top, bottom, left, right), but other expression methods may be used. For example, the object region candidate is defined by a number of sides 404 connecting a number of points 403 on the boundary of the region surrounding the object, and (I x ,I y ) to each point.
[0047] <Details of Object Region Candidate Selection (S207)> FIG. 5 is a detailed flowchart of the object region candidate selection (S207).
[0048] In S500, the selection unit 105 initializes each variable. n and m are counters. N is the number of object region candidates to be selected, T is a likelihood threshold, and D is a distance threshold. L ij is the likelihood corresponding to the jth row and the ith column of the map coordinate system, S ij is the object region candidate corresponding to the jth row and the ith column of the map coordinate system. x ,P y ) is the designated coordinate acquired by the instruction receiving unit 104. 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).
[0049] In S501, the selection unit 105 selects the designated coordinate (P x ,P y ), where (u,v) is a two-dimensional positive integer vector.
[0050] In S502, the selection unit 105 selects a set of u, v if u, v exists and P x ,P y It is determined whether the distance between (u, v) and (u, v) is equal to or less than a threshold D. If it is Yes, the process proceeds to S503, and if not, the process ends. In this embodiment, the Euclidean distance shown in the formula (2) is used as the distance function for deriving the distance, but other distance functions may be used.
[0051]
number
[0052] In S503, the selection unit 105 selects the value L of the likelihood map at the position corresponding to the map coordinates (u, v). uv Extract.
[0053] In S504, the selection unit 105 selects L uv Compare with the likelihood threshold T. L uv If T or more, proceed to S505, and L uvIf is less than T, proceed to S509, increment m (add 1), and return to S501.
[0054] In S505, the selection unit 105 selects the object region candidate S uv Extract.
[0055] In S506, the selection unit 105 selects the current likelihood L uv and the object region candidate S uv L n , S n Save as.
[0056] In S507, the selection unit 105 compares n with N. If n is equal to or greater than N, the process ends. On the other hand, if n is less than N, the process proceeds to S508, where n is incremented (added by 1), and the process proceeds to S509, where m is incremented (added by 1), and the process returns to S501.
[0057] In this embodiment, a predetermined number N of object region candidates are selected, but the method of determining the number of object region candidates to be selected is not limited to this. For example, n The object region candidates may be selected so that the sum of is equal to or greater than a predetermined value.
[0058] <Details of merging object region candidates (S209)> Here, it is assumed that the user selects the rear subject 301 in FIG. 3(a), but the same processing is performed when selecting the front subject 302, with only the designated coordinates being different.
[0059] 6(a) and 6(b) are diagrams for explaining object region candidate integration (S209). As illustrated in FIG. 6(a), when a user wants to select a subject 301 in a captured image 300, the user designates coordinates 600 (for example, by a touch operation). Here, the designated coordinates are (235, 245) in the image coordinate system, which becomes (4.2, 4.4) when converted into the map coordinate system by formula (1).
[0060] Therefore, when the above-mentioned object region candidate selection process is performed, the shaded region 601 is selected. In other words, the shaded region 601 is a region that is composed of the closest (4,4), the second closest (4,5), and the third closest (5,4) to (4.2,4.4) in the map coordinate system. Therefore, the likelihoods L1, L2, and L3 are each 44 , L 45 , L 54 In addition, the object region candidates S1, S2, and S3 are each stored as S 44 , S 45 , S 54 The rectangles 602, 603, and 604 are stored as S 44 , S 45 , S 54 1 illustrates object region candidates corresponding to
[0061] 6(b) represent the "likelihood," "distance to the top edge of the rectangle," "distance to the bottom edge of the rectangle," "distance to the right edge of the rectangle," and "distance to the left edge of the rectangle," respectively, corresponding to the shaded area 601. Moreover, a rectangular area 610 represents the result of object area candidate integration (object area determination).
[0062] The object region candidate integration will be explained using a specific calculation example. First, calculate the center position of the object region candidate in the image coordinate system. From formula (1), the image coordinates corresponding to the map coordinates (4,4) are (225,225). Similarly, 45 The center position of S 54 The center position can be calculated.
[0063] The weighted average of likelihood is used to integrate object region candidates. The weighted average of likelihood can be calculated using the following formula (3).
[0064]
number
[0065] x nis the value 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 x n Similarly, by substituting the y coordinate of the center position and the distances to the rectangle ends (top, bottom, left, right) into formula (3), the center position (x coordinate, y coordinate) of the integrated object region and the distances to the rectangle ends (top, bottom, left, right) can be obtained.
[0066] Likelihood L n By substituting 0 for the initial value of L, it is possible to calculate the integrated object region using formula (3) even if 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. n If all are 0, it is determined that there is no object region.
[0067] <Details of selection position correction (S210)> 6(c) and 6(d) are diagrams for explaining the correction of the selected position (S210). The position correction unit 107 corrects the coordinates 600 designated by the user using the object region and the likelihood map obtained by the integration unit 106. FIG. 6(c) shows an example in which the designated coordinates 600 are corrected to coordinates 611.
[0068] One of the correction methods is to use the center of the object region obtained by the integration unit 106 as the new selected position. As described in the above calculation of the object region candidates, the center of each object region candidate is calculated by converting the points in the map coordinate system into points in the image coordinate system (I x ,I y Therefore, coordinates 611 obtained by weighting the rectangular area 610 obtained by integration with the likelihood map value can be regarded as the "center of a rectangle surrounding an object" based on the object likelihood.
[0069] Therefore, unless any of the object region candidates S1, S2, S3 includes the region of another object, a vector 612 from the indicated coordinates 600 to the coordinates 611 of the rectangular region 610 is a vector in the direction of the center of the object.
[0070] In the above description, the center of the object integration frame is set as coordinate 611, but coordinates based on other criteria may be calculated. Another calculation method will be described with reference to FIG. 6(d). The distance map values to the rectangular ends (top, bottom, left, right) of each of the object region candidates S1, S2, and S3 are regarded as vectors 613 to the object region ends. Then, vectors 615 obtained by weighted averaging using each vector and likelihood map value using equation (3) are applied to the indicated coordinates 600 to obtain corrected coordinates 611. In this case, the norm is larger than that of vector 612 obtained when the center of the object integration frame is set as the corrected coordinates, and therefore the correction effect of the selected position can be made stronger.
[0071] <Details of the result output (S212)> In the second processing loop (S207 to S211), the coordinates 611 calculated in the first processing loop are set as the designated coordinates for the object region candidate selection (S207) and similar processing is performed. In this embodiment, the processing loop is repeated N times (N is an integer equal to or greater than 1), and the integrating unit 106 outputs the result of the Nth object region candidate integration to the processing device 120.
[0072] <Effects> As described above, according to the first embodiment, it is possible to move the coordinates designated by the user to coordinates closer to the center of the object without separately learning center position correction information such as an offset map. For example, even if the user designates a position that is shifted from the center position of the desired object, it is possible to more accurately identify the center position of the desired object. In addition, it is possible to obtain a more accurate object region by selecting and integrating object region candidates using the calculated coordinates.
[0073] In other words, even in the case of a subject for which learning of an offset map and a likelihood map is difficult or in the case of a limited number of channels of an object region candidate tensor, it is possible to obtain a more accurate object region.
[0074] Second embodiment In the first embodiment described above, the number of corrections (loop counts) of the selected position is fixed. However, if the number of corrections is too many, the corrected selected position may be far from the center of the subject intended by the user. For example, if the distance map value to the rectangle edge represented by the object region candidate tensor is inaccurate (for example, due to the inclusion of adjacent objects), the corrected selected position may be far from the desired subject. Also, if there are many object region candidates corresponding to map coordinates with low object likelihood, the corrected selected position may be far from the desired subject.
[0075] Therefore, in the second embodiment, a form will be described in which the corrected selected position is evaluated to determine whether or not to continue the execution of the processing loop.
[0076] <Device configuration> Fig. 7 is a diagram showing the functional configuration of an image processing device 700 according to the first embodiment. This differs from the first embodiment (Fig. 1) in that it further includes a termination determination unit 701. Note that the hardware configuration of the image processing device 700 is similar to that of the first embodiment (Fig. 10), and therefore a description thereof will be omitted.
[0077] The end determination unit 701 evaluates the results of the position correction unit 107 and the likelihood map acquisition unit 102, and determines whether or not to end the correction by the position correction unit 107. If it is determined not to end the correction (to execute again), the selection unit 105, the integration unit 106, and the position correction unit 107 execute the processing again. On the other hand, if it is determined to end the correction, the integration unit 106 outputs the object region at that time to the processing device 120 as the processing result.
[0078] <Device Operation> 8 is a process flowchart of the image processing apparatus in the second embodiment. The basic process flow is the same as that in the first embodiment (FIG. 2), but differs in that S801 and S802 are executed instead of S211.
[0079] In S801, the processing result (correction of the selected position) obtained in the immediately preceding processing loop (S207 to S210) is evaluated, and it is determined whether or not to end the correction processing (processing loop). For example, if the correction of the selected position was successful, it is determined not to end, and if the correction was unsuccessful, it is determined to end. In S802, if it is determined to end in S801, the process proceeds to S212, and the object region obtained in the immediately preceding S209 is output. On the other hand, if it is determined not to end in S801, the process returns to S207, and the next processing loop is executed with the selected position obtained in S210 as the designated coordinate.
[0080] <Details of correction completion judgment (S801)> The end determination unit 701 compares the corrected position (coordinate 611) calculated immediately before by the position correction unit 107 with each point (I x ,I y ) is calculated. The likelihood map value at the map coordinates corresponding to the point closest to the corrected position is set as likelihood L4. The likelihood map value corresponding to the user's designated coordinates 600 (i.e., the coordinates before correction) calculated in S209 is set as L1.
[0081] FIG. 9(a) is a diagram showing an example of successful correction of the selected position (S210). In FIG. 9(a), L4 is larger than L1, and it can be evaluated that the coordinate 611 is present at a position more likely to be the center of the object than the designated coordinate 600 on the likelihood map. In other words, it can be determined that the correction of the selected position has been successful. Therefore, it is predicted that a better result will be obtained by continuing to determine the object region based on the corrected position. Therefore, the end determination unit 701 determines not to end the execution of the processing loop (to execute again), and executes the processing of the selection unit 105, the integration unit 106, and the position correction unit 107 again.
[0082] On the other hand, Fig. 9(b) is a diagram showing an example of failure in the correction of the selected position (S210). In Fig. 9(b), L4 is smaller than L1. The following two cases are assumed. When the user moves in a direction (vector 903) away from the intended subject (subject 301). When the likelihood map acquisition unit 102 erroneously calculates a low likelihood.
[0083] In either case, if the difference between L1 and L4 is large, it cannot be said that the coordinate 611 is calculated to be a point closer to the subject (subject 301) specified by the user. Therefore, it is predicted that good results will not be obtained even if the object region is continuously determined based on the corrected position. Therefore, the end determination unit 701 determines to end the execution of the processing loop, and by executing the correction process again, the risk of moving away from the subject specified by the user is avoided.
[0084] <Effects> According to the second embodiment, the processing result (correction of the selected position) obtained in the immediately preceding processing loop is evaluated, and it is determined whether or not to end the correction processing (processing loop). This makes it possible to avoid adverse effects (i.e., erroneous determination of the object region) caused by failure to correct the selected position due to an excessive number of corrections.
[0085] The disclosure of this specification includes the following image processing device, control method, and program. (Item 1) An acquisition means for acquiring a captured image; a likelihood acquisition means for acquiring a likelihood map representing the likelihood of an object existing at each position of the captured image; an area acquisition means for acquiring an area tensor indicating a position and a size of an object based on each position of the captured image; A receiving means for receiving a first position coordinate for the captured image; a region determining means for determining an object region corresponding to the first position coordinates based on the region tensor and the likelihood of the likelihood map corresponding to two or more region candidates each represented by the region tensor based on the first position coordinates; 13. An image processing device comprising: (Item 2) the region acquisition means acquires a region tensor at a position of each small region obtained by dividing the captured image into j×i small regions having j rows and i columns; The region determining means selects two or more region candidates corresponding to two or more small regions relatively close to the first position coordinates from among the j×i small regions. 2. The image processing device according to item 1, (Item 3) The region tensor is a tensor that indicates the distance from each position of the captured image to each of a plurality of points on the boundary of a region surrounding an object. 3. The image processing device according to item 1 or 2. (Item 4) The likelihood acquisition means acquires the likelihood map using a first multilayer neural network that has been trained in advance. 4. The image processing device according to any one of items 1 to 3, (Item 5) The region acquisition means acquires the region tensor using a second multi-layer neural network that has been trained in advance. 5. The image processing device according to any one of items 1 to 4, (Item 6) The region determining means determines an object region by integrating the two or more region candidates by a weighted average using the likelihood in the likelihood map as a weight. 6. The image processing device according to any one of items 1 to 5, (Item 7) a control means for causing the region determining means to determine a first object region based on the first position coordinates, and for causing the region determining means to determine a second object region based on second position coordinates determined from the first object region; a determination means for determining which of a first likelihood value corresponding to the first position coordinates in the likelihood map and a second likelihood value corresponding to the second position coordinates in the likelihood map with respect to a center of the object region determined by the region determination means is larger; an output means for outputting the first object region to an external device when the determination means determines that the first likelihood value is greater than the second likelihood value, and for outputting the second object region to the external device when the determination means determines that the first likelihood value is smaller than the second likelihood value; Further having 7. The image processing device according to any one of items 1 to 6, (Item 8) The control means further causes the region determining means to determine a third object region based on a third position coordinate determined from the second object region; the determining means further determines which of the second likelihood value and a third likelihood value corresponding to the third position coordinate in the likelihood map is larger; The output means outputs the second object region to the external device when the determination means determines that the second likelihood value is greater than the third likelihood value, and outputs the third object region to the external device when the determination means determines that the second likelihood value is smaller than the third likelihood value. 8. The image processing device according to item 7, (Item 9) the reception unit is a touch panel display that displays the captured image, The first position coordinates are position coordinates determined based on a touch operation by a user on the touch panel display. 9. The image processing device according to any one of items 1 to 8, (Item 10) The external device is a focus control device that performs focus control of an imaging device that captures the captured image. 8. The image processing device according to item 7, (Item 11) A control method for an image processing device, comprising: An acquisition step of acquiring a captured image; a likelihood acquisition step of acquiring a likelihood map representing the likelihood of an object being present at each position in the captured image; a region acquisition step of acquiring a region tensor indicating a position and a size of an object based on each position of the captured image; a receiving step of receiving first position coordinates for the captured image; determining an object region corresponding to the first position coordinate based on the region tensor and the likelihood of the likelihood map corresponding to two or more region candidates each represented by the region tensor based on the first position coordinate; A control method comprising: (Item 12) A program for causing a computer to function as each of the means of the image processing device according to any one of items 1 to 10.
[0086] (Other Examples) The present invention can also be realized by a process in which a program for implementing one or more of the functions of the above-described embodiments is supplied to a system or device via a network or a storage medium, and one or more processors in a computer of the system or device read and execute the program. The present invention can also be realized by a circuit (e.g., ASIC) that implements one or more of the functions.
[0087] The invention is not limited to the above-described embodiments, and various modifications and variations are possible without departing from the spirit and scope of the invention. Accordingly, the following claims are appended to apprise the public of the scope of the invention. [Explanation of symbols]
[0088] 100 Image processing device; 101 Image acquisition unit; 102 Likelihood map acquisition unit; 103 Candidate acquisition unit; 104 Instruction reception unit; 105 Selection unit; 106 Integration unit; 107 Position correction unit
Claims
1. An acquisition means for acquiring a captured image; a likelihood acquisition means for acquiring a likelihood map representing the likelihood of an object existing at each position of the captured image; an area acquisition means for acquiring an area tensor indicating a position and a size of an object based on each position of the captured image; a receiving means for receiving a first position coordinate for the captured image; a region determining means for determining an object region corresponding to the first position coordinates based on the region tensor and the likelihood of the likelihood map corresponding to two or more region candidates each represented by the region tensor based on the first position coordinates; 13. An image processing device comprising:
2. the region acquisition means acquires a region tensor at a position of each small region obtained by dividing the captured image into j×i small regions having j rows and i columns; The region determining means selects two or more region candidates corresponding to two or more small regions relatively close to the first position coordinates from among the j×i small regions.
2. The image processing device according to claim 1,
3. The region tensor is a tensor that indicates the distance from each position of the captured image to each of a plurality of points on the boundary of a region surrounding an object.
2. The image processing device according to claim 1,
4. The likelihood acquisition means acquires the likelihood map using a first multi-layer neural network that has been trained in advance.
2. The image processing device according to claim 1,
5. The region acquisition means acquires the region tensor using a second multi-layer neural network that has been trained in advance.
2. The image processing device according to claim 1,
6. The region determining means determines an object region by integrating the two or more region candidates by a weighted average using the likelihood in the likelihood map as a weight.
2. The image processing device according to claim 1,
7. a control means for causing the region determining means to determine a first object region based on the first position coordinates, and for causing the region determining means to determine a second object region based on second position coordinates determined from the first object region; a determination means for determining which of a first likelihood value corresponding to the first position coordinate in the likelihood map and a second likelihood value corresponding to the second position coordinate in the likelihood map with respect to a center of the object region determined by the region determination means is larger; an output means for outputting the first object region to an external device when the determination means determines that the first likelihood value is greater than the second likelihood value, and for outputting the second object region to the external device when the determination means determines that the first likelihood value is smaller than the second likelihood value; Further having 2. The image processing device according to claim 1,
8. The control means further causes the region determining means to determine a third object region based on a third position coordinate determined from the second object region; the determining means further determines which of the second likelihood value and a third likelihood value corresponding to the third position coordinate in the likelihood map is larger; The output means outputs the second object region to the external device when the determination means determines that the second likelihood value is greater than the third likelihood value, and outputs the third object region to the external device when the determination means determines that the second likelihood value is smaller than the third likelihood value.
8. The image processing device according to claim 7,
9. the reception unit is a touch panel display that displays the captured image, The first position coordinates are position coordinates determined based on a touch operation by a user on the touch panel display.
2. The image processing device according to claim 1,
10. The external device is a focus control device that performs focus control of an imaging device that captures the captured image.
8. The image processing device according to claim 7,
11. A control method for an image processing device, comprising: An acquisition step of acquiring a captured image; a likelihood acquisition step of acquiring a likelihood map representing the likelihood of an object being present at each position in the captured image; a region acquisition step of acquiring a region tensor indicating a position and a size of an object based on each position of the captured image; a receiving step of receiving first position coordinates for the captured image; determining an object region corresponding to the first position coordinate based on the likelihood of the likelihood map and the region tensor, each of the likelihood map and the region tensor corresponding to two or more region candidates represented by the region tensor, based on the first position coordinate; A control method comprising:
12. A program for causing a computer to function as each of the means of the image processing device according to any one of claims 1 to 10.
Citation Information
Patent Citations
Image processing device
JP2020173678A
Information processing device, information processing method and program
JP2021103347A
Region of interest selection for object detection
US20220147751A1
