Region detection method, computer program, and region detection device
By layering images at varying reduction rates and comparing frequency information across layers, the method improves the accuracy of target region detection in image processing.
Patent Information
- Application Number
- JP2025041753
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2024-03-25
- Filing Date
- 2025-03-14
- Publication Date
- 2025-10-07
AI Technical Summary
Existing image processing devices only process images at the unit pixel block level, leading to insufficient accuracy in region discrimination and target detection.
A method involving layering images at different reduction rates to generate multiple layered images, calculating frequency information, and comparing these layers to detect target regions based on frequency information matching.
Enhances the accuracy of target region detection by considering wide-area features through multi-layered image processing and frequency information comparison.
Smart Images

Figure 2025148286000001_ABST
Abstract
Description
[Technical Field]
[0001] The present invention relates to an area detection method, a computer program, and an area detection device. [Background technology]
[0002] The image processing device described in Patent Document 1 includes a DCT coefficient acquisition unit, a DCT feature generation unit, and a region discrimination unit. The DCT coefficient acquisition unit decompresses compressed image data of an in-vivo image as a compressed image, and acquires multiple DCT coefficients calculated by the decompression process for each unit pixel block processed by DCT encoding during compression. The DCT feature generation unit generates multidimensional DCT features as multidimensional features configured using the multiple DCT coefficients for each unit pixel block. The region discrimination unit performs region discrimination of an image region corresponding to the DCT coefficients in an in-vivo image (hereinafter referred to as a restored in-vivo image) as a restored image to be processed, based on the multiple DCT coefficients for each unit pixel block. In particular, the region discrimination unit performs region discrimination of an image region corresponding to the multidimensional DCT features in the restored in-vivo image, based on the multidimensional DCT features generated by the DCT feature generation unit for each unit pixel block. [Prior art documents] [Patent documents]
[0003] [Patent Document 1] International Publication No. 2008 / 139825 Summary of the Invention [Problem to be solved by the invention]
[0004] However, in the image processing device described in Patent Document 1, processing is only performed for each unit pixel block. Therefore, the results of region discrimination do not reflect wide-area features. As a result, the accuracy of region discrimination may not be sufficient. For example, the accuracy of detecting a target region from a detection target image may not be sufficient.
[0005] An embodiment of the present invention provides a region detection method, a computer program, and a region detection device that can accurately detect a target region from a detection target image.
[0006] According to one embodiment of the present invention, a region detection method detects a target region corresponding to a reference image from a detection target image, the region detection method including the steps of: layering the reference image into N layers (N is an integer equal to or greater than 2) by processing the reference image at different reduction rates to generate a plurality of reference layered images; calculating first frequency information from each of the plurality of reference layered images; layering the detection target image into the N layers by processing the detection target image at different reduction rates to generate a plurality of target layered images; calculating second frequency information from each of the plurality of target layered images; comparing the second frequency information of each of the plurality of target layered images with the first frequency information of each of the plurality of reference layered images; and detecting the target region corresponding to the reference image from the detection target image based on a comparison result in the comparing step.
[0007] In one embodiment, the comparing step preferably compares the second frequency information of the target layered image with the first frequency information of the reference layered image at the same layer.
[0008] In one embodiment, the step of calculating the first frequency information preferably includes a step of acquiring one or more reference block images from each of the plurality of reference layered images, and a step of calculating the first frequency information from each of the reference block images. The step of calculating the second frequency information preferably includes a step of acquiring one or more target block images having the same size as the reference block image from each of the plurality of target layered images, and a step of calculating the second frequency information from each of the target block images.
[0009] In one embodiment, the comparing step preferably includes a step of calculating a degree of match between the second frequency information of the target block image and the first frequency information of the reference block image, a step of assigning the degree of match to a pixel region of the same size as the target block image and calculating, for each layer, a match image region composed of a plurality of the pixel regions, a step of calculating, for each layer, an enlarged match image region by enlarging the match image region to the same size as the detection target image, and a step of calculating a composite match region by combining the enlarged match region obtained for each layer.
[0010] In one embodiment, the comparing step preferably includes a step of calculating, for each layer, a degree of agreement between the second frequency information of the target block image and the first frequency information of the reference block image. The step of calculating the degree of agreement preferably includes a step of dividing each of the first frequency information into a plurality of first frequency regions according to frequency characteristics, a step of calculating, for each of the plurality of first frequency regions, a step of dividing each of the second frequency information into a plurality of second frequency regions according to frequency characteristics, a step of calculating, for each of the plurality of second frequency regions, a step of comparing the first feature value with the second feature value and calculating, based on a comparison result, a feature value agreement degree indicating a degree of agreement between the first feature value and the second feature value, and a step of calculating, for each of the second frequency information of the target block image, the degree of agreement between the second frequency information and the first frequency information based on the plurality of feature value agreement degrees.
[0011] In one embodiment, each of the first feature and the second feature preferably includes DC component information and AC component information. In the step of calculating the feature agreement, the feature agreement is preferably calculated based on the agreement between the DC component information of the first feature and the DC component information of the second feature, and the agreement between the AC component information of the first feature and the AC component information of the second feature.
[0012] In one embodiment, it is preferable that the area detection method further includes, when a plurality of pieces of first frequency information exist in the same layer, a step of calculating a degree of agreement between the plurality of pieces of first frequency information, and a step of integrating two or more pieces of first frequency information among the plurality of pieces of first frequency information based on the degree of agreement between the plurality of pieces of first frequency information, and setting the integrated first frequency information as new first frequency information.
[0013] In one embodiment, the multiple reference layered images preferably include reduced images obtained by reducing the reference image. In the step of generating the reference layered image, when reducing the reference image, it is preferable to set multiple reduction start pixels from among multiple pixels constituting the reference image at the same reduction rate to start the reduction process, and generate reduced images of the same layer for each of the reduction start pixels. It is preferable that the multiple target layered images include reduced images obtained by reducing the detection target image. In the step of generating the target layered image, when reducing the detection target image, it is preferable to set multiple reduction start pixels from among multiple pixels constituting the detection target image at the same reduction rate to start the reduction process, and generate reduced images of the same layer for each of the reduction start pixels.
[0014] In one embodiment, in the step of acquiring the reference block image, it is preferable that a calculation start pixel at which calculation processing of the first frequency information is started is set for the reference block image, and a new reference block image is acquired with a pixel different from the calculation start pixel as a new calculation start pixel.In the step of acquiring the target block image, it is preferable that a calculation start pixel at which calculation processing of the second frequency information is started is set for the target block image, and a new target block image is acquired with a pixel different from the calculation start pixel as a new calculation start pixel.
[0015] In one embodiment, it is preferable that the area detection method further includes a step of setting, based on the texture indicated by the reference image, the number of layers to be layered when the detection target image and the reference image are layered, the reduction rate for each layer when the detection target image and the reference image are layered, and the size of the target block image and the reference block image.
[0016] According to another embodiment of the present invention, a computer program causes a computer to perform the above-described region detection method.
[0017] According to yet another embodiment of the present invention, a region detection device detects a target region corresponding to a reference image from a detection target image. The region detection device includes a first layering unit, a first frequency information calculation unit, a second layering unit, a second frequency information calculation unit, a comparison unit, and a detection unit. The first layering unit processes the reference image at different reduction rates to layer the reference image into N layers (N is an integer equal to or greater than 2) to generate a plurality of reference layered images. The first frequency information calculation unit calculates first frequency information from each of the plurality of reference layered images. The second layering unit processes the detection target image at different reduction rates to layer the N layers to generate a plurality of target layered images. The second frequency information calculation unit calculates second frequency information from each of the plurality of target layered images. The comparison unit compares the second frequency information of each of the plurality of target layered images with the first frequency information of each of the plurality of reference layered images. The detection unit detects the target region corresponding to the reference image from the detection target image based on the comparison result by the comparison unit. [Effects of the Invention]
[0018] According to the present invention, a target region can be detected with high accuracy from a detection target image. [Brief explanation of the drawings]
[0019] [Figure 1] FIG. 1 is a block diagram showing an area detection device according to an embodiment of the present invention. [Figure 2] Fig. 2(a) is a diagram showing an example of a reference image and a layering process for the reference image according to the present embodiment, and Fig. 2(b) is a diagram showing an example of a detection target image and a layering process for the detection target image according to the present embodiment. [Figure 3] 3A is a diagram showing an example of a frequency information calculation process for a reference hierarchical image according to this embodiment, and FIG. 3B is a diagram showing an example of a frequency information calculation process for a target hierarchical image according to this embodiment. [Figure 4] FIG. 4 is a diagram showing an example of the coincidence calculation process according to this embodiment. [Figure 5]FIG. 5 is a diagram showing an example of the enlargement process according to this embodiment. [Figure 6] FIG. 6 is a diagram showing an example of the synthesis process according to this embodiment. [Figure 7] FIG. 7 is a diagram showing an example of region division processing of second frequency information in the coincidence calculation processing of this embodiment. [Figure 8] FIG. 8 is a diagram showing an example of the calculation process of the second feature amount in the coincidence calculation process of this embodiment. [Figure 9] FIG. 9 is a diagram showing an example of region division processing of the first frequency information in the coincidence calculation processing of this embodiment. [Figure 10] FIG. 10 is a diagram showing an example of the calculation process of the first feature amount in the coincidence calculation process of this embodiment. [Figure 11] FIG. 11 is a diagram showing an example of the feature coincidence and coincidence calculation process in the coincidence calculation process of this embodiment. [Figure 12] FIG. 12 is a flowchart showing an example of the area detection method according to this embodiment. [Figure 13] FIG. 13 is a flowchart showing an example of step S3 in FIG. [Figure 14] FIG. 14 is a flowchart showing an example of step S5 of FIG. [Figure 15] FIG. 15 is a flowchart showing an example of step S6 in FIG. [Figure 16] FIG. 16 is a flowchart showing an example of step S61 in FIG. [Figure 17] 17(a) is a diagram showing an example of a reduction start pixel in layering processing according to a first modified example of this embodiment, and FIG. 17(b) is a diagram showing an example of shifting the reduction start pixel in layering processing according to the first modified example. [Figure 18] 18(a) is a diagram showing an example of a calculation start pixel in a frequency information calculation process according to a second modified example of this embodiment, and FIG. 18(b) is a diagram showing an example of shifting the calculation start pixel in a frequency information calculation process according to the second modified example. [Figure 19]FIG. 19 is a flowchart showing an example of the integration process according to the third modified example of this embodiment. [Figure 20] FIG. 20 is a flowchart showing an example of step S101 in FIG. DETAILED DESCRIPTION OF THE INVENTION
[0020] Hereinafter, embodiments of the present invention will be described with reference to the drawings. In the drawings, the same or corresponding parts are designated by the same reference characters and description thereof will not be repeated.
[0021] An area detection device 1 according to an embodiment of the present invention will be described with reference to Figures 1 to 16. The area detection device 1 detects a target area corresponding to a reference image 50 (Figure 2(a)) from a detection target image 60 (Figure 2(b)).
[0022] Fig. 1 is a block diagram showing an area detection device 1. As shown in Fig. 1, the area detection device 1 includes a processing unit 3, a storage unit 5, an input unit 7, and a display unit 9. The area detection device 1 is, for example, a computer.
[0023] The processing unit 3 includes processors such as a CPU (Central Processing Unit) and a GPU (Graphics Processing Unit). The storage unit 5 includes a storage device and stores data and computer programs. The processor of the processing unit 3 executes the computer programs stored in the storage device of the storage unit 5 to perform various processes.
[0024] For example, the storage unit 5 includes a main storage device such as a semiconductor memory, and an auxiliary storage device such as a semiconductor memory and a hard disk drive. The storage unit 5 may also include a removable medium such as an optical disk. The storage unit 5 is, for example, a computer-readable storage medium, and is typically a non-transitory computer-readable medium.
[0025] The processing unit 3 includes a parameter setting unit 31, a first layering unit 32, a first frequency information calculation unit 33, a second layering unit 34, a second frequency information calculation unit 35, a comparison unit 36, and a detection unit 37. The processing unit 3 preferably further includes an integration unit 38. The integration unit 38 will be described in a third modified example below.
[0026] Specifically, the processing unit 3 executes a computer program stored in the storage unit 5, thereby functioning as a parameter setting unit 31, a first layering unit 32, a first frequency information calculation unit 33, a second layering unit 34, a second frequency information calculation unit 35, a comparison unit 36, and a detection unit 37. In addition, the processing unit 3 preferably executes a computer program stored in the storage unit 5, thereby functioning as an integration unit 38.
[0027] The input unit 7 is an input device for inputting various pieces of information to the processing unit 3. For example, the input unit 7 is a keyboard and pointing device, or a touch panel.
[0028] The display unit 9 displays an image and is, for example, a liquid crystal display or an organic electroluminescence display.
[0029] Next, with reference to Fig. 2(a) and Fig. 2(b), a reference image 50 and a detection target image 60 to be processed by the area detection device 1 will be described. Fig. 2(a) is a diagram showing an example of the reference image 50. Fig. 2(b) is a diagram showing an example of the detection target image 60.
[0030] As shown in FIG. 2(a), the reference image 50 indicates a texture 55 to be detected by the area detection device 1. The area detection device 1 detects a target area corresponding to the reference image 50 (texture 55) from the detection target image 60 shown in FIG. 2(b). Specifically, the area detection device 1 detects a target area that is similar to the reference image 50 (texture 55) from the detection target image 60. As shown in FIG. 2(b), the detection target image 60 includes textures 65, 66, and 67. Of the textures 65, 66, and 67, the texture 65 that is similar to the reference image 50 (texture 55) corresponds to the target area.
[0031] In this embodiment, the area detection device 1 executes a parameter setting process, a layering process, a frequency information calculation process, a comparison process (a matching degree calculation process, an enlargement process, and a synthesis process), and a detection process as processes for detecting a target area corresponding to the reference image 50 from the detection target image 60. Each process will be described in detail below.
[0032] Continuing with reference to FIG. 1, FIG. 2(a) and FIG. 2(b), the layering process and the parameter setting process will be described.
[0033] Fig. 2(a) shows an example of layering processing of a reference image 50. As shown in Fig. 1 and Fig. 2(a), the first layering unit 32 processes the reference image 50 at different reduction ratios to layer it into N layers, thereby generating a plurality of reference layered images 50n. In the example of Fig. 2(a), reference layered images 501 to 503 are generated.
[0034] The reduction ratio is a real number equal to or less than 1. A reduction ratio of "1" indicates that the image is not reduced to the same size. The smaller the reduction ratio, the smaller the reference layered image 50n obtained by reduction. In this specification, "N" represents an integer equal to or greater than 2. In the example of FIG. 2(a), N=3. Also, in this specification, "n" represents an integer equal to or greater than 1.
[0035] For example, the reduction ratio is expressed by the value obtained by dividing the number of vertical pixels of the reference layered image 50n by the number of vertical pixels of the reference image 50, and the value obtained by dividing the number of horizontal pixels of the reference layered image 50n by the number of horizontal pixels of the reference image 50.
[0036] A plurality of hierarchies hn are formed by the hierarchical processing performed by the first hierarchical unit 32. In the example of Fig. 2(a), hierarchies h1 to h3 are formed.
[0037] The multiple reference layered images 50n include reduced images obtained by reducing the reference image 50. In the example of FIG. 2(a), reference layered images 501 and 502 are reduced images. The multiple reference layered images 50n also include full-size images obtained by not reducing the reference image 50. Reference layered image 503 is a full-size image.
[0038] Fig. 2(b) is a diagram showing an example of layering processing of the detection target image 60. As shown in Fig. 1 and Fig. 2(b), the second layering unit 34 processes the detection target image 60 at different reduction ratios to layer it into N layers, thereby generating a plurality of target layered images 60n. In the example of Fig. 2(b), target layered images 601 to 603 are generated.
[0039] The reduction ratio is a real number equal to or less than 1. A reduction ratio of "1" indicates that the image is not reduced to the same size. In the example of FIG. 2(b), N=3. For example, the reduction ratio is indicated by the value obtained by dividing the number of pixels in the vertical direction of the target layered image 60n by the number of pixels in the vertical direction of the detection target image 60, and the value obtained by dividing the number of pixels in the horizontal direction of the target layered image 60n by the number of pixels in the horizontal direction of the detection target image 60.
[0040] A plurality of hierarchies hn are formed by the hierarchical processing performed by the second hierarchical unit 34. In the example of Fig. 2(b), hierarchies h1 to h3 are formed.
[0041] The plurality of target hierarchical images 60n include reduced images obtained by reducing the detection target image 60. In the example of FIG. 2(b), the target hierarchical images 601 and 602 are reduced images. The plurality of target hierarchical images 60n also include life-size images obtained by not reducing the detection target image 60. The target hierarchical image 603 is a life-size image.
[0042] Before performing the layering process by the first layering unit 32 and the second layering unit 34, the parameter setting unit 31 sets the number of layers N when layering the detection target image 60 and the reference image 50, and the reduction rate for each layer hn when layering the detection target image 60 and the reference image 50, based on the size of the texture 55 to be detected.
[0043] Therefore, the first layering unit 32 generates a plurality of reference layered images 50n from the reference image 50 in accordance with the number of layers N and the reduction ratio set by the parameter setting unit 31. Furthermore, the second layering unit 34 generates a plurality of target layered images 60n from the detection target image 60 in accordance with the number of layers N and the reduction ratio set by the parameter setting unit 31.
[0044] The number of hierarchies N by the first hierarchizing section 32 is the same as the number of hierarchies N by the second hierarchizing section . The reduction rate by the first hierarchizing section 32 is the same as the reduction rate by the second hierarchizing section .
[0045] When the reduction rate set by the parameter setting unit 31 is less than 1, the first layering unit 32 reduces the reference image 50, and the second layering unit 34 reduces the detection target image 60. When the reduction rate set by the parameter setting unit 31 is 1, the first layering unit 32 multiplies the reference image 50 by 1, and the second layering unit 34 multiplies the detection target image 60 by 1.
[0046] Next, the frequency information calculation process will be described with reference to Fig. 1, Fig. 3(a) and Fig. 3(b). In this embodiment, the frequency information calculation process is, for example, a discrete cosine transform (DCT) process.
[0047] Fig. 3(a) is a diagram showing an example of the frequency information calculation process for the reference hierarchical image 50n, and Fig. 3(b) is a diagram showing an example of the frequency information calculation process for the target hierarchical image 60n.
[0048] 1 and 3(a), the first frequency information calculation unit 33 calculates first frequency information 71 from each of the multiple reference layered images 50n. That is, the first frequency information calculation unit 33 calculates the first frequency information 71 for each layer hn. As an example, the first frequency information 71 is a DCT coefficient group consisting of multiple DCT coefficients.
[0049] Specifically, the first frequency information calculation unit 33 acquires one or more reference block images 54 from each of the multiple reference layered images 50n. The size of each reference block image 54 is "M pixels x K pixels." In this embodiment, M=K. Furthermore, each of "M" and "K" is an integer greater than or equal to 2. As an example, M=K=8.
[0050] For example, a single reference block image 54 is obtained from reference layered image 501, four reference block images 54 are obtained from reference layered image 502, and nine reference block images 54 are obtained from reference layered image 503.
[0051] The first frequency information calculation unit 33 calculates first frequency information 71 from each of the reference block images 54. That is, the first frequency information calculation unit 33 calculates the first frequency information 71 for each layer hn and for each reference block image 54. Each piece of first frequency information 71 includes a plurality of first frequency elements. Specifically, each piece of first frequency information 71 includes "M×K" first frequency elements.
[0052] As an example, the first frequency information calculation unit 33 performs DCT processing on the reference block image 54 to calculate first frequency information 71, which is a group of DCT coefficients. In this case, each first frequency element constituting the first frequency information 71 is a DCT coefficient.
[0053] The parameter setting unit 31 sets the size of the reference block image 54 before the first frequency information calculation unit 33 executes the frequency information calculation process. Therefore, the first frequency information calculation unit 33 acquires the reference block image 54 of the size set by the parameter setting unit 31 and calculates the first frequency information 71. For example, the size of the reference block image 54 is indicated by the number of pixels in the horizontal and vertical directions.
[0054] 1 and 3(b), the second frequency information calculation unit 35 calculates the second frequency information 81 from each of the plurality of target hierarchical images 60n. That is, the second frequency information calculation unit 35 calculates the second frequency information 81 for each hierarchical layer hn.
[0055] Specifically, the second frequency information calculation unit 35 acquires one or more target block images 64 from each of the multiple target layered images 60n. The size of each target block image 64 is "M pixels x K pixels."
[0056] For example, four target block images 64 are obtained from the target layered image 601, 16 target block images 64 are obtained from the target layered image 602, and 36 target block images 64 are obtained from the target layered image 603.
[0057] The second frequency information calculation unit 35 calculates second frequency information 81 from each of the target block images 64. That is, the second frequency information calculation unit 35 calculates the second frequency information 81 for each hierarchical level hn and for each of the target block images 64. Each piece of second frequency information 81 includes a plurality of second frequency elements. Specifically, each piece of second frequency information 81 includes "M x K" second frequency elements.
[0058] As an example, the second frequency information calculation unit 35 performs DCT processing on the target block image 64 to calculate second frequency information 81, which is a group of DCT coefficients. In this case, each second frequency element constituting the second frequency information 81 is a DCT coefficient.
[0059] The parameter setting unit 31 sets the size of the target block image 64 before the second frequency information calculation unit 35 executes the frequency information calculation process. Therefore, the second frequency information calculation unit 35 acquires the target block image 64 of the size set by the parameter setting unit 31 and calculates the second frequency information 81. For example, the size of the target block image 64 is indicated by the number of pixels in the horizontal and vertical directions.
[0060] The comparison unit 36 compares the second frequency information 81 of each of the target layered images 60n with the first frequency information 71 of each of the reference layered images 50n. The comparison process includes a coincidence calculation process, an enlargement process, and a synthesis process.
[0061] Next, a matching calculation process constituting the comparison process will be described with reference to Fig. 1 and Fig. 4. Fig. 4 is a diagram showing an example of the matching calculation process. As shown in Fig. 1 and Fig. 4, the comparison unit 36 calculates the matching C# between the first frequency information 71 of the reference block image 54 and the second frequency information 81 of the target block image 64 for each layer hn. The matching C# is indicated by, for example, a numerical value. In this embodiment, the greater the matching C#, the closer the first frequency information 71 and the second frequency information 81 are to each other.
[0062] Specifically, the comparison unit 36 calculates the degree of coincidence C# between all pieces of second frequency information 81 and all pieces of first frequency information 71 on the same layer hn. In this case, the comparison unit 36 compares each piece of second frequency information 81 with all pieces of first frequency information 71 on the same layer hn. For example, on layer h2, the comparison unit 36 compares each piece of second frequency information 81 with four pieces of first frequency information 71. Then, the comparison unit 36 calculates the degree of coincidence C# for each piece of second frequency information 81 based on the comparison result.
[0063] When Q pieces of second frequency information 81 (Q target block images 64) exist on the same layer hn, the comparison unit 36 calculates Q degrees of match C# on the same layer hn, where "Q" is an integer equal to or greater than 1. For example, since 16 pieces of second frequency information 81 exist on layer h2, 16 degrees of match C# are calculated.
[0064] As described above with reference to Fig. 4, the comparison unit 36 compares each piece of second frequency information 81 belonging to the same layer hn with all of the first frequency information 71 belonging to the same layer hn, thereby calculating the degree of coincidence C# for each piece of second frequency information 81 belonging to the same layer hn. As a result, the degree of coincidence C# is obtained for each layer hn and for each piece of second frequency information 81. This makes it possible to further improve the detection accuracy of the target region.
[0065] Furthermore, the comparison unit 36 assigns a degree of match C# to a pixel region 91 of the same size as the target block image 64 (FIG. 3(b)), and calculates a degree of match image region 92 made up of a plurality of pixel regions 91 for each layer hn. The pixel regions 91 can be considered as pixels. Note that in FIG. 4, gaps are provided between the pixel regions 91 to make the drawing easier to understand.
[0066] For example, in layer h2, there are 16 target block images 64 (FIG. 3(b)), so the comparison unit 36 prepares 16 pixel regions 91. The comparison unit 36 then assigns 16 degrees of match C# to each of the 16 pixel regions 91. As a result, in layer h2, a match image region 92 consisting of the 16 pixel regions 91 is formed.
[0067] Next, the enlargement process constituting the comparison process will be described with reference to FIGS. 1 and 5. FIG. 5 is a diagram showing an example of the enlargement process. As shown in FIGS. 1 and 5, the comparison unit 36 calculates an enlarged matching score region 101 for each hierarchical level hn, in which the matching score image region 92 is enlarged to the same size as the detection target image 60 (FIG. 2(b)). In FIG. 5, the closer to white an area in each enlarged matching score region 101 is, the higher the matching score C# is. Therefore, the closer to white an area in each enlarged matching score region 101 is, the more similar it is to the reference image 50 (FIG. 2(a)).
[0068] Specifically, the comparison unit 36 interpolates pixels to enlarge the matching degree image region 92 to the same size as the detection target image 60. For example, the comparison unit 36 performs nearest neighbor interpolation, bilinear interpolation, or bicubic interpolation to enlarge the matching degree image region 92 and calculate the enlarged matching degree region 101.
[0069] Next, the synthesis process and detection process that constitute the comparison process will be described with reference to FIGS. 1 and 6. FIG. 6 is a diagram showing an example of the synthesis process. As shown in FIGS. 1 and 6, the comparison unit 36 calculates a synthesis match score area 102 by synthesizing multiple expanded match score areas 101 obtained for each layer hn. In FIG. 6, the closer an area in the synthesis match score area 102 is to white, the higher the match score C#. This indicates that the closer an area in the synthesis match score area 102 is to white, the more similar it is to the reference image 50 (FIG. 2(a)).
[0070] Specifically, the comparison unit 36 calculates the average value of pixel values of pixels located at the same coordinates between the multiple expanded matching degree regions 101. The comparison unit 36 sets the average value to the pixel value of the pixel located at the same coordinates in the composite matching degree region 102. If each expanded matching degree region 101 is made up of U pixels x V pixels, the comparison unit 36 calculates the average value between the multiple expanded matching degree regions 101 for each of the (U x V) pixels.
[0071] The comparison unit 36 calculates the average value by performing an arithmetic average or a weighted average. When performing a weighted average, the comparison unit 36 sets a larger weight for the enlarged matching degree region 101 that belongs to a layer hn having a larger reduction rate in the layering process.
[0072] The detection unit 37 detects a target area corresponding to the reference image 50 (texture 55) from the detection target image 60 (FIG. 2(b)) based on the synthesis matching degree area 102. That is, the detection unit 37 detects a target area that is similar to the reference image 50 (texture 55) from the detection target image 60 based on the synthesis matching degree area 102.
[0073] For example, the detection unit 37 detects, in the composite match region 102, a region of pixels to which a match C# equal to or greater than the threshold TH1 is assigned as the target region.
[0074] As described above with reference to FIGS. 1 to 6 , according to this embodiment, the first layering unit 32 generates a plurality of reference layered images 50n from the reference image 50. Then, the first frequency information calculation unit 33 calculates a plurality of pieces of first frequency information 71 from each of the reference layered images 50n. Meanwhile, the second layering unit 34 generates a plurality of target layered images 60n from the detection target image 60. Then, the second frequency information calculation unit 35 calculates a plurality of pieces of second frequency information 81 from each of the target layered images 60n. Furthermore, the comparison unit 36 compares each of the second frequency information 81 of the plurality of target layered images 60n with each of the first frequency information 71 of the plurality of reference layered images 50n. Then, the comparison unit 36 detects a target region corresponding to the reference image 50 from the detection target image 60 based on the comparison result.
[0075] Therefore, according to this embodiment, frequency information is compared between a plurality of reference hierarchical images 50n and a plurality of target hierarchical images 60n. In other words, frequency information is compared over a wide range in a plurality of layers h n. As a result, a target region can be detected more accurately from the detection target image 60 than when processing is performed only on unit pixel blocks of DCT processing.
[0076] 2(a), 2(b), 3(a), and 3(b), according to this embodiment, the parameter setting unit 31 sets the number of layers N, the reduction rate for each layer hn, and the sizes (block sizes) of the target block image 64 and the reference block image 54, based on the texture 55 represented by the reference image 50. Therefore, it is possible to set the number of layers N, the reduction rate, and the block size that are optimal for the target texture 55.
[0077] 3(a) and 3(b), in this embodiment, the size of the reference block image 54, which is the processing unit when calculating the first frequency information 71, is set to be the same as the size of the target block image 64, which is the processing unit when calculating the second frequency information 81. This simplifies the process of comparing the first frequency information 71 and the second frequency information 81, thereby improving the processing speed.
[0078] 4, according to this embodiment, the comparison unit 36 compares the second frequency information 81 of the target layered image 60n with the first frequency information 71 of the reference layered image 50n at the same layer hn. This allows for faster processing compared to when comparison is performed at different layers hn.
[0079] Furthermore, as described with reference to FIG. 5 , according to this embodiment, the comparison unit 36 calculates, for each layer hn, a matching degree image region 92 configured by pixel regions 91 to which a matching degree C# between the second frequency information 81 and the first frequency information 71 is assigned. Then, the comparison unit 36 enlarges the matching degree image region 92 for each layer hn to calculate an enlarged matching degree region 101. Furthermore, the comparison unit 36 combines the enlarged matching degree regions 101 of multiple layers hn to calculate a combined matching degree region 102. Then, the detection unit 37 detects a target region that resembles the reference image 50 from the detection target image 60 based on the combined matching degree region 102. That is, according to this embodiment, the detection unit 37 detects a target region based on the combined matching degree region 102 that reflects the matching degrees C# of multiple layers hn. As a result, the target region can be detected from the detection target image 60 with even greater accuracy.
[0080] Next, the coincidence calculation process will be described in detail with reference to Fig. 1 and Fig. 7 to Fig. 11. Fig. 7 is a diagram showing an example of region division processing of second frequency information 81 in the coincidence calculation process. As shown in Fig. 7, for convenience of explanation, in layer h2, the second frequency information 81 in the upper right corner of the figure may be referred to as second frequency information 811.
[0081] As shown in FIGS. 1 and 7, the comparison unit 36 divides each piece of second frequency information 811 into multiple second frequency regions B[j][i] according to the frequency characteristics. In the example of FIG. 7, the comparison unit 36 divides the second frequency information 811 into four second frequency regions B[j][0] to B[j][3]. The number of divisions m is not particularly limited as long as it is 2 or greater. In the example of FIG. 7, m=4. The second frequency regions B[j][i] are indicated by dot hatching in the drawings. The second frequency regions B[j][0] to B[j][3] constitute a second divided region group 100[j].
[0082] In this specification, "j" indicates an integer equal to or greater than 1 and is a consecutive number starting from "1" for identifying the second frequency information 81 in the layer hn. In the example of FIG. 7, j=1 to 16 in the layer h2. For example, the second frequency region B[1][i] indicates that the second frequency region is calculated from the first second frequency information 81 in the layer hn. Note that there is a one-to-one correspondence between the second frequency information 81 and the target block image 64 (FIG. 3(b)), so "j" can also be considered as a consecutive number for identifying the target block image 64 in the layer hn.
[0083] In this specification, "i" indicates an integer equal to or greater than 0. "i" indicates the division region number in the hierarchy hn and is a consecutive number starting from "0." In the example of FIG. 7, the number of division regions is "4," so i=0 to 3. For example, the second frequency region B[j][0] indicates the 0th second frequency region in the hierarchy hn.
[0084] In the example of FIG. 7 , the second frequency region B[j][0] consists of a second frequency element 110. The second frequency element 110 is a DC component. The second frequency region B[j][1] includes a plurality of second frequency elements 111. The second frequency element 111 is an AC component. The second frequency region B[j][2] includes a plurality of second frequency elements 112. The second frequency element 112 is an AC component. The second frequency region B[j][3] includes a plurality of second frequency elements 113. The second frequency element 113 is an AC component. The frequency of the second frequency region B[j][3] is higher than the frequency of the second frequency region B[j][2]. The frequency of the second frequency region B[j][2] is higher than the frequency of the second frequency region B[j][1].
[0085] 8 is a diagram showing an example of the calculation process of the second feature amount in the coincidence calculation process. In FIG. 8, in each of Ad[][], Sd[][], and Rd[][], The parenthesized number j indicates the number that identifies the original second frequency information 81. The number in the second parentheses indicates the number i of the original second frequency region B[j][i]. "i" is the number that identifies the second frequency region B[j][i].
[0086] 1 and 8, the comparison unit 36 calculates second feature amount information F2[j] from the second divided area group 100[j]. The second feature amount information F2[j] includes a plurality of second feature amounts.
[0087] Specifically, the comparison unit 36 calculates, for each of the plurality of second frequency regions B[j][i], a second feature amount indicating the feature of the second frequency region B[j][i].
[0088] The second feature quantity indicating the feature of the second frequency region B[j][0] is the DC component Ad[j][0], which is the second frequency element 110.
[0089] The second feature amount indicating the characteristics of the second frequency region B[j][1] includes the sum Sd[j][1] of the absolute values of the multiple second frequency components 111 and the range Rd[j][1] of the multiple second frequency components 111. The range Rd[j][1] is a value obtained by subtracting the minimum value from the maximum value of the second frequency components 111 in the second frequency region B[j][1].
[0090] The second feature quantity indicating the characteristics of the second frequency region B[j][2] includes the sum Sd[j][2] of the absolute values of the multiple second frequency components 112 and the range Rd[j][2] of the multiple second frequency components 112. The range Rd[j][2] is a value obtained by subtracting the minimum value from the maximum value of the second frequency components 112 in the second frequency region B[j][2].
[0091] The second feature amount indicating the characteristics of the second frequency region B[j][3] includes the sum Sd[j][3] of the absolute values of the multiple second frequency components 113 and the range Rd[j][3] of the multiple second frequency components 113. The range Rd[j][3] is a value obtained by subtracting the minimum value from the maximum value of the second frequency components 113 in the second frequency region B[j][3].
[0092] The DC component Ad[j][0], the sum of the absolute values Sd[j][1] to Sd[j][3], and the range Rd[j][1] to Rd[j][3] constitute the second feature amount information F2[j].
[0093] As described above with reference to FIGS. 7 and 8 , according to this embodiment, the comparison unit 36 divides each piece of second frequency information 81 into a plurality of second frequency regions B[j][i]. Then, the comparison unit 36 calculates second feature amounts (Ad[j][0], Sd[j][1] to Sd[j][3], Rd[j][1] to Rd[j][3]) for each of the plurality of second frequency regions B[j][i]. Therefore, it is possible to extract second feature amounts indicating the characteristics of each piece of second frequency information 81 with high accuracy from each piece of second frequency information 81. As a result, it is possible to further improve the accuracy when the detection unit 37 detects the target region.
[0094] 9 is a diagram showing an example of region division processing of the first frequency information 71 in the coincidence calculation processing. As shown in FIG. 9, for convenience of explanation, four pieces of first frequency information 71 in layer h2 may be referred to as first frequency information 711, 712, 713, and 714.
[0095] 1 and 9, the comparison unit 36 divides each piece of first frequency information 711 into a plurality of first frequency regions A[k][i] according to the frequency characteristics. In the example of FIG. 9, the comparison unit 36 divides the first frequency information 711 into four first frequency regions A[1][0] to A[1][3]. The number of divisions m is the same as the number of divisions m of the second frequency information 811. In the example of FIG. 9, m=4. The first frequency regions A[k][i] are indicated by dot hatching in the drawings.
[0096] In this specification, "k" indicates an integer equal to or greater than 1 and is a consecutive number starting from "1" for identifying the first frequency information 71 in the layer hn. In the example of FIG. 9, there are four pieces of first frequency information 71 in the layer h2, so k=1 to 4. In this case, for example, the first frequency regions A[1][0] to A[1][3] indicate the first frequency regions calculated from the first frequency information 711. Note that there is a one-to-one correspondence between the first frequency information 71 and the reference block image 54 (FIG. 3(a)), so "k" can also be considered as a consecutive number for identifying the reference block image 54 in the layer hn.
[0097] In the example of FIG. 9 , the first frequency region A[1][0] consists of a first frequency element 210. The first frequency element 210 is a DC component. The first frequency region A[1][1] includes a plurality of first frequency elements 211. The first frequency element 211 is an AC component. The first frequency region A[1][2] includes a plurality of first frequency elements 212. The first frequency element 212 is an AC component. The first frequency region A[1][3] includes a plurality of first frequency elements 213. The first frequency element 213 is an AC component. The frequency of the first frequency region A[1][3] is higher than the frequency of the first frequency region A[1][2]. The frequency of the first frequency region A[1][2] is higher than the frequency of the first frequency region A[1][1].
[0098] The first frequency regions A[1][0] to A[1][3] constitute a first divided region group 200[1]. In the example of FIG. 9, the comparison unit 36 generates the first divided region group 200[2] to 200[4] in the same manner as the first divided region group 200[1]. The first divided region groups 200[2] to 200[4] are generated by dividing the first frequency information 712 to 714, respectively. Note that the first divided region group 200[1] to 200[4] may be collectively referred to as the first divided region group 200[k].
[0099] 10 is a diagram showing an example of the calculation process of the first feature amount in the coincidence calculation process. In FIG. 10, in each of At[][], St[][], and Rt[][], the number in the first parentheses is the number k that identifies the original first frequency information 71. The number in the second parentheses is the number i of the original first frequency region A[k][i]. "i" is the number that identifies the first frequency region A[k][i].
[0100] 1 and 10, the comparison unit 36 calculates first feature amount information F1[1] to F1[4] for each of the first divided area groups 200[1] to 200[4]. Each of the first feature amount information F1[1] to F1[4] includes a plurality of first feature amounts.
[0101] Specifically, the comparison unit 36 calculates a first feature amount indicating the characteristics of the first frequency region A[k][i] for each of the multiple first divided region groups 200[k] and for each of the multiple first frequency regions A[k][i].
[0102] Hereinafter, attention will be focused on the first divided region group 200[1] and the first feature amount information F1[1] obtained from the first frequency information 711.
[0103] The first feature quantity indicating the feature of the first frequency region A[1][0] is the DC component At[1][0], which is the first frequency element 210.
[0104] The first feature amount indicating the feature of the first frequency region A[1][1] includes the sum St[1][1] of the absolute values of the multiple first frequency components 211 and the range Rt[1][1] of the multiple first frequency components 211. The range Rt[1][1] is a value obtained by subtracting the minimum value from the maximum value of the first frequency components 211 in the first frequency region A[1][1].
[0105] The first feature amount indicating the feature of the first frequency region A[1][2] includes the sum St[1][2] of the absolute values of the multiple first frequency components 212 and the range Rt[1][2] of the multiple first frequency components 212. The range Rt[1][2] is a value obtained by subtracting the minimum value from the maximum value of the first frequency components 212 in the first frequency region A[1][2].
[0106] The first feature amount indicating the feature of the first frequency region A[1][3] includes the sum St[1][3] of the absolute values of the multiple first frequency components 213 and the range Rt[1][3] of the multiple first frequency components 213. The range Rt[1][3] is a value obtained by subtracting the minimum value from the maximum value of the first frequency components 213 in the first frequency region A[1][3].
[0107] The DC component At[1][0], the sum of the absolute values St[1][1] to St[1][3], and the range Rt[1][1] to Rt[1][3] constitute the first feature amount information F1[1].
[0108] 10, the comparison unit 36 calculates the first feature amount information F1[2] to F1[4] from each of the first divided area groups 200[2] to 200[4] in the same manner as when calculating the first feature amount information F1[1]. Note that the first feature amount information F1[1] to F1[4] may be collectively referred to as first feature amount information F1[k].
[0109] As described above with reference to FIGS. 9 and 10 , according to this embodiment, the comparison unit 36 divides each piece of first frequency information 71 into a plurality of first frequency regions A[k][i]. Then, the comparison unit 36 calculates a first feature amount (At[k][0], St[k][1] to St[k][3], Rt[k][1] to Rt[k][3]) for each of the plurality of first frequency regions A[k][i]. Therefore, it is possible to extract, with high accuracy, a first feature amount that indicates the characteristics of the first frequency information 71 from each piece of first frequency information 71. As a result, it is possible to further improve the accuracy when the detection unit 37 detects a target region.
[0110] 11 is a diagram showing an example of the feature coincidence degree and the calculation process of the coincidence degree in the coincidence calculation process. As shown in Fig. 1 and Fig. 11, the comparison unit 36 compares, for each piece of first feature information F1[k], the first feature amounts (At[k][i], St[k][i], Rt[k][i]) included in the first feature information F1[k] with the second feature amounts (Ad[j][i], Sd[j][i], Rd[j][i]) included in the second feature information F2[j].
[0111] Then, for each piece of first feature information F1[k], the comparison unit 36 calculates, based on the comparison result, a feature agreement C(k) indicating the agreement between the first features (At[k][i], St[k][i], Rt[k][i]) contained in the first feature information F1[k] and the second features (Ad[j][i], Sd[j][i], Rd[j][i]) contained in the second feature information F2[j].
[0112] 11, in At[k][i] and Ad[j][i], "i" is 0 (zero). Also, in St[k][i], Rt[k][i], Sd[j][i], and Rd[j][i], "i" is 1, 2, or 3.
[0113] Specifically, the comparison unit 36 calculates the feature coincidence C(k) using equations (1), (2), and (3).
[0114]
number
[0115]
number
[0116]
number
[0117] In equations (1) to (3), "k" indicates an integer equal to or greater than 1, as described above, and is a consecutive number starting from "1" for identifying the first frequency information 71 in the hierarchy hn. "Amax" indicates the maximum value of the DC component obtained in advance by calculation. "Abs" indicates that the absolute value of (At[k][0]-Ad[j][0]) is calculated.
[0118] As described above, "j" indicates an integer equal to or greater than 1 and is a consecutive number starting from "1" for identifying the second frequency information 81 in the layer hn. In formulas (1) to (3), "j" is a fixed value. By changing "j", it is possible to calculate the degree of match C# between other second frequency information 81 in the same layer hn and each piece of first frequency information 71 in the same layer hn.
[0119] As described above, "i" indicates the division area number when the first frequency information 71 and the second frequency information 81 are divided into areas. "i=0" indicates a DC component. Therefore, DC(k) shown in equation (2) is an element indicating a DC component. On the other hand, "i=1 to 3" indicates an AC component. As described above, "m" indicates the number of divisions when the first frequency information 71 and the second frequency information 81 are divided into areas. Therefore, AC(k) shown in equation (3) is an element indicating an AC component. Furthermore, the symbol Σ in equation (3) indicates the sum of only AC components.
[0120] "Ratio(St[k][i], Sd[j][i])" indicates that the smaller of St[k][i] and Sd[j][i] is divided by the larger value. "Ratio(Rt[k][i], Rd[j][i])" indicates that the smaller of Rt[k][i] and Rd[j][i] is divided by the larger value. "α" indicates a correction coefficient.
[0121] Equations (1) to (3) will be explained in detail. As shown in equation (2), DC(k) in equation (1) includes DC component information At[k][0] relating to the DC component of the first frequency information 71 of the reference image 50 and DC component information Ad[j][0] relating to the DC component of the second frequency information 81 of the detection target image 60. In other words, the first feature amount in the first frequency information 71 of the reference image 50 includes DC component information At[k][0]. Furthermore, the second feature amount in the second frequency information 81 of the detection target image 60 includes DC component information Ad[j][0].
[0122] DC(k) in equation (2) represents the degree of match between the DC component information At[k][0] of the first feature amount related to the reference image 50 and the DC component information Ad[j][0] of the second feature amount related to the detection target image 60. In other words, as can be seen from equation (2), the smaller the absolute value of the difference between the DC component information At[k][0] of the reference image 50 and the DC component information Ad[j][0] of the detection target image 60, the larger DC(k) in equation (2) becomes. Therefore, the higher the degree of match between the DC component of the reference image 50 and the DC component of the detection target image 60, the larger DC(k) becomes.
[0123] As shown in equation (3), AC(k) in equation (1) includes AC component information St[k][i], Rt[k][i] related to the AC components of the first frequency information 71 of the reference image 50, and AC component information Sd[j][i], Rd[j][i] related to the AC components of the second frequency information 81 of the detection target image 60. In other words, the first feature amount in the first frequency information 71 of the reference image 50 includes AC component information St[k][i], Rt[k][i]. Furthermore, the second feature amount in the second frequency information 81 of the detection target image 60 includes AC component information Sd[j][i], Rd[j][i].
[0124] AC(k) in equation (3) indicates the degree of match between AC component information St[k][i] of the first feature amount related to the reference image 50 and AC component information Sd[j][i] of the second feature amount related to the detection target image 60. Furthermore, AC(k) indicates the degree of match between AC component information Rt[k][i] of the first feature amount related to the reference image 50 and AC component information Rd[j][i] of the second feature amount related to the detection target image 60.
[0125] That is, as can be seen from equation (3), the smaller the difference between AC component information St[k][i] regarding reference image 50 and AC component information Sd[j][i] regarding detection target image 60, the larger the Ratio(St[k][i], Sd[j][i]), and the larger AC(k) in equation (3). Also, the smaller the difference between AC component information Rt[k][i] regarding reference image 50 and AC component information Rd[j][i] regarding detection target image 60, the larger the Ratio(Rt[k][i], Rd[j][i]), and the larger AC(k) in equation (3). Therefore, the higher the degree of match between the AC components of reference image 50 and the AC components of detection target image 60, the larger AC(k).
[0126] As described above, as shown in equation (1), according to this embodiment, the comparison unit 36 calculates the feature coincidence C(k), which indicates the degree of coincidence between the first feature related to the reference image 50 and the second feature related to the detection target image 60, based on the coincidence DC(k) between the DC component information of the first feature and the DC component information of the second feature, and the coincidence AC(k) between the AC component information of the first feature and the AC component information of the second feature. Therefore, the coincidence C# between the reference image 50 and the detection target image 60 can be calculated with higher accuracy.
[0127] Note that by adjusting the magnitude of "Amax" in equation (2) and the magnitude of "α" in equation (3), the weights of DC(k) and AC(k) in equation (1) are adjusted.
[0128] In the examples of FIGS. 7 to 11, the comparison unit 36 calculates the degree of coincidence C# between the second frequency information 811 (FIG. 7) and the first frequency information 711 to 714 (FIG. 9) based on a plurality of feature amount coincidences C(1) to C(4).
[0129] For example, the comparison unit 36 calculates the average value of the feature amount coincidences C(1) to C(4) and outputs the average value as the coincidence C#.
[0130] For example, the comparison unit 36 outputs the maximum value among the feature amount coincidences C(1) to C(4) as the coincidence C#.
[0131] For example, the comparison unit 36 calculates the average value of the top p% of the feature amount matches C(1) to C(4) and outputs the average value as the match C#, where "p" is determined experimentally and / or empirically.
[0132] The comparison unit 36 calculates the degree of coincidence C# between the second frequency information 81 and the first frequency information 71 for each piece of second frequency information 81 of the target block image 64, based on the plurality of feature amount coincidences C(k).
[0133] Next, with reference to Fig. 1 and Figs. 12 to 16, an area detection method according to this embodiment will be described. The area detection method is executed by the area detection device 1. Fig. 12 is a flowchart showing an example of the area detection method according to this embodiment. As shown in Fig. 12, the area detection method includes steps S1 to S7. The storage unit 5 stores a computer program for causing the area detection device 1 (computer) to execute steps S1 to S7. The processing unit 3 executes the computer program stored in the storage unit 5 to execute steps S1 to S7. The area detection method preferably includes step S100. Step S100 will be described later in a third modified example.
[0134] 1 and 12, first, in step S1, the parameter setting unit 31 sets parameters for executing the layering process and the frequency information calculation process. Specifically, the parameter setting unit 31 sets the number of layers N when layering the detection target image 60 and the reference image 50, the reduction rate for each layer hn when layering the detection target image 60 and the reference image 50, and the sizes of the target block image 64 and the reference block image 54.
[0135] Next, in step S2, the first layering unit 32 layers the reference image 50 into N layers (N is an integer equal to or greater than 2) by processing the reference image 50 using different reduction ratios, thereby generating a plurality of reference layered images 50n.
[0136] Next, in step S3, the first frequency information calculation unit 33 calculates the first frequency information 71 from each of the plurality of reference layered images 50n.
[0137] Next, in step S4, the second layering unit 34 layers the detection target image 60 into N layers by processing it using different reduction ratios, and generates a plurality of target layered images 60n.
[0138] Next, in step S5, the second frequency information calculation unit 35 calculates the second frequency information 81 from each of the plurality of target hierarchical images 60n.
[0139] Next, in step S6, the comparison unit 36 compares the second frequency information 81 of each of the target layered images 60n with the first frequency information 71 of each of the reference layered images 50n.
[0140] Next, in step S7, the detection unit 37 detects a target region corresponding to the reference image 50 from the detection target image 60 based on the comparison result in step S6, and the region detection method then ends.
[0141] As described above with reference to FIG. 12 , according to the region detection method of this embodiment, frequency information is compared between a plurality of reference hierarchical images 50 n and a plurality of target hierarchical images 60 n. In other words, frequency information is compared over a wide range in a plurality of layers h n. As a result, a target region can be detected more accurately from the detection target image 60 compared to when processing is performed only on unit pixel blocks of DCT processing.
[0142] Fig. 13 is a flowchart showing an example of step S3 in Fig. 12. As shown in Fig. 13, step S3 in Fig. 12 includes steps S31 to S35.
[0143] First, in step S31, the first frequency information calculation unit 33 acquires the reference block image 54 from the reference layered image 50n.
[0144] Next, in step S32, the first frequency information calculation unit 33 calculates the first frequency information 71 from the reference block image .
[0145] Next, in step S33, the first frequency information calculation unit 33 determines whether or not the processes in steps S31 and S32 have been completed for all reference block images 54 in the same layer hn.
[0146] If a negative determination (No) is made in step S33, the process proceeds to step S31.
[0147] On the other hand, if an affirmative determination (Yes) is made in step S33, the process proceeds to step S35.
[0148] Next, in step S35, the first frequency information calculation unit 33 determines whether steps S31 to S33 have been completed for all layers hn.
[0149] If a negative determination (No) is made in step S35, the process proceeds to step S34.
[0150] Next, in step S34, the first frequency information calculation unit 33 changes the hierarchy hn, and the process proceeds to step S31.
[0151] On the other hand, if an affirmative determination (Yes) is made in step S35, the process proceeds to step S4 in FIG.
[0152] Fig. 14 is a flowchart showing an example of step S5 in Fig. 12. As shown in Fig. 14, step S5 in Fig. 12 includes steps S51 to S55.
[0153] First, in step S51, the second frequency information calculation unit 35 acquires the target block image 64 from the target layered image 60n.
[0154] Next, in step S52 , the second frequency information calculation unit 35 calculates the second frequency information 81 from the target block image 64 .
[0155] Next, in step S53, the second frequency information calculation unit 35 determines whether or not the processes in steps S51 and S52 have been completed for all target block images 64 in the same layer hn.
[0156] If a negative determination (No) is made in step S53, the process proceeds to step S51.
[0157] On the other hand, if an affirmative determination (Yes) is made in step S53, the process proceeds to step S55.
[0158] Next, in step S55, the second frequency information calculation unit 35 determines whether steps S51 to S53 have been completed for all layers hn.
[0159] If a negative determination (No) is made in step S55, the process proceeds to step S54.
[0160] Next, in step S54, the second frequency information calculation unit 35 changes the hierarchy hn, and the process proceeds to step S51.
[0161] On the other hand, if an affirmative determination (Yes) is made in step S55, the process proceeds to step S6 in FIG.
[0162] Fig. 15 is a flowchart showing an example of step S6 in Fig. 12. As shown in Fig. 15, step S6 in Fig. 12 includes steps S61 to S66.
[0163] First, in step S61, the comparison unit 36 calculates the degree of coincidence C# between the second frequency information 81 of the target block image 64 and the first frequency information 71 of the reference block image 54. In step S61, the comparison unit 36 calculates all degrees of coincidence C# of the same layer hn.
[0164] Next, in step S62, the comparison unit 36 assigns a degree of match C# to a pixel region 91 that has the same size as the target block image 64.
[0165] Since all of the degrees of coincidence C# on the same layer hn have been calculated in step S61, a coincidence image region 92 made up of a plurality of pixel regions 91 is formed on that layer hn.
[0166] Next, in step S63, the comparison unit 36 calculates an expanded coincidence region 101 by expanding the coincidence image region 92 to the same size as the detection target image 60.
[0167] Next, in step S64, the comparison unit 36 determines whether steps S61 to S63 have been completed for all hierarchies hn.
[0168] If a negative determination (No) is made in step S64, the process proceeds to step S65.
[0169] Next, in step S65, the comparison unit 36 changes the layer hn, and the process proceeds to step S61.
[0170] On the other hand, if an affirmative determination (Yes) is made in step S64, the process proceeds to step S66.
[0171] Next, in step S66, the comparison unit 36 calculates a combined matching region 102 by combining the expanded matching regions 101 obtained for each layer hn. Then, the process proceeds to step S7 in FIG.
[0172] Next, in step S7, the detection unit 37 detects a target region from the detection target image 60 based on the composite match degree region 102.
[0173] Fig. 16 is a flowchart showing an example of step S61 in Fig. 15. As shown in Fig. 16, step S61 in Fig. 15 includes steps S611 to S622.
[0174] First, in step S611, the comparison section 36 divides the first frequency information 71 into a plurality of first frequency regions A[k][i] according to the frequency characteristics.
[0175] Next, in step S612, the comparison unit 36 calculates a first feature amount indicating the feature of the first frequency region A[k][i].
[0176] Next, in step S613, the comparison section 36 determines whether step S612 has been completed for all of the first frequency regions A[k][i].
[0177] If a negative determination (No) is made in step S613, the process proceeds to step S612.
[0178] On the other hand, if an affirmative determination (Yes) is made in step S613, the process proceeds to step S614.
[0179] Next, in step S614, the comparison unit 36 determines whether or not there is other first frequency information 71 in the same hierarchy hn.
[0180] If an affirmative determination (Yes) is made in step S614, the process proceeds to step S615.
[0181] Next, in step S615, the comparison section 36 changes the processing target to another piece of first frequency information 71, and the process proceeds to step S611.
[0182] On the other hand, if a negative determination (No) is made in step S614, the process proceeds to step S616.
[0183] Next, in step S616, the comparison section 36 divides the second frequency information 81 into a plurality of second frequency regions B[j][i] according to the frequency characteristics.
[0184] Next, in step S617, the comparison unit 36 calculates a second feature amount indicating the feature of the second frequency region B[j][i].
[0185] Next, in step S618, the comparison section 36 determines whether step S617 has been completed for all second frequency regions B[j][i].
[0186] If a negative determination (No) is made in step S618, the process proceeds to step S617.
[0187] On the other hand, if an affirmative determination (Yes) is made in step S618, the process proceeds to step S619.
[0188] Next, in step S619, the comparison unit 36 compares the first feature amount with the second feature amount, and calculates a feature amount coincidence C(k) indicating the degree of coincidence between the first feature amount and the second feature amount based on the comparison result.
[0189] Next, in step S620, the comparison unit 36 calculates the degree of coincidence C# between the second frequency information 81 and the first frequency information 71 based on the plurality of feature quantity coincidences C(k) in the same layer hn.
[0190] Next, in step S621, the comparison unit 36 determines whether or not there is other second frequency information 81 in the same hierarchy hn.
[0191] If an affirmative determination (Yes) is made in step S621, the process proceeds to step S622.
[0192] Next, in step S622, the comparison section 36 changes the processing target to another piece of second frequency information 81, and the process proceeds to step S616.
[0193] On the other hand, if a negative determination (No) is made in step S621, the process proceeds to step S62 in FIG.
[0194] (First Modification) A first modified example of this embodiment will be described with reference to Figures 1, 17(a) and 17(b). The first modified example differs from the embodiment described above with reference to Figures 1 to 16 mainly in that, when performing reduction processing in layering processing, the reference block image 54 and the target block image 64 are increased by shifting the reduction start pixel. Below, the differences between the first modified example and the embodiment described above will be mainly described.
[0195] Fig. 17(a) is a diagram showing an example of a reduction start pixel PX[q] in the layering process according to Modification 1. Fig. 17(b) is a diagram showing an example of shifting the reduction start pixel PX[q] in the layering process according to Modification 1. "q" is an integer equal to or greater than 1.
[0196] 17(a) and 17(b) show an original image 120 as an example. The original image 120 is composed of a plurality of pixels PX. An example of reducing the original image 120 to 1 / 2 will be described. For example, the original image 120 is reduced by thinning processing. In this case, the original image 120 is reduced by performing nearest neighbor interpolation, bilinear interpolation, or bicubic interpolation. The original image 120 is the reference image 50 or the detection target image 60.
[0197] As shown in Figures 17(a) and 17(b), when reducing the reference image 50, the first layering unit 32 sets multiple reduction start pixels PX[q] from among the multiple pixels PX constituting the reference image 50, at which the reduction process starts at the same reduction rate, and calculates a reduced image 121[q] of the same layer hn for each reduction start pixel PX[q]. In this specification, "q" is an integer equal to or greater than 1. In the examples of Figures 17(a) and 17(b), two reduction start pixels PX[1] and PX[2] are set, but the number of reduction start pixels PX[q] is not particularly limited as long as it is two or more.
[0198] As shown in FIG. 17(a), the first layering unit 32 starts the reduction process from the reduction start pixel PX[1] and calculates a reduced image 121[1] as the reference layered image 50n.
[0199] The reduction start pixel PX[2] in Figure 17(b) is shifted by one pixel PX in both the X and Y coordinates relative to the reduction start pixel PX[1] in Figure 17(a). The number of shifted pixels is not particularly limited. Also, only the X coordinate may be shifted, or only the Y coordinate may be shifted.
[0200] As shown in FIG. 17(b), the first layering unit 32 starts the reduction process from the reduction start pixel PX[2] and calculates a reduced image 121[2] as the reference layered image 50n.
[0201] 17(a) and 17(b), when reducing the detection target image 60, the second layering unit 34 sets a plurality of reduction start pixels PX[q] from among the plurality of pixels PX constituting the detection target image 60, at which the reduction process starts at the same reduction rate, and calculates a reduced image 121[q] of the same layer hn for each reduction start pixel PX[q]. In the example of Figures 17(a) and 17(b), two reduction start pixels PX[1] and PX[2] are set, but the number of reduction start pixels PX[q] is not particularly limited as long as it is two or more.
[0202] As shown in FIG. 17(a), the second layering unit 34 starts the reduction process from the reduction start pixel PX[1] and calculates a reduced image 121[1] as the target layered image 60n.
[0203] As shown in FIG. 17(b), the second layering unit 34 starts the reduction process from the reduction start pixel PX[2] and calculates a reduced image 121[2] as the target layered image 60n.
[0204] As described above with reference to FIGS. 17(a) and 17(b), according to the first modified example, when the number of reduction start pixels PX[q] increases by Z times (Z is an integer equal to or greater than 2), the number of reference hierarchical images 50n increases by Z times, and the number of target hierarchical images 60n increases by Z times. Therefore, compared to when the number of reduction start pixels PX[q] is not increased, the first frequency information 71 and the second frequency information 81 can be calculated more precisely. As a result, the degree of match C# between the first frequency information 71 and the second frequency information 81 can be calculated more accurately. Therefore, the detection unit 37 can detect the target region from the detection target image 60 with higher accuracy.
[0205] Furthermore, when the number of reduction start pixels PX[q] increases by Z times, the number of first frequency information 71 increases by Z times, and the number of second frequency information 81 increases by Z times. Therefore, Z times more matching image areas 92 (FIGS. 4 and 5) are calculated. For example, when Z=2, in FIG. 5, the comparison unit 36 calculates two matching image areas 92 for each of the layers h1 to h3.
[0206] In this case, the comparison unit 36 uses two matching image areas 92 for each layer hn to calculate the expanded matching area 101. Specifically, when expanding the base matching image area 92, the comparison unit 36 uses the other matching image areas 92 for interpolation. This allows for more accurate calculation of the expanded matching area 101. As an interpolation method, for example, nearest neighbor interpolation, bilinear interpolation, or bicubic interpolation can be used.
[0207] According to the first modified example, the expanded matching score region 101 can be calculated based on Z times the matching score image region 92 in the same hierarchy hn. Therefore, the expanded matching score region 101 can be calculated with higher accuracy.
[0208] Furthermore, the number of reduction start pixels PX[q] in the layering of the reference image 50 and the number of reduction start pixels PX[q] in the layering of the detection target image 60 may be the same or different. For example, the number of reduction start pixels PX[q] in the layering of the detection target image 60 is set to be less than the number of reduction start pixels PX[q] in the layering of the reference image 50. As a result, the processing time by the processing unit 3 can be shortened.
[0209] (Second Modification) A second modified example of this embodiment will be described with reference to Figures 1, 18(a), and 18(b). The second modified example differs from the embodiment described above with reference to Figures 1 to 16 mainly in that, when performing frequency information calculation processing, the calculation start pixel is shifted to increase the first frequency information 71 and the second frequency information 81. Below, the differences between the second modified example and the embodiment described above will be mainly described.
[0210] Fig. 18(a) is a diagram showing an example of a calculation start pixel px[s] in the frequency information calculation process according to the second modified example. Fig. 18(b) is a diagram showing an example of shifting the calculation start pixel px[s] in the frequency information calculation process according to the second modified example. "s" is an integer equal to or greater than 1.
[0211] 18(a) and 18(b) show, as an example, an original image 120. The original image 120 is made up of a plurality of pixels PX.
[0212] 18(a), the original image 120 includes a block image 132. If the original image 120 is the reference layered image 50n, the block image 132 is the reference block image 54. If the original image 120 is the target layered image 60n, the block image 132 is the target block image 64.
[0213] 18(a), the first frequency information calculation unit 33 sets a calculation start pixel px[1] at which to start the calculation process of the first frequency information 71 for the reference block image 54. Then, the first frequency information calculation unit 33 executes the frequency information calculation process from the calculation start pixel px[1] to calculate the first frequency information 71.
[0214] 18(b), the first frequency information calculation unit 33 acquires a new reference block image 54a in which a pixel different from the calculation start pixel px[1] is set as a new calculation start pixel px[2]. The first frequency information calculation unit 33 executes a frequency information calculation process on the reference block image 54a to calculate first frequency information 71a.
[0215] 18(a), the second frequency information calculation unit 35 sets a calculation start pixel px[1] at which to start the calculation process of the second frequency information 81 for the target block image 64. Then, the second frequency information calculation unit 35 executes the frequency information calculation process from the calculation start pixel px[1] to calculate the second frequency information 81.
[0216] 18(b), the second frequency information calculation unit 35 obtains a new target block image 64a in which a pixel different from the calculation start pixel px[1] is set as a new calculation start pixel px[2]. A numerical information calculation process is executed to calculate second frequency information 81a.
[0217] Here, the calculation start pixel px[2] in Figure 18(b) is shifted by two pixels PX in both the X and Y coordinates relative to the calculation start pixel px[1] in Figure 18(a). The number of shifted pixels is not particularly limited. Also, only the X coordinate may be shifted, or only the Y coordinate may be shifted.
[0218] In addition, in the examples of Figures 18(a) and 18(b), one calculation start pixel px[2] is added to the calculation start pixel px[1], but the number of calculation start pixels px[s] to be added is not particularly limited.
[0219] As described above with reference to FIGS. 18(a) and 18(b), according to the second modification, when the number of calculation start pixels px[s] increases Z times (Z is an integer equal to or greater than 2), the number of pieces of first frequency information 71 increases Z times, and the number of pieces of second frequency information 81 increases Z times. Therefore, compared to when the number of calculation start pixels px[s] is not increased, the first frequency information 71 and the second frequency information 81 can be calculated more precisely. As a result, the degree of match C# between the first frequency information 71 and the second frequency information 81 can be calculated more accurately. Therefore, the detection unit 37 can detect the target region from the detection target image 60 with higher accuracy.
[0220] Also in the second modified example, as in the first modified example described with reference to FIGS. 17(a) and 17(b), a Z-fold matching degree image area 92 (FIGS. 4 and 5) is calculated. Therefore, according to the second modified example, the expanded matching degree area 101 can be calculated based on the Z-fold matching degree image area 92 in the same hierarchical layer hn. This allows the expanded matching degree area 101 to be calculated with higher accuracy. Note that in the second modified example, as in the first modified example, the comparison unit 36 calculates the expanded matching degree area 101 by interpolating based on the Z-fold matching degree image area 92.
[0221] Furthermore, the number of calculation start pixels px[s] when calculating the first frequency information 71 may be the same as or different from the number of calculation start pixels px[s] when calculating the second frequency information 81. For example, the number of calculation start pixels px[s] when calculating the second frequency information 81 is set to be smaller than the number of calculation start pixels px[s] when calculating the first frequency information 71. As a result, the processing time by the processing unit 3 can be shortened.
[0222] (Third Modification) A third modified example of this embodiment will be described with reference to Figures 1, 9, 12, 19, and 20. The third modified example differs from the embodiment described above with reference to Figures 1 to 16 mainly in that first frequency information 71 generated from a reference image 50 is integrated. Below, the differences between the third modified example and the embodiment described above will be mainly described.
[0223] An example of integrating the first frequency information 71 on the layer h2 in FIG. 9 will be described. When multiple pieces of first frequency information 71 exist on the same layer h2, the integrating unit 38 in FIG. 1 calculates the degree of coincidence between the multiple pieces of first frequency information 71. Then, based on the degree of coincidence between the multiple pieces of first frequency information 71, the integrating unit 38 integrates two or more pieces of first frequency information 71 from the multiple pieces of first frequency information 71 and sets the integrated pieces of first frequency information 71 as new first frequency information 71. As a result, according to the third modification, it is possible to reduce the number of pieces of first frequency information 71 in the reference image 50 that are to be compared with the second frequency information 81 in the detection target image 60. This makes it possible to speed up the process of calculating the feature coincidence C(k).
[0224] Specifically, for each hierarchical layer hn, the integrating unit 38 extracts a group of first frequency information 71 whose degree of coincidence is equal to or greater than a threshold value TH2 (hereinafter referred to as a "similar group"), and integrates two or more pieces of first frequency information 71 belonging to the similar group into one piece of first frequency information 71. In the similar group, the integrating unit 38 keeps only the first frequency information 71 after integration and deletes the other pieces of first frequency information 71.
[0225] In this case, for example, the integrating unit 38 calculates the average value of two or more first frequency elements (e.g., DCT coefficients) located at the same coordinates between two or more pieces of first frequency information 71 belonging to the similarity group. The integrating unit 38 sets the average value as the first frequency element of new first frequency information 71. If the size of the reference block image 54 is configured with U pixels by V pixels, the integrating unit 38 calculates the average value between two or more pieces of first frequency information 71 belonging to the similarity group for each of the (U×V) first frequency elements.
[0226] Alternatively, for example, the integration unit 38 selects one piece of first frequency information 71 from two or more pieces of first frequency information 71 belonging to a similar group, sets the selected piece of first frequency information 71 as new first frequency information 71, and deletes the other pieces of first frequency information 71.
[0227] Alternatively, for example, the integrating unit 38 obtains a median value of two or more first frequency elements (e.g., DCT coefficients) located at the same coordinates among two or more pieces of first frequency information 71 belonging to a similarity group. The integrating unit 38 sets the median value as the first frequency element of new first frequency information 71. If the size of the reference block image 54 is composed of U pixels by V pixels, the integrating unit 38 obtains a median value among two or more pieces of first frequency information 71 belonging to a similarity group for each of the (U×V) first frequency elements.
[0228] 9, on hierarchical layer h2, if the degree of coincidence between first frequency information 711 and first frequency information 712 among the first frequency information 711 to 714 is equal to or greater than a threshold value TH2, the integrating unit 38 integrates the first frequency information 711 and first frequency information 712 and sets them as one piece of first frequency information 71. Therefore, on hierarchical layer h2, four pieces of first frequency information 71 are reduced to three pieces of first frequency information 71.
[0229] Furthermore, the integration unit 38 calculates the degree of coincidence between the first frequency information 71 in the same manner as in the above-described formulas (1) to (3), for example.
[0230] Next, the integration process will be described with reference to Figures 1, 12, 19, and 20. As shown in Figures 1 and 12, in the third modified example, step S100 is executed between step S3 and step S4. Processing unit 3 executes a computer program stored in storage unit 5 to execute steps S1, S2, S3, S100, and S4 to S7.
[0231] In step S100, if there are multiple pieces of first frequency information 71 in the same layer hn, the integrating unit 38 integrates two or more pieces of first frequency information 71 based on the degree of coincidence.
[0232] Fig. 19 is a flowchart showing an example of integration processing according to Modification 3. That is, Fig. 19 is a flowchart showing step S100 in Fig. 12. As shown in Fig. 19, step S100 in Fig. 12 includes steps S101 to S104.
[0233] First, in step S101, the integration unit 38 calculates the degree of coincidence between the plurality of pieces of first frequency information 71 when the plurality of pieces of first frequency information 71 exist in the same layer hn.
[0234] Next, in step S102, the integration unit 38 integrates two or more pieces of first frequency information 71 from the plurality of pieces of first frequency information 71 based on the degree of similarity between the plurality of pieces of first frequency information 71, and sets the integrated pieces of first frequency information 71 as new first frequency information 71.
[0235] Next, in step S103, the integration unit 38 determines whether steps S101 and S102 have been completed for all layers hn having a plurality of pieces of first frequency information 71.
[0236] If a negative determination (No) is made in step S103, the process proceeds to step S104.
[0237] Next, in step S104, the integration unit 38 changes the hierarchy hn, and the process proceeds to step S101.
[0238] On the other hand, if an affirmative determination (Yes) is made in step S103, the process proceeds to step S4 in FIG.
[0239] Fig. 20 is a flowchart showing an example of step S101 in Fig. 19. As shown in Fig. 20, step S101 in Fig. 19 includes steps S1011 to S1019.
[0240] First, in step S1011, the integration unit 38 divides the first frequency information 71 into a plurality of first frequency regions A[k][i] according to the frequency characteristics (FIG. 9).
[0241] Next, in step S1012, the integration unit 38 calculates first feature quantities (At[k][i], St[k][i], Rt[k][i]) that indicate the features of the first frequency region A[k][i] (Figure 10).
[0242] Next, in step S1013, the integration unit 38 determines whether step S1012 has been completed for all of the first frequency regions A[k][i].
[0243] If a negative determination (No) is made in step S1013, the process proceeds to step S1012.
[0244] On the other hand, if an affirmative determination (Yes) is made in step S1013, the process proceeds to step S1015.
[0245] Next, in step S1015, the integration unit 38 determines whether or not there is other first frequency information 71 in the same layer hn.
[0246] If an affirmative determination (Yes) is made in step S1015, the process proceeds to step S1014.
[0247] Next, in step S1014, the integration unit 38 changes the processing target to another piece of first frequency information 71, and the process proceeds to step S1011.
[0248] On the other hand, if a negative determination (No) is made in step S1015, the process proceeds to step S1016.
[0249] Next, in step S1016, the integrating unit 38 compares the first feature amount of the first frequency information 71 of interest with the first feature amount of another first frequency information 71 to calculate the degree of feature agreement. In this case, for example, in the above-mentioned formulas (1) to (3), the integrating unit 38 replaces the second feature amounts (Ad[j][i], Sd[j][i], Rd[j][i]) of the second frequency information 81 with the first feature amounts (At[k][i], St[k][i], Rt[k][i]) of the first frequency information 71 of interest, compares the two first feature amounts, and calculates the degree of feature agreement.
[0250] Next, in step S1017, the integration unit 38 determines whether step S1016 has been completed for all combinations of two pieces of first frequency information 71.
[0251] If a negative determination (No) is made in step S1017, the process proceeds to step S1016.
[0252] On the other hand, if an affirmative determination (Yes) is made in step S1017, the process proceeds to step S1018.
[0253] Next, in step S1018, the integrating unit 38 calculates the degree of agreement between the plurality of first frequency information 71 based on the plurality of feature amount agreements. In this case, for example, when calculating the degree of agreement between three or more pieces of first frequency information 71, the integrating unit 38 calculates the degree of agreement between the three or more pieces of first frequency information 71 based on the plurality of feature amount agreements in the same way as when calculating the degree of agreement C# in Fig. 11 . Also, for example, the integrating unit 38 uses the feature amount agreement between the two pieces of first frequency information 71 as the degree of agreement between the two pieces of first frequency information 71.
[0254] Next, in step S1019, the integration unit 38 determines whether or not the calculation of the degree of coincidence has been completed for all combinations of the first frequency information 71 in the same layer hn.
[0255] If a negative determination (No) is made in step S1019, the process proceeds to step S1018.
[0256] On the other hand, if an affirmative determination (Yes) is made in step S1019, the process proceeds to step S102 in FIG.
[0257] The embodiments of the present invention have been described above with reference to the drawings. However, the present invention is not limited to the above embodiments and can be implemented in various forms without departing from the spirit of the present invention. Furthermore, the components disclosed in the above embodiments can be modified as appropriate. For example, some of the components shown in one embodiment may be added to the components of another embodiment, or some of the components shown in one embodiment may be deleted from the embodiment.
[0258] Furthermore, the drawings mainly show each component in a schematic manner to facilitate understanding of the invention, and the thickness, length, number, spacing, etc. of each component shown in the drawings may differ from the actual ones due to the convenience of creating the drawings. Furthermore, the configuration of each component shown in the above embodiment is merely an example and is not particularly limited, and it goes without saying that various modifications are possible within a range that does not substantially deviate from the effects of the present invention.
[0259] (1) In the embodiment described with reference to Figures 2(a) and 2(b), the parameter setting unit 31 includes a reduction ratio of "1" in the layering process, but the reduction ratio may be set to "less than 1" for all layers hn.
[0260] (2) In the embodiment described with reference to FIGS. 1 to 6, the enlarged matching degree area 101 is calculated uniformly for all hierarchical layers hn. However, the following processing may also be performed. First, the enlarged matching degree area 101 is calculated for a hierarchical layer hn with a small reduction ratio. Then, various calculations are performed on other hierarchical layers hn only for areas in the calculated enlarged matching degree area 101 that correspond to areas where the matching degree C# is equal to or greater than a threshold. As a result, the target area detection process can be speeded up. [Industrial Applicability]
[0261] The present invention relates to an area detection method, a computer program, and an area detection device, and has industrial applicability. [Explanation of symbols]
[0262] 1. Area detection device 31 Parameter setting section 32 1st layering section 33 First frequency information calculation unit 34 2nd layering section 35 Second frequency information calculation unit 36 Comparison section 37 Detector 38 Integration Department
Claims
1. A region detection method for detecting a target region corresponding to a reference image from a detection target image, comprising: a step of layering the reference image into N layers (N is an integer equal to or greater than 2) by processing the reference image at different reduction ratios to generate a plurality of reference layered images; calculating first frequency information from each of the plurality of reference layered images; a step of processing the detection target image at different reduction rates to layer it into the N layers, thereby generating a plurality of layered target images; calculating second frequency information from each of the plurality of target layered images; comparing the second frequency information of each of the plurality of target layered images with the first frequency information of each of the plurality of reference layered images; detecting the target area corresponding to the reference image from the detection target image based on the comparison result in the comparing step; A region detection method comprising:
2. The area detection method according to claim 1 , wherein the comparing step compares the second frequency information of the target layered image with the first frequency information of the reference layered image in the same layer.
3. The step of calculating the first frequency information includes: obtaining one or more reference block images from each of the plurality of reference layered images; calculating the first frequency information from each of the reference block images; Including, The step of calculating the second frequency information includes: acquiring one or more target block images having the same size as the reference block image from each of the plurality of target layered images; calculating the second frequency information from each of the target block images; The region detection method of claim 1 , comprising:
4. The step of comparing comprises: calculating a degree of coincidence between the second frequency information of the target block image and the first frequency information of the reference block image; a step of allocating the degree of coincidence to a pixel region having the same size as the target block image, and calculating a degree of coincidence image region composed of a plurality of the pixel regions for each layer; a step of calculating an expanded matching degree area for each layer by expanding the matching degree image area to the same size as the detection target image; calculating a composite match rate area by combining the expanded match rate areas obtained for each layer; Including, The area detection method according to claim 3 , wherein in the step of detecting the target area, the target area is detected from the detection target image based on the composite match degree area.
5. the comparing step includes a step of calculating a degree of coincidence between the second frequency information of the target block image and the first frequency information of the reference block image for each layer, The step of calculating the degree of match includes: Dividing each of the first frequency information into a plurality of first frequency regions according to frequency characteristics; calculating, for each of the plurality of first frequency regions, a first feature amount indicating a feature of the first frequency region; Dividing each of the second frequency information into a plurality of second frequency regions according to frequency characteristics; calculating, for each of the plurality of second frequency regions, a second feature amount indicating a feature of the second frequency region; comparing the first feature amount with the second feature amount and calculating a feature amount agreement degree indicating an agreement degree between the first feature amount and the second feature amount based on a comparison result; calculating the degree of coincidence between the second frequency information and the first frequency information for each of the second frequency information of the target block image based on a plurality of the feature amount coincidence degrees; The region detection method of claim 3 , comprising:
6. each of the first feature amount and the second feature amount includes DC component information and AC component information; 6. The area detection method according to claim 5, wherein in the step of calculating the feature agreement, the feature agreement is calculated based on a degree of agreement between the DC component information of the first feature and the DC component information of the second feature, and a degree of agreement between the AC component information of the first feature and the AC component information of the second feature.
7. When a plurality of pieces of first frequency information exist in the same layer, calculating a degree of coincidence between the plurality of pieces of first frequency information; integrating two or more pieces of first frequency information among the plurality of pieces of first frequency information based on the degree of coincidence between the plurality of pieces of first frequency information, and setting the integrated pieces of first frequency information as new first frequency information; The region detection method of claim 3 further comprising:
8. 4. The area detection method according to claim 3, further comprising a step of setting, based on a texture indicated by the reference image, the number of layers to be layered when the detection target image and the reference image are layered, a reduction rate for each layer when the detection target image and the reference image are layered, and sizes of the target block image and the reference block image.
9. the plurality of reference layered images include reduced images obtained by reducing the reference images, In the step of generating the reference layered image, when the reference image is reduced, a plurality of reduction start pixels are set from among a plurality of pixels constituting the reference image at which reduction processing starts at the same reduction rate, and the reduced image of the same layer is generated for each of the reduction start pixels; the plurality of target layered images include reduced images obtained by reducing the detection target image, 2. The area detection method according to claim 1, wherein, in the step of generating the target hierarchical image, when the detection target image is reduced, a plurality of reduction start pixels at which reduction processing starts at the same reduction rate are set from among a plurality of pixels constituting the detection target image, and the reduced image of the same layer is generated for each of the reduction start pixels.
10. In the step of acquiring the reference block image, a calculation start pixel at which a calculation process of the first frequency information is started is set for the reference block image, and a new reference block image is acquired in which a pixel different from the calculation start pixel is set as a new calculation start pixel; 4. The area detection method according to claim 3, wherein in the step of acquiring the target block image, a calculation start pixel at which the calculation process of the second frequency information is started is set for the target block image, and a new target block image is acquired in which a pixel different from the calculation start pixel is used as a new calculation start pixel.
11. A computer program for causing a computer to execute the area detection method according to any one of claims 1 to 10.
12. An area detection device that detects a target area corresponding to a reference image from a detection target image, a first layering unit that processes the reference image at different reduction ratios to layer the reference image into N layers (N is an integer equal to or greater than 2) and generates a plurality of reference layered images; a first frequency information calculation unit that calculates first frequency information from each of the plurality of reference layered images; a second layering unit that processes the detection target image at different reduction rates to layer the image into the N layers and generates a plurality of target layered images; a second frequency information calculation unit that calculates second frequency information from each of the plurality of target hierarchical images; a comparison unit that compares the second frequency information of each of the plurality of target layered images with the first frequency information of each of the plurality of reference layered images; a detection unit that detects the target area corresponding to the reference image from the detection target image based on a comparison result by the comparison unit; An area detection device comprising:
Citation Information
Patent Citations
Image processing device and image processing program
WO2008139825A1