WO2017056312A1 - 画像処理プログラムおよび画像処理装置 - Google Patents

画像処理プログラムおよび画像処理装置 Download PDF

Info

Publication number
WO2017056312A1
WO2017056312A1 PCT/JP2015/078027 JP2015078027W WO2017056312A1 WO 2017056312 A1 WO2017056312 A1 WO 2017056312A1 JP 2015078027 W JP2015078027 W JP 2015078027W WO 2017056312 A1 WO2017056312 A1 WO 2017056312A1
Authority
WO
WIPO (PCT)
Prior art keywords
image
luminance difference
value
feature
feature amount
Prior art date
Application number
PCT/JP2015/078027
Other languages
English (en)
French (fr)
Inventor
昌彦 杉村
正樹 石原
遠藤 進
武部 浩明
馬場 孝之
上原 祐介
Original Assignee
富士通株式会社
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 富士通株式会社 filed Critical 富士通株式会社
Priority to PCT/JP2015/078027 priority Critical patent/WO2017056312A1/ja
Priority to JP2017542656A priority patent/JP6465215B2/ja
Publication of WO2017056312A1 publication Critical patent/WO2017056312A1/ja
Priority to US15/704,787 priority patent/US10339418B2/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/40Extraction of image or video features
    • G06V10/50Extraction of image or video features by performing operations within image blocks; by using histograms, e.g. histogram of oriented gradients [HoG]; by summing image-intensity values; Projection analysis
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/74Image or video pattern matching; Proximity measures in feature spaces
    • G06V10/75Organisation of the matching processes, e.g. simultaneous or sequential comparisons of image or video features; Coarse-fine approaches, e.g. multi-scale approaches; using context analysis; Selection of dictionaries
    • G06V10/758Involving statistics of pixels or of feature values, e.g. histogram matching
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/40Extraction of image or video features
    • G06V10/46Descriptors for shape, contour or point-related descriptors, e.g. scale invariant feature transform [SIFT] or bags of words [BoW]; Salient regional features
    • G06V10/467Encoded features or binary features, e.g. local binary patterns [LBP]

Definitions

  • the present invention relates to an image processing program and an image processing apparatus.
  • image matching technology has been widely used in various fields.
  • the local feature amount at the feature point of the first image is compared with the local feature amount at the feature point of the second image, and the second image corresponding to the feature point of the first image is compared.
  • a technique for searching for feature points hereinafter referred to as “corresponding points”. By statistically processing the set of corresponding points found by the search, the presence of the first image and the position of the first image in the second image can be recognized.
  • BRIEF Binary Robust Independent Elementary Features
  • BRIEF is expressed by a local feature amount based on a luminance difference between pixels calculated for each of a plurality of pixel pairs set around a feature point. Specifically, a set of bit values corresponding to the sign (positive / negative) of the luminance difference is used as the local feature amount.
  • the method of expressing the local feature amount by the binary code has an advantage that the similarity between the feature points can be calculated by high-speed calculation based on the Hamming distance.
  • the method of calculating each bit of the binary code indicating the feature amount based on the sign of the luminance difference of the pixel pair has the following problems. For example, when a pixel pair exists in a flat area in the image such as a background area or a monochrome wall in the image, the luminance values between the pixels are close to each other, and the luminance difference is close to zero.
  • the sign of the luminance difference for a pixel pair in such a flat area is a subtlety of the light source status, noise, and the captured position even when the area is an area that captures the same position of the same object. Easy to reverse due to misalignment.
  • an object of the present invention is to provide an image processing program and an image processing apparatus capable of calculating a feature amount that is unlikely to cause erroneous determination of a similar feature region.
  • an image processing program that causes a computer to execute the following processing.
  • This process calculates a luminance difference between pixels included in each of the plurality of pixel pairs set in the feature region in the image, and has a bit corresponding to each of the plurality of pixel pairs based on the luminance difference. It includes a process for calculating a local feature amount for the region.
  • the calculation of the local feature amount includes one luminance difference calculated based on a pixel pair corresponding to one bit included in the local feature amount in the luminance difference, and a set range set with 0 interposed therebetween.
  • the value of one bit is determined as the first value, and when one luminance difference is smaller than the lower limit of the setting range, one When the bit value is determined as the second value and one luminance difference is included in the setting range, the value of the one bit is set to one of the first value and the second value determined in advance. Including the process of determining.
  • an image processing apparatus that performs the same processing as the processing based on the above-described image processing program is provided.
  • FIG. 1 is a diagram illustrating a configuration example and a processing example of an image processing apparatus according to a first embodiment. It is a figure which shows the hardware structural example of the image processing apparatus which concerns on 2nd Embodiment. It is a block diagram which shows the structural example of the processing function with which an image processing apparatus is provided. It is a figure which shows the structural example of a pixel pair management table. It is a figure which shows the example of the process which calculates a local feature-value. It is a figure which shows the structural example of a feature-value management table. It is a figure for demonstrating a voting process. It is a figure for demonstrating the determination process of the similar image based on a vote result.
  • FIG. 12 is a flowchart (part 1) illustrating a processing example of feature amount calculation by the image processing apparatus.
  • 10 is a flowchart (part 2) illustrating a processing example of feature amount calculation by the image processing apparatus. It is a figure which shows the structural example of the image processing system which concerns on 3rd Embodiment. It is a figure which shows the hardware structural example of a terminal device. It is a block diagram which shows the structural example of the processing function of a terminal device and a server apparatus.
  • FIG. 1 is a diagram illustrating a configuration example and a processing example of the image processing apparatus according to the first embodiment.
  • An image processing apparatus 1 illustrated in FIG. 1 includes a storage unit 1a and a calculation unit 1b.
  • the storage unit 1a is realized as a storage device such as a RAM (Random Access Memory) and an HDD (Hard Disk Drive), for example.
  • the computing unit 1b is realized as a processor, for example.
  • the storage unit 1a stores an image having a feature area. Usually, an image has a plurality of characteristic regions. In FIG. 1, as an example, the storage unit 1 a stores images 10 and 20. A plurality of pixel pairs are set in the feature region. For example, pixel pairs 21 a and 22 a are set in the feature region 11 a in the image 10, and pixel pairs 21 b and 22 b are set in the feature region 11 b in the image 10.
  • the position and number of a plurality of pixel pairs are common to each feature region.
  • the position of each pixel of the pixel pair 21a in the feature region 11a and the position of each pixel of the pixel pair 21b in the feature region 11b are the same.
  • the position of each pixel of the pixel pair 22a in the feature region 11a and the position of each pixel of the pixel pair 22b in the feature region 11b are the same.
  • the calculation unit 1b calculates feature information indicating the feature of the image stored in the storage unit 1a.
  • the feature information is a set of local feature amounts calculated for each feature region in the image.
  • the feature information is realized, for example, as table information that holds local feature amounts for each feature region.
  • the calculation unit 1 b calculates feature information 10 a about the image 10 and feature information 20 a about the image 20.
  • the feature information 10a includes at least a local feature amount 12a for the feature region 11a and a local feature amount 12b for the feature region 11b.
  • the feature information calculation processing includes luminance difference calculation processing (step S1) and local feature amount calculation processing (step S2).
  • luminance difference calculation process a luminance difference between pixels is calculated for each pixel pair included in the feature region in the image.
  • local feature amount calculation process a local feature amount for each feature region is calculated.
  • the local feature amount is represented as a bit string having bits respectively corresponding to a plurality of pixel pairs in the feature region.
  • the feature quantities that can be expressed as such a bit string include, for example, BRIEF, ORB (Oriented fast and Rotated BRIEF), BRISK (Binary Robust Invariant Scalable Keypoints), and the like.
  • the calculation unit 1b determines each bit value of the local feature amount based on a comparison between the luminance difference of the corresponding pixel pair and the setting range 30.
  • the setting range 30 is a range of luminance values, and is set with the luminance value “0” in between.
  • the setting range 30 is defined by the threshold value th, with -th as the lower limit and th as the upper limit.
  • the calculation unit 1b determines the bit value as 0 or 1 according to the following conditions.
  • the arithmetic unit 1b determines the bit value corresponding to this pixel pair as the first value (1 in the example of FIG. 1).
  • the arithmetic unit 1b determines the bit value corresponding to this pixel pair as the second value (0 in the example of FIG. 1).
  • the calculation unit 1 b selects a bit value corresponding to the pixel pair as one of the first value and the second value determined in advance (see FIG. In the example of 1, it is determined as 0).
  • the calculation unit 1b performs image recognition processing using the feature information 10a and 20a (step S3).
  • the image recognition processing includes at least processing for specifying a similar region similar to each feature region in the image 10 from the feature regions in the image 20.
  • the local feature amounts for each feature region are compared with each other, thereby calculating the similarity of each feature region.
  • the similarity of each feature region is performed, for example, by calculating a hamming distance between corresponding local feature amounts.
  • the calculation unit 1 b determines whether or not the image 20 includes a region similar to the image 10. Can be determined. Note that the above image recognition processing may be executed in a device different from the image processing device 1.
  • bit value of the local feature amount a method of determining based on the sign (positive / negative) of the luminance difference of the corresponding pixel pair is conceivable. For example, when the luminance difference is greater than 0, the bit value is 1, and when the luminance difference is 0 or less, the bit value is 0.
  • this method when the pixel pairs are arranged in a flat image area, the bit value is likely to change due to slight changes in the light source and noise conditions, which is the determination of similarity between feature areas. There is a problem of causing the accuracy to deteriorate.
  • the feature region 11a is a flat image region
  • the feature region 11b is a non-flat image region with high contrast.
  • the luminance value of the pixel pair included in the feature region 11a is close to zero.
  • the sign of the luminance difference easily changes from positive to negative or from negative to positive due to slight changes in the light source and noise.
  • the similarity is determined by comparing the local feature amounts calculated in this way, the calculated similarity may be lowered even if the corresponding feature regions are originally similar to each other. The determination of the similar region may be wrong.
  • the calculation unit 1b determines a bit value corresponding to the pixel pair as 0 or 1 in advance. One value is determined.
  • the bit value for a pixel pair whose luminance difference is close to 0 is fixed to either 0 or 1 for any pixel pair, and does not fluctuate due to changes in the light source or noise. Therefore, it is possible to calculate a local feature that is unlikely to cause erroneous determination of a similar region.
  • the luminance difference of the pixel pair 22b in the feature region 11b is not included in the setting range 30, and is estimated to be far from the luminance value “0”. In this case, even if the bit value corresponding to the pixel pair 22b is determined according to the sign of the luminance difference, there is no particular problem. In the example of FIG. 1, since the luminance difference is larger than the upper limit of the setting range 30, the corresponding bit value is determined as 1.
  • the luminance difference of the pixel pair 22a in the feature region 11a is included in the setting range 30 and is estimated to be close to the luminance value “0”.
  • the bit value corresponding to the pixel pair 22a is fixed to one value (0 in FIG. 1). Therefore, it is possible to calculate the local feature amount 12a that is unlikely to cause erroneous determination of a similar region.
  • a feature amount based on BRIEF is used as an image feature amount. For example, a luminance difference between pixel pairs set in the vicinity of a feature point such as ORB or BRISK is binarized. It can also be based on other types of binary feature values obtained in this way.
  • FIG. 2 is a diagram illustrating a hardware configuration example of the image processing apparatus according to the second embodiment.
  • the image processing apparatus 100 according to the second embodiment is realized as a computer as shown in FIG. 2, for example.
  • the entire image processing apparatus 100 is controlled by a processor 101.
  • the processor 101 may be a multiprocessor.
  • the processor 101 is, for example, a CPU (Central Processing Unit), an MPU (Micro Processing Unit), a DSP (Digital Signal Processor), an ASIC (Application Specific Integrated Circuit), or a PLD (Programmable Logic Device).
  • the processor 101 may be a combination of two or more elements among CPU, MPU, DSP, ASIC, and PLD.
  • a RAM 102 and a plurality of peripheral devices are connected to the processor 101 via a bus 108.
  • the RAM 102 is used as a main storage device of the image processing apparatus 100.
  • the RAM 102 temporarily stores at least part of an OS (Operating System) program and application programs to be executed by the processor 101.
  • the RAM 102 stores various data necessary for processing by the processor 101.
  • Peripheral devices connected to the bus 108 include an HDD 103, a graphic processing device 104, an input interface 105, a reading device 106, and a communication interface 107.
  • the HDD 103 is used as an auxiliary storage device of the image processing apparatus 100.
  • the HDD 103 stores an OS program, application programs, and various data.
  • As the auxiliary storage device other types of nonvolatile storage devices such as SSD (SolidSoState Drive) can be used.
  • the graphic processing device 104 is connected to a display device 104a.
  • the graphic processing device 104 displays an image on the display device 104a in accordance with an instruction from the processor 101.
  • Examples of the display device include a liquid crystal display and an organic EL (Electroluminescence) display.
  • the input device 105 a is connected to the input interface 105.
  • the input interface 105 transmits a signal output from the input device 105a to the processor 101.
  • Examples of the input device 105a include a keyboard and a pointing device.
  • Examples of pointing devices include a mouse, a touch panel, a tablet, a touch pad, and a trackball.
  • the portable recording medium 106a is detached from the reading device 106.
  • the reading device 106 reads the data recorded on the portable recording medium 106 a and transmits it to the processor 101.
  • Examples of the portable recording medium 106a include an optical disk, a magneto-optical disk, and a semiconductor memory.
  • the communication interface 107 transmits / receives data to / from other devices via the network 107a.
  • the processing functions of the image processing apparatus 100 can be realized.
  • the storage device (for example, the HDD 103) of the image processing apparatus 100 stores data of a plurality of captured images. These captured images are images captured by the imaging device. These captured image data may be stored in the storage device of the image processing apparatus 100 using, for example, the portable recording medium 106a, or stored in the storage device of the image processing apparatus 100 via the network 107a. May be.
  • the following processing is performed by executing photo management software.
  • a key image is selected from a plurality of captured images in the storage device by a user input operation.
  • the image processing apparatus 100 extracts a captured image of a scene similar to the key image from a captured image excluding the key image (hereinafter referred to as “target image”) among the plurality of captured images in the storage device.
  • target image a target image estimated to include the same target object as the target object included in the key image is extracted as a captured image of a scene similar to the key image.
  • the user can search for an image necessary as a material from the image processing apparatus 100, or can collect and automatically organize photos at the same event. Therefore, convenience and entertainment can be provided to the user.
  • Such an image processing apparatus 100 is realized as a terminal device operated by a user such as a personal computer or a smartphone. Further, the image processing apparatus 100 may be realized as a server apparatus on a network. In this case, the captured image data is uploaded from the user terminal device to the image processing apparatus 100 via the network, for example.
  • the image search function of the image processing apparatus 100 can be used for management of document content such as presentation materials in addition to management of captured images as described above.
  • data of a plurality of documents is stored in the storage device of the image processing apparatus 100, and a key document is selected from these.
  • the image processing apparatus 100 can extract a document including a sentence that looks similar to a key document when displaying the document from other documents, or the same image, table, graph, or the like as the key document. It is also possible to extract a document including “” from other documents. Thereby, the work time for searching for a document can be reduced. In addition, the reuse of past document assets is promoted, and the efficiency of operations can be improved.
  • the image search function of the image processing apparatus 100 can be used as an additional function of the medical image management system. For example, it can be used to automatically align affected areas on CT (Computed Tomography) images and MRI (Magnetic Resonance Imaging) images taken at a plurality of times, and to determine temporal changes in images of affected areas.
  • CT Computer Tomography
  • MRI Magnetic Resonance Imaging
  • FIG. 3 is a block diagram illustrating a configuration example of processing functions provided in the image processing apparatus.
  • the image processing apparatus 100 includes a storage unit 110, an image acquisition unit 121, a feature amount calculation unit 122, and an image recognition unit 123.
  • the storage unit 110 is implemented as a storage area of a storage device (for example, the RAM 102 or the HDD 103) included in the image processing apparatus 100.
  • the storage unit 110 stores image data 111, a pixel pair management table 112, and a feature amount management table 113.
  • the image data 111 indicates captured image data captured by the captured image.
  • a plurality of image data 111 are stored in the storage unit 110.
  • the pixel pair management table 112 the coordinates of pixel pairs used for calculating local feature amounts are registered.
  • the feature amount management table 113 is prepared for each captured image.
  • a feature amount (local feature amount) for each feature point in the captured image is registered.
  • the processing of the image acquisition unit 121, the feature amount calculation unit 122, and the image recognition unit 123 is realized, for example, by executing a predetermined program on the processor 101.
  • the image acquisition unit 121 acquires the image data 111 of the captured image and stores it in the storage unit 110.
  • the image acquisition unit 121 acquires the image data 111 of the captured image via the portable recording medium 106a or the network 107a.
  • the feature amount calculation unit 122 calculates a local feature amount for each feature point in the captured image while referring to the image data 111 and the pixel pair management table 112, and registers the calculated local feature amount in the feature amount management table 113. To do.
  • the image recognition unit 123 accepts a key image selection operation while referring to the feature amount management table 113, and searches for similar images similar to the key image from captured images other than the selected key image.
  • the feature amount calculation unit 122 sets feature points on the captured image.
  • the feature points are set in common for each captured image.
  • Dense Sampling that sets feature points at equal intervals (for example, 24 pixel intervals) on a captured image is used.
  • the feature-value calculation part 122 calculates the local feature-value about each feature point of each captured image.
  • BRIEF is calculated as a local feature amount for each fixed region (hereinafter referred to as “feature region”) centered on each feature point.
  • the feature region is, for example, a rectangular region of 48 pixels around the feature point.
  • a plurality of pixel pairs are set in advance in the feature region.
  • the local feature amount of a certain feature point is calculated as a bit string configured by combining codes based on the luminance difference of each pixel pair in the corresponding feature region.
  • FIG. 4 is a diagram showing a configuration example of the pixel pair management table.
  • the coordinates of each pixel constituting the pixel pair are registered in advance in the pixel pair management table 112.
  • an ID for identifying a pixel pair and the coordinates of the first pixel and the second pixel constituting the pixel pair are registered.
  • Pixel pairs are set at random, for example.
  • the pixel pair information registered in the pixel pair management table 112 is commonly applied to all feature regions.
  • FIG. 5 is a diagram illustrating an example of processing for calculating a local feature amount.
  • FIG. 5 shows an example of processing for registering the local feature amount of each feature point in the captured image 200 in the feature amount management table 113 corresponding to the captured image 200.
  • the local feature amount of the feature point 201 set in the captured image 200 is calculated as follows.
  • the feature amount calculation unit 122 calculates the luminance difference of each pixel pair for the feature region 202 corresponding to the feature point 201 (step S11).
  • the luminance difference of the pixel pair is obtained, for example, by subtracting the luminance value of the second pixel from the luminance value of the first pixel in the pixel pair management table 112.
  • the feature amount calculation unit 122 generates the bit string 203 by combining the bit values corresponding to the calculated sign of the luminance difference (step S12).
  • the feature amount calculation unit 122 determines bit values in the order of pixel pairs and adds them to the bit string. For example, when M pixel pairs are set, an M-bit bit string is generated.
  • the feature amount calculation unit 122 registers the generated bit string 203 in the feature amount management table 113 as a local feature amount of the feature point 201 (step S13).
  • bit value in the bit string 203 in step S12 for example, when the luminance difference is a positive value, the bit value is “1” (or “0”), and the luminance difference is 0 or less.
  • a method of setting the bit value to “0” (or “1”) is conceivable.
  • the bit value since the brightness difference is close to 0 in a flat area in the image, the bit value easily changes due to a subtle difference in the imaging conditions, which leads to deterioration in image recognition accuracy. is there. Therefore, in the present embodiment, local feature amounts that improve the image recognition accuracy by shifting the boundary of the luminance difference for determining whether the bit value is set to “0” or “1” from 0. Can be calculated. A method for determining the bit value will be described later in detail.
  • FIG. 6 is a diagram illustrating a configuration example of the feature amount management table.
  • the feature amount management table 113 shown in FIG. 6 is prepared for each captured image.
  • a record is registered in the feature amount management table 113 for each feature point in the captured image.
  • an ID indicates an identification number for identifying a feature point in the captured image.
  • the feature point coordinates indicate the coordinates of the feature points.
  • a bit string indicating the local feature amount of the feature point is registered.
  • the image recognition unit 123 selects a key image from the captured image in response to a user operation input. Then, the image recognition unit 123 compares the selected key image with another captured image (target image), and searches the target image for an image similar to the key image.
  • the image recognition unit 123 calculates the Hamming distance between the local feature amount of the feature point selected from the key image and the local feature amount of each feature point of the target image, and the Hamming distance among the feature points of the target image. Is extracted as a corresponding point having the highest similarity.
  • the image recognition unit 123 executes the following process for each feature point on the key image.
  • the image recognition unit 123 estimates the center position of the key image in the target image when the key image is superimposed on the target image so that the feature point on the key image matches the corresponding point on the target image.
  • the image recognition unit 123 votes for the pixel at the estimated center position among the pixels of the target image.
  • the image recognizing unit 123 determines a pixel having the maximum number of votes among the pixels of the target image, and determines that the target image is an image similar to the key image when the number of votes of the determined pixel exceeds a predetermined threshold. judge.
  • FIG. 7 is a diagram for explaining the voting process.
  • FIG. 7 shows an example of processing for searching for corresponding points of the target image 220 similar to the feature points 211 of the key image 210.
  • the image recognition unit 123 searches for a corresponding point by calculating the Hamming distance between the local feature amount of the feature point 211 of the key image 210 and the local feature amount of each feature point of the target image 220 (step S21). ).
  • the image recognition unit 123 causes the center position 212 of the key image 210 in the target image 220 when the key image 210 is superimposed on the target image 220 so that the feature point 211 and the feature point 221 (corresponding point) match. Is estimated (step S22).
  • the number of pixels of the horizontal width and height of the target image is wi and hi, respectively, and the number of pixels of the horizontal width and height of the key image are wr and hr, respectively. If the feature point (xi, yi) of the target image is searched as the corresponding point of the target image corresponding to the feature point (xr, yr) of the key image, the position (xv, yv) of the center point of the key image in the target image Is calculated using the following equations (1-1) and (1-2).
  • pixel 222 is estimated as the center position of the key image 210 in the target image 220 based on the correspondence relationship between the feature point 211 and the feature point 221 in FIG. Vote for pixel 222.
  • a voting map 114 having an entry corresponding to each pixel of the target image 220 is used. The initial value of each entry in the voting map 114 is 0. In the process of FIG. 7, 1 is added to the entry corresponding to the pixel 222 in the voting map 114 (step S23).
  • the image recognition unit 123 may vote for each pixel included in a predetermined area (for example, a rectangular area of 10 pixels on all sides) centered on the pixel 222, for example. This makes it possible to perform recognition processing that is robust to some extent against the difference between the key image 210 and the target image 220.
  • a predetermined area for example, a rectangular area of 10 pixels on all sides
  • FIG. 8 is a diagram for explaining similar image determination processing based on voting results.
  • the voting map 114a shown in FIG. 8 shows the state of the voting map 114 after the process shown in FIG. 7 is executed for each feature point of the key image 210.
  • the image recognition unit 123 extracts the maximum value from the number of votes for each pixel in the voting map 114a, and determines whether this maximum value exceeds a predetermined threshold.
  • the positional relationship between the feature points of the key image 210 and the corresponding points of the target image 220 may be the same between the feature points of the key image. Many. In this case, the number of votes concentrates on entries corresponding to the same pixel in the vote map 114a. On the other hand, when the relevance between the key image 210 and the target image 220 is low, the positional relationship between the feature points of the key image 210 and the corresponding points of the target image 220 often differs between the feature points of the key image 210. In this case, the number of votes is distributed in the vote map 114a.
  • the image recognition unit 123 determines that the target image 220 is an image similar to the key image 210 when the maximum value of the number of votes exceeds the threshold value.
  • FIG. 9 is a diagram illustrating an example of searching for corresponding points.
  • the same building 250 is shown, but the way of reflecting the position and direction of the building 250 is different.
  • the feature region 231 of the image 230 and the feature region 241 of the image 240 show a portion of the outer surface of the building 250 where a window exists.
  • the feature region 232 of the image 230 and the feature region 242 of the image 240 a boundary portion between the flat wall surface in the building 250 and the sky as the background is shown.
  • the feature regions 232 and 242 are flat image regions in which the area occupied by the flat portion is wider than the feature regions 231 and 241.
  • the feature region 231 and the feature region 241 have high similarity, and the feature region 241 is a correct corresponding region to the feature region 231. Further, it is assumed that the feature region 232 and the feature region 242 have a high degree of similarity, and the feature region 242 is a correct corresponding region for the feature region 232.
  • the feature regions 231 and 241 include many pixel pairs having a large luminance difference. In this case, the possibility that the sign of the luminance difference of the pixel pair changes due to the state of the light source and noise is low. For this reason, when the bit value of the local feature amount is determined according to the sign of the luminance difference of the pixel pair, the bit value corresponding to the pixel pair is stably determined to be 0 or 1 even if the shooting condition changes. There is a high possibility of being. As a result, there is a high possibility that the feature region 241 is correctly recognized as a corresponding region similar to the feature region 231.
  • the characteristic regions 232 and 242 are flat, these regions include many pixel pairs in which the luminance difference between the pixels is close to zero.
  • the sign of the luminance difference of the pixel pair is likely to change due to slight differences in the light source state and noise.
  • the bit value corresponding to the pixel pair is likely to change due to slight differences in shooting conditions, and the calculated value of the local feature amount Becomes unstable.
  • the feature region 242 is not correctly recognized as a corresponding region similar to the feature region 232, and the image recognition accuracy decreases.
  • FIG. 10 is a diagram illustrating an example of a pixel pair in the feature region.
  • FIG. 10 shows an example of a pixel pair setting pattern in the feature region 232 of the image 230 and the feature region 242 of the image 240 shown in FIG.
  • the shaded portions indicate the wall surfaces of the building 250 in FIG. 9, and the other portions indicate the background (sky). It is assumed that the luminance of the background is higher than the luminance of the wall surface of the building 230, and there is a large difference between them.
  • pixel P1 is set as the background and pixel P2 is set as the wall surface.
  • the difference between the luminance value p1 of the pixel P1 and the luminance value p2 of the pixel P2 is always positive.
  • the bit value is determined to be “1” when the sign of the luminance difference is positive, there is a high possibility that the bit value remains “1” and does not change. Therefore, a stable numerical value is calculated as the binary feature amount.
  • both the pixels P1 and P2 are set as the background.
  • the difference between the luminance value p1 of the pixel P1 and the luminance value p2 of the pixel P2 is close to zero.
  • the sign of the luminance difference (p1-p2) is likely to change when the light source or the noise state changes due to a difference in the shooting situation. Therefore, in the method of determining the bit value to “1” when the sign of the luminance difference is positive, the bit values of the pixels P1 and P2 may be 0 or 1, and as a result, the binary feature amount The calculated value becomes unstable.
  • both the pixels P1 and P2 are set on the wall surface. Also in this case, the difference between the luminance value p1 of the pixel P1 and the luminance value p2 of the pixel P2 is close to zero. Therefore, similarly to the setting pattern 2, the calculated value of the binary feature amount becomes unstable.
  • the sign of the luminance difference is set as in the setting patterns 2 and 3 from the pixel pair in which the luminance difference is stably positive or negative as in the setting pattern 1.
  • the number of pixel pairs that change easily increases. For this reason, the binary feature amount calculated from such a feature region is easily changed and unstable with respect to a difference in photographing conditions, and this causes deterioration in image recognition accuracy by the image recognition unit 123.
  • FIG. 11 is a diagram illustrating an example of a luminance difference histogram of a pixel pair.
  • FIG. 11 shows a luminance difference distribution of pixel pairs calculated from a large number of captured images.
  • the luminance difference distribution tends to be concentrated in the vicinity of zero.
  • a binary feature value is calculated from an image, a large number of pixel pairs having a luminance difference close to 0 tend to appear. For this reason, the influence on the accuracy degradation of the image recognition processing is great.
  • the feature amount calculation unit 122 shifts the boundary (threshold value) of the luminance difference for determining whether the bit value is “0” or “1” from zero. This makes it difficult for the bit value of the pixel pair whose luminance difference is close to 0 to change from either “0” or “1” with respect to changes in the shooting situation.
  • FIG. 12 is a diagram illustrating a setting example of a threshold value for determining a bit value.
  • the bit value determination method 1 is a comparative example, and is a method of setting the bit value to “1” when the luminance difference is greater than 0 and setting the bit value to “0” when the luminance difference is 0 or less. .
  • the bit value determination method 2 is a method adopted in the present embodiment.
  • a threshold value d that is larger than 0 and smaller than the maximum luminance value (255 in FIG. 12) is set.
  • the feature amount calculation unit 122 sets the bit value to “1” when the luminance difference is larger than the threshold value d, and sets the bit value to “0” when the luminance difference is equal to or less than the threshold value d.
  • the bit value of a pixel pair that has a high possibility of being set in a flat area in the image with a luminance difference close to 0 is fixed to “0”.
  • the bit values for the pixel pairs in the flat area stably take the same value.
  • the search accuracy between similar feature points is improved, and the image recognition accuracy is improved accordingly.
  • the feature amount calculation unit 122 sets the bit value to “1” when the luminance difference is ⁇ d or more, and sets the bit value to “0” when the luminance difference is less than ⁇ d. It may be. Further, the feature value calculation unit 122 may set the bit value to “1” instead of “0” when the luminance difference is included in the range R between ⁇ d and d.
  • the feature amount calculation unit 122 fixes the bit value to “1” or “0” and the luminance difference is included in the range R when the luminance difference is included in the range R of ⁇ d to d. If not, the bit value is determined using the bit value determination method 1.
  • a fixed value may be set in advance as the threshold value d.
  • the threshold value d may be dynamically set based on statistical information regarding the luminance difference of each pixel pair obtained from the captured image.
  • FIG. 13 is a diagram illustrating an example in which the threshold value is dynamically set.
  • FIG. 13 shows an example in which the threshold value d is set based on the histogram of the luminance difference shown in FIG.
  • the feature amount calculation unit 122 extracts a range around a luminance difference of 0 including a certain percentage (for example, 50%) of pixel pairs from a luminance difference histogram.
  • the feature amount calculation unit 122 sets the luminance value of the boundary on the positive side of the extracted range as the threshold value d. That is, the threshold value d is set so that the width of the extracted range is 2d.
  • the threshold value d can be appropriately set according to the situation of the captured image that is the target of image recognition.
  • the feature amount calculation unit 122 sets a predetermined frequency threshold value in the histogram of FIG. 13, and the frequency center (number of pixel pairs) is greater than or equal to the frequency threshold value.
  • the threshold value d may be set in the same manner as described above based on the extracted range.
  • the captured image (sample image) to be used for calculating the luminance difference registered in the histogram may be all the image data 111 stored in the storage unit 110, or may be a part of them. Good. Further, the sample image may be an image prepared exclusively for the image data 111 stored in the storage unit 110.
  • the method of setting the threshold value d based on the statistical information regarding the luminance difference as described above may be used for initial setting of the threshold value d.
  • the threshold value d is once set, for example, even when a captured image is added, the feature amount is calculated from the captured image using the initially set threshold value d.
  • the threshold value d may be recalculated using the updated captured image at regular intervals.
  • the feature amount calculation unit 122 sets a plurality of feature points on each captured image. For example, Dense Sampling is used in which feature points are set on a captured image at regular intervals (for example, 24 pixel intervals).
  • the feature amount calculation unit 122 creates a record for each set feature point in the feature amount management table 113 corresponding to each captured image, and registers an ID and feature point coordinates in each created record.
  • Step S52 The feature amount calculation unit 122 selects one captured image.
  • Step S53 The feature amount calculation unit 122 selects one feature point from the captured image selected in step S52.
  • the feature amount calculator 122 selects one pixel pair from the pixel pair management table 112.
  • the feature amount calculation unit 122 selects two pixels corresponding to the pixel pair selected in step S54 from the feature region in a certain range centered on the feature point selected in step S53, and selects each selected pixel. Calculate the luminance difference between. The luminance difference is calculated by subtracting the luminance value of the second pixel from the luminance value of the first pixel among the pixels constituting the pixel pair.
  • Step S56 The feature amount calculation unit 122 determines whether all pixel pairs registered in the pixel pair management table 112 have been processed. If there is a pixel pair that has not been processed, the process returns to step S54, and another pixel pair is selected. On the other hand, if all the pixel pairs have been processed, the process of step S57 is executed.
  • Step S57 The feature amount calculation unit 122 determines whether all feature points included in the captured image selected in step S52 have been processed. If there is a feature point that has not been processed, the process returns to step S53, and another feature point is selected. On the other hand, if all feature points have been processed, the process of step S58 is executed.
  • Step S58 The feature amount calculation unit 122 determines whether all captured images have been processed. If there is a captured image that has not been processed, the process returns to step S52, and another captured image is selected. On the other hand, if all captured images have been processed, the process of step S59 is executed.
  • the feature amount calculation unit 122 creates a histogram indicating the frequency of the luminance difference using all the luminance differences calculated in step S55.
  • the feature amount calculation unit 122 determines the threshold value d based on the created histogram. For example, the feature amount calculation unit 122 extracts a range around a luminance difference of 0 including a certain percentage (for example, 50%) of pixel pairs from the histogram, and calculates the luminance value at the positive boundary of the extracted range.
  • the threshold value is d.
  • a histogram may be created using only the luminance difference calculated from a part of the captured images instead of the luminance difference calculated from all the captured images.
  • a histogram may be created using only the luminance difference calculated from a partial region in the image.
  • a histogram may be created using only the luminance difference calculated from some feature regions in the image.
  • Step S61 The feature amount calculation unit 122 selects one captured image.
  • Step S62 The feature amount calculator 122 selects one feature point from the captured image selected in step S61.
  • the feature amount calculation unit 122 selects one pixel pair from the pixel pair management table 112.
  • the feature amount calculation unit 122 determines a bit value corresponding to the pixel pair based on the comparison between the luminance difference calculated for the pixel pair selected in Step S63 and the threshold value d. For example, the feature amount calculation unit 122 sets the bit value to “1” when the luminance difference is larger than the threshold d, and sets the bit value to “0” when the luminance difference is equal to or smaller than the threshold d.
  • Step S65 The feature quantity calculation unit 122 adds the bit value calculated in step S64 to the lower order of the bit string indicating the local feature quantity for the feature point selected in step S62.
  • Step S66 The feature amount calculation unit 122 determines whether all pixel pairs registered in the pixel pair management table 112 have been processed. If there is a pixel pair that has not been processed, the process returns to step S63, and another pixel pair is selected. On the other hand, if all the pixel pairs have been processed, the process of step S67 is executed.
  • Step S67 The feature quantity calculation unit 122 registers the bit string created in step S65 in the corresponding record in the feature quantity management table 113 as the local feature quantity for the feature point selected in step S62.
  • Step S68 The feature amount calculation unit 122 determines whether all feature points included in the captured image selected in step S61 have been processed. If there is a feature point that has not been processed, the process returns to step S62, and another feature point is selected. On the other hand, if all the feature points have been processed, the process of step S69 is executed.
  • Step S69 The feature amount calculation unit 122 determines whether all captured images have been processed. If there is a captured image that has not been processed, the process returns to step S61, and another captured image is selected. On the other hand, if all the captured images have been processed, the feature amount calculation process ends.
  • the local feature amount for each feature point is registered in the feature amount management table 113 corresponding to each captured image.
  • the threshold value d may be a predetermined value.
  • the feature amount calculation unit 122 determines the corresponding bit value when step S55 of FIG. 14 is executed, and determines the local feature of the corresponding feature point when it determines “Yes” in step S56.
  • the amount may be registered in the feature amount management table 113. By doing so, the process after step S59 becomes unnecessary.
  • FIG. 16 is a flowchart illustrating an example of image recognition processing.
  • the image recognition unit 123 selects a key image from the captured image in response to a user operation input.
  • the image recognition unit 123 selects one of the captured images (target images) other than the key image. [Step S83] The image recognition unit 123 selects one feature point of the key image.
  • Step S84 The image recognition unit 123 searches for feature points (corresponding points) similar to the feature points selected from the key image in Step S83 from the target image selected in Step S82. In this process, the image recognition unit 123 calculates the Hamming distance between the local feature amount of the feature point selected from the key image and the local feature amount of each feature point of the target image, and the Hamming distance among the feature points of the target image. Is extracted as a corresponding point having the highest similarity.
  • Step S85 The image recognition unit 123 centers the key image in the target image when the key image is overlaid on the target image so that the feature point selected in Step S83 matches the corresponding point searched in Step S84. Estimate the position.
  • the image recognition unit 123 votes for the pixel at the estimated center position among the pixels of the target image. In practice, for example, the image recognition unit 123 may vote for each pixel included in a predetermined area (for example, a rectangular area of 10 pixels square) centered on the estimated center position.
  • Step S86 The image recognition unit 123 determines whether all feature points of the key image have been processed. If there is a feature point that has not been processed, the process returns to step S83, and another feature point is selected. On the other hand, if all feature points have been processed, the process of step S87 is executed.
  • Step S87 If the maximum number of votes for each pixel of the target image selected in Step S82 exceeds a predetermined threshold, the image recognition unit 123 determines that the target image is an image similar to the key image. . In this case, for example, the image recognition unit 123 outputs the identification information of the target image determined to be similar to the key image. On the other hand, if the maximum number of votes is equal to or less than the threshold, the image recognition unit 123 determines that the target image is an image that is not similar to the key image.
  • step S87 the image recognition unit 123 may output the identification information of all target images whose maximum number of votes exceeds a predetermined threshold in order of the number of votes.
  • Step S88 The image recognition unit 123 determines whether all target images have been processed. If there is a target image that has not been processed, the process returns to step S82, and another target image is selected. On the other hand, when all the target images have been processed, the image recognition unit 123 outputs the identification information of the target image determined to be similar to the key image in step S87, and ends the image recognition process.
  • the feature amount calculated by the processing of FIGS. 14 and 15 is used, so that the search accuracy of the corresponding points in step S84 is improved. As a result, the determination accuracy in step S87 is improved.
  • a general image occupies a large proportion of a flat region, and among pixel pairs for calculating local feature amounts set in such an image, a luminance difference is close to zero. Many are included. 14 and 15, the bit value of the local feature amount is stably determined to be 0 for the pixel pair having a small luminance difference. For this reason, in the image recognition using the general image which occupies the flat area widely, the effect of improving the recognition accuracy is great.
  • the storage unit 110 stores a pixel pair management table shown in FIG. 17 instead of the pixel pair management table 112 shown in FIGS.
  • FIG. 17 is a diagram illustrating a configuration example of a pixel pair management table.
  • an item of threshold value d is further added to the pixel pair management table 112 shown in FIG. Thereby, the pixel pair management table 112 can hold
  • FIG. 18 and FIG. 19 are flowcharts illustrating an example of feature amount calculation processing by the image processing apparatus.
  • the feature quantity calculation unit 122 sets a plurality of feature points on each captured image in the same procedure as in step S51 of FIG.
  • the feature amount calculation unit 122 creates a record for each set feature point in the feature amount management table 113 corresponding to each captured image, and registers an ID and feature point coordinates in each created record.
  • Step S102 The feature amount calculation unit 122 selects one pixel pair from the pixel pair management table 112.
  • Step S103 The feature amount calculation unit 122 selects one captured image.
  • the feature amount calculation unit 122 selects one feature point from the captured image selected in step S103.
  • the feature amount calculation unit 122 selects two pixels corresponding to the pixel pair selected in step S102 from a predetermined range of feature regions centered on the feature point selected in step S104, and selects each selected pixel. Calculate the luminance difference between. The luminance difference is calculated by subtracting the luminance value of the second pixel from the luminance value of the first pixel among the pixels constituting the pixel pair.
  • Step S106 The feature amount calculation unit 122 determines whether all feature points included in the captured image selected in step S103 have been processed. If there is a feature point that has not been processed, the process returns to step S104, and another feature point is selected. On the other hand, if all feature points have been processed, the process of step S107 is executed.
  • Step S107 The feature amount calculation unit 122 determines whether all captured images have been processed. If there is a captured image that has not been processed, the process returns to step S103, and another captured image is selected. On the other hand, if all captured images have been processed, the process of step S108 is executed.
  • the feature amount calculation unit 122 creates a histogram indicating the frequency of the luminance difference using each luminance difference calculated in step S105 for the pixel pair selected in step S102.
  • the feature amount calculation unit 122 determines a threshold value d corresponding to the selected pixel pair based on the created histogram. For example, the feature amount calculation unit 122 extracts a range around a luminance difference of 0 including a certain percentage (for example, 50%) of pixel pairs from the histogram, and calculates the luminance value at the positive boundary of the extracted range.
  • the threshold value is d.
  • Step S109 The feature amount calculation unit 122 determines whether the threshold d determined in step S108 is greater than a predetermined determination threshold dt.
  • the determination threshold value dt is set to a value greater than 0 and less than the maximum luminance value (for example, 255).
  • the process of step S110 is executed.
  • the threshold value d is equal to or smaller than the determination threshold value dt
  • the feature amount calculation unit 122 registers the threshold value d determined in step S108 in the item of the threshold value d of the record of the corresponding pixel pair in the pixel pair management table 112. Thereafter, the process of step S111 is executed.
  • Step S110 The feature amount calculation unit 122 changes the threshold value d determined in step S108 to 0.
  • the feature amount calculation unit 122 registers the changed threshold value d in the item of the threshold value d of the record of the corresponding pixel pair in the pixel pair management table 112a.
  • the threshold value d is larger than the determination threshold value dt (when “Yes” is determined in step S109), the pixel pairs are not concentrated near the luminance value 0 of the histogram. In this case, it is estimated that there is a low possibility that the luminance value of the pixel pair is close to zero. Therefore, by setting the threshold d to 0, the sign of the luminance value is determined for the bit value of the corresponding pixel pair as in the bit value determination method 1 in FIG. Thereby, the calculation load at the time of determining the bit value of the corresponding pixel pair can be reduced.
  • Step S111 The feature amount calculation unit 122 determines whether all pixel pairs registered in the pixel pair management table 112 have been processed. If there is a pixel pair that has not been processed, the process returns to step S102, and another pixel pair is selected. On the other hand, when all the pixel pairs have been processed, the process of FIG. 19 is executed.
  • steps S64 and S65 are replaced with steps S64a, S64b, and S65a in the process of FIG.
  • steps S64a, S64b, and S65a will be described, and the description of the processes of other steps that are the same as those in FIG. 15 will be omitted.
  • Step S64a The feature amount calculation unit 122 reads the threshold value d corresponding to the pixel pair selected in step S63 from the pixel pair management table 112a.
  • Step S64b The feature amount calculation unit 122 determines a bit value corresponding to the pixel pair based on the comparison between the luminance difference calculated for the pixel pair selected in Step S63 and the threshold value d read in Step S64a. To do. For example, the feature amount calculation unit 122 sets the bit value to “1” when the luminance difference is larger than the threshold d, and sets the bit value to “0” when the luminance difference is equal to or smaller than the threshold d.
  • Step S65a The feature quantity calculation unit 122 adds the bit value calculated in step S64b to the lower order of the bit string indicating the local feature quantity for the feature point selected in step S62.
  • the following effects can be obtained.
  • the positions of the first pixel and the second pixel included in the pixel pair and the positional relationship between the pixels are different for each pixel pair.
  • the optimum threshold value d for determining the bit value may be different for each pixel pair.
  • the luminance differences are totaled for the same pixel pairs in each of the plurality of feature regions, and the threshold value d is calculated for each pixel pair based on the statistical information of the luminance differences.
  • the threshold value d is optimized, and a phenomenon in which the local feature amount in a flat image region fluctuates due to a slight difference in photographing conditions is less likely to occur.
  • the accuracy of similarity determination between feature points is improved, and the final image recognition accuracy is also improved.
  • FIG. 20 is a diagram illustrating a configuration example of an image processing system according to the third embodiment.
  • the image processing system illustrated in FIG. 20 includes a terminal device 300 and a server device 400.
  • the terminal device 300 is, for example, a mobile phone, a smartphone, a digital camera, a personal computer, or the like.
  • the terminal device 300 can access the server device 400 via a network.
  • the terminal device 300 has an image capturing function and can calculate a feature amount of a captured image. Then, the terminal device 300 adds a feature amount to the captured image and transmits it to the server device 400.
  • the server device 400 stores the captured image transmitted from the terminal device 300.
  • the server device 400 has a function of performing image recognition using the feature amount received together with the captured image and determining a pair of captured images that are similar among the stored captured images.
  • the above-described image processing system can be applied to, for example, a photo management service in which the server device 400 manages a captured image captured by the user using the terminal device 300.
  • the server apparatus 400 not only simply accumulates the captured images, but also provides an additional service such as tagging the captured images in which the same object is captured by searching for similar captured images. it can.
  • FIG. 21 is a diagram illustrating a hardware configuration example of the terminal device.
  • the entire terminal device 300 is controlled by the processor 301.
  • the processor 301 may be a multiprocessor.
  • the processor 301 is, for example, a CPU, MPU, DSP, ASIC, or PLD. Further, the processor 301 may be a combination of two or more elements among CPU, MPU, DSP, ASIC, and PLD.
  • a RAM 302 and a plurality of peripheral devices are connected to the processor 301 via a bus 309.
  • the RAM 302 is used as a main storage device of the terminal device 300.
  • the RAM 302 temporarily stores at least part of an OS program and application programs to be executed by the processor 301.
  • the RAM 302 stores various data necessary for processing by the processor 301.
  • Peripheral devices connected to the bus 309 include a flash memory 303, a camera 304, a display device 305, an input device 306, a reading device 307, and a communication interface 308.
  • the flash memory 303 is used as an auxiliary storage device of the terminal device 300.
  • the flash memory 303 stores an OS program, application programs, and various data.
  • As the auxiliary storage device other types of nonvolatile storage devices such as HDDs can be used.
  • the display device 305 displays an image according to a command from the processor 301.
  • Examples of the display device 305 include a liquid crystal display and an organic EL display.
  • the input device 306 transmits a signal corresponding to the input operation by the user to the processor 301.
  • Examples of the input device 306 include a keyboard and a pointing device.
  • Examples of pointing devices include a mouse, a touch panel, a tablet, a touch pad, and a trackball.
  • the portable recording medium 307a is detached from the reading device 307.
  • the reading device 307 reads data recorded on the portable recording medium 307 a and transmits the data to the processor 301.
  • Examples of the portable recording medium 307a include an optical disk, a magneto-optical disk, and a semiconductor memory.
  • the communication interface 308 transmits and receives data to and from other devices (for example, the server device 400) via the network.
  • the server apparatus 400 is realized as a computer having a hardware configuration similar to that of the image processing apparatus 100 illustrated in FIG. 2, for example.
  • FIG. 22 is a block diagram illustrating a configuration example of processing functions of the terminal device and the server device.
  • the same components as those in FIG. 3 are denoted by the same reference numerals, and description thereof is omitted.
  • the terminal device 300 includes a storage unit 310, an image capturing unit 321, a feature amount calculation unit 322, and a transmission unit 323.
  • the storage unit 310 is implemented as a storage area of a storage device (for example, the RAM 302 or the flash memory 303) included in the terminal device 300.
  • the storage unit 310 stores image data 111, a pixel pair management table 112, and a feature amount management table 113 similar to those in FIG.
  • the image data 111 is captured image data captured by the image capturing unit 321.
  • the processing of the image capturing unit 321, the feature amount calculation unit 322, and the transmission unit 323 is realized, for example, by executing a predetermined program on the processor 301.
  • the image capturing unit 321 captures an image by controlling the camera 304.
  • the image capturing unit 321 stores image data 111 regarding the captured image in the storage unit 310.
  • the feature amount calculation unit 322 executes the same processing as the feature amount calculation unit 122 in FIG. That is, the feature amount calculation unit 322 calculates a local feature amount for each feature point in the captured image while referring to the image data 111 and the pixel pair management table 112, and uses the calculated local feature amount as the feature amount management table 113. Register with. Note that the feature amount calculation unit 322 may calculate the local feature amount by the processing procedure according to the modification described with reference to FIGS.
  • the transmission unit 323 transmits each image data 111 stored in the storage unit 310 to the server device 400 together with corresponding feature amount information recorded in the feature amount management table 113.
  • the server device 400 includes a storage unit 410, a reception unit 421, and an image recognition unit 422.
  • the storage unit 410 is implemented as a storage area of a storage device included in the server device 400.
  • the storage unit 410 stores the image data 111 received from the terminal device 300 and the feature amount information corresponding thereto.
  • the method of storing the received feature value information is not particularly limited, but the received feature value information is managed in the same format as the feature value management table 113 of the terminal device 300 as an example in FIG.
  • the processes of the reception unit 421 and the image recognition unit 422 are realized, for example, by executing a predetermined program on the processor of the server device 400.
  • the receiving unit 421 receives the image data 111 transmitted from the terminal device 300 together with the feature amount information.
  • the receiving unit 421 stores the received image data 111 in the storage unit 410 and registers the received feature amount information in the feature amount management table 113 of the storage unit 410.
  • the image recognition unit 422 executes the same processing as the image recognition unit 123 in FIG. That is, the image recognition unit 422 searches for a similar image similar to the key image from the captured images other than the selected key image while referring to the feature amount management table 113.
  • the key image may be selected by a user operation, or the image recognition unit 422 may automatically select the key image in order from the captured image stored in the storage unit 410.
  • the bit value of the local feature amount is stably determined to be 0 for a pixel pair with a small luminance difference. . Therefore, when the image recognition process using the local feature amount calculated in this way is executed in the server device 400, the recognition accuracy is improved.
  • the processing functions of the devices can be realized by a computer.
  • a program describing the processing contents of the functions that each device should have is provided, and the processing functions are realized on the computer by executing the program on the computer.
  • the program describing the processing contents can be recorded on a computer-readable recording medium.
  • the computer-readable recording medium include a magnetic storage device, an optical disk, a magneto-optical recording medium, and a semiconductor memory.
  • the magnetic storage device include a hard disk device (HDD), a flexible disk (FD), and a magnetic tape.
  • Optical discs include DVD (Digital Versatile Disc), DVD-RAM, CD-ROM (Compact Disc-Read Only Memory), CD-R (Recordable) / RW (ReWritable), and the like.
  • Magneto-optical recording media include MO (Magneto-Optical disk).
  • a portable recording medium such as a DVD or CD-ROM in which the program is recorded is sold. It is also possible to store the program in a storage device of a server computer and transfer the program from the server computer to another computer via a network.
  • the computer that executes the program stores, for example, the program recorded on the portable recording medium or the program transferred from the server computer in its own storage device. Then, the computer reads the program from its own storage device and executes processing according to the program. The computer can also read the program directly from the portable recording medium and execute processing according to the program. In addition, each time a program is transferred from a server computer connected via a network, the computer can sequentially execute processing according to the received program.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Multimedia (AREA)
  • General Physics & Mathematics (AREA)
  • Physics & Mathematics (AREA)
  • Evolutionary Computation (AREA)
  • General Health & Medical Sciences (AREA)
  • Medical Informatics (AREA)
  • Software Systems (AREA)
  • Databases & Information Systems (AREA)
  • Computing Systems (AREA)
  • Artificial Intelligence (AREA)
  • Health & Medical Sciences (AREA)
  • Image Analysis (AREA)

Abstract

類似する特徴領域の誤判定が発生しにくい特徴量を算出する。 演算部(1b)は、特徴領域(11a)内の複数の画素ペアのそれぞれに含まれる画素間の輝度差を算出し、輝度差に基づいて、複数の画素ペアにそれぞれ対応するビットを有する、特徴領域(11a)についての局所特徴量(12a)を算出する。この局所特徴量(12a)の算出は、局所特徴量(12a)に含まれる一のビットに対応する画素ペアを基に算出された一の輝度差と、0を挟んで設定された設定範囲(30)とを比較し、当該一の輝度差が設定範囲(30)の上限より大きい場合には、当該一のビットの値を1に決定し、当該一の輝度差が設定範囲(30)の下限より小さい場合には、当該一のビットの値を0に決定し、当該一の輝度差が設定範囲(30)に含まれる場合には、当該一のビットの値を1と0のうちあらかじめ決められた一方の値に決定する処理を含む。

Description

画像処理プログラムおよび画像処理装置
 本発明は、画像処理プログラムおよび画像処理装置に関する。
 近年、様々な分野で画像のマッチング技術が広く利用されている。画像同士のマッチング方法の例として、第1画像の特徴点における局所特徴量と、第2画像の特徴点における局所特徴量とを比較して、第1画像の特徴点に対応する第2画像の特徴点(以下、「対応点」と呼ぶ)を探索する手法が利用される。探索により発見された対応点の集合を統計処理することで、第2画像における第1画像の存在や第1画像の位置を認識できる。
 また、上記のような対応点の探索に利用される局所特徴量をバイナリコードで表す方法がある。その代表例として、BRIEF(Binary Robust Independent Elementary Features)がある。BRIEFは、特徴点の周囲に設定された複数の画素ペアのそれぞれについて計算された画素間の輝度差に基づく局所特徴量で表現される。具体的には、輝度差の符号(正負)に対応するビット値の集合が局所特徴量として利用される。このように局所特徴量をバイナリコードで表す方法では、ハミング距離による高速な計算によって特徴点同士の類似度を算出できるというメリットがある。
特開2015-36906号公報
M. Calonder, V. Lepetit, C. Strecha, and P. Fua., "BRIEF: Binary Robust Independent Elementary Features", In Proceedings of the European Conference on Computer Vision (ECCV), 2010
 上記のように、特徴量を示すバイナリコードの各ビットを画素ペアの輝度差の符号に基づいて算出する方法では、次のような問題がある。例えば画像内の背景領域や単色の壁など、画像内の平坦な領域に画素ペアが存在する場合、画素間の輝度値は互いに近い値になり、輝度差は0に近くなる。このような平坦な領域の画素ペアについての輝度差の符号は、その領域が同じ物体の同じ位置を写した領域であるとしても、撮影時の光源の状態や、ノイズ、写された位置の微妙なズレなどによって反転しやすい。そのため、このような領域から算出された局所特徴量を用いて第1画像の特徴点に対応する第2画像の対応点を探索すると、正しい対応点の探索に失敗する可能性が高くなる。このような探索の失敗は、画像認識精度を低下させる原因となる。
 1つの側面では、本発明は、類似する特徴領域の誤判定が発生しにくい特徴量を算出可能な画像処理プログラムおよび画像処理装置を提供することを目的とする。
 1つの案では、コンピュータに次のような処理を実行させる画像処理プログラムが提供される。この処理は、画像内の特徴領域に設定された複数の画素ペアのそれぞれに含まれる画素間の輝度差を算出し、輝度差に基づいて、複数の画素ペアにそれぞれ対応するビットを有する、特徴領域についての局所特徴量を算出する、処理を含む。また、局所特徴量の算出は、輝度差のうち、局所特徴量に含まれる一のビットに対応する画素ペアを基に算出された一の輝度差と、0を挟んで設定された設定範囲とを比較し、一の輝度差が設定範囲の上限より大きい場合には、一のビットの値を第1の値に決定し、一の輝度差が設定範囲の下限より小さい場合には、一のビットの値を第2の値に決定し、一の輝度差が設定範囲に含まれる場合には、一のビットの値を第1の値と第2の値のうちあらかじめ決められた一方の値に決定する処理を含む。
 また、1つの案では、上記の画像処理プログラムに基づく処理と同様の処理を実行する画像処理装置が提供される。
 1つの側面では、類似する特徴領域の誤判定が発生しにくい特徴量を算出できる。
 本発明の上記および他の目的、特徴および利点は本発明の例として好ましい実施の形態を表す添付の図面と関連した以下の説明により明らかになるであろう。
第1の実施の形態に係る画像処理装置の構成例および処理例を示す図である。 第2の実施の形態に係る画像処理装置のハードウェア構成例を示す図である。 画像処理装置が備える処理機能の構成例を示すブロック図である。 画素ペア管理テーブルの構成例を示す図である。 局所特徴量を算出する処理の例を示す図である。 特徴量管理テーブルの構成例を示す図である。 投票処理を説明するための図である。 投票結果に基づく類似画像の判定処理について説明するための図である。 対応点の探索例を示す図である。 特徴領域での画素ペアの例を示す図である。 画素ペアの輝度差のヒストグラムの例を示す図である。 ビット値決定のための閾値の設定例を示す図である。 閾値を動的に設定する例を示す図である。 特徴量算出処理の例を示すフローチャート(その1)である。 特徴量算出処理の例を示すフローチャート(その2)である。 画像認識処理の例を示すフローチャートである。 画素ペア管理テーブルの構成例を示す図である。 画像処理装置による特徴量算出の処理例を示すフローチャート(その1)である。 画像処理装置による特徴量算出の処理例を示すフローチャート(その2)である。 第3の実施の形態に係る画像処理システムの構成例を示す図である。 端末装置のハードウェア構成例を示す図である。 端末装置およびサーバ装置の処理機能の構成例を示すブロック図である。
 以下、本発明の実施の形態について図面を参照して説明する。
 [第1の実施の形態]
 図1は、第1の実施の形態に係る画像処理装置の構成例および処理例を示す図である。図1に示す画像処理装置1は、記憶部1aおよび演算部1bを有する。記憶部1aは、例えば、RAM(Random Access Memory)、HDD(Hard Disk Drive)などの記憶装置として実現される。演算部1bは、例えば、プロセッサとして実現される。
 記憶部1aは、特徴領域を有する画像を記憶する。通常、画像は複数の特徴領域を有する。図1では例として、記憶部1aは、画像10,20を記憶している。特徴領域には、複数の画素ペアが設定されている。例えば、画像10内の特徴領域11aには、画素ペア21a,22aが設定されており、画像10内の特徴領域11bには、画素ペア21b,22bが設定されている。
 なお、複数の画素ペアの位置や数は、各特徴領域で共通とされる。例えば、特徴領域11aにおける画素ペア21aの各画素の位置と、特徴領域11bにおける画素ペア21bの各画素の位置は、同じである。また、特徴領域11aにおける画素ペア22aの各画素の位置と、特徴領域11bにおける画素ペア22bの各画素の位置も、同じである。
 演算部1bは、記憶部1aに記憶された画像の特徴を示す特徴情報を算出する。特徴情報は、画像内の特徴領域ごとに算出された局所特徴量の集合である。特徴情報は、例えば、特徴領域ごとの局所特徴量を保持するテーブル情報として実現される。図1の例では、演算部1bは、画像10についての特徴情報10aと、画像20についての特徴情報20aとを算出する。特徴情報10aには、少なくとも、特徴領域11aについての局所特徴量12aと、特徴領域11bについての局所特徴量12bとが含まれる。
 特徴情報の算出処理は、輝度差算出処理(ステップS1)と、局所特徴量算出処理(ステップS2)とを含む。輝度差算出処理では、画像内の特徴領域に含まれる各画素ペアについて、画素間の輝度差が算出される。局所特徴量算出処理では、特徴領域ごとの局所特徴量が算出される。局所特徴量は、特徴領域内の複数の画素ペアにそれぞれ対応するビットを有するビット列として表される。なお、このようなビット列として表すことが可能な特徴量としては、例えば、BRIEF、ORB(Oriented fast and Rotated BRIEF)、BRISK(Binary Robust Invariant Scalable Keypoints)などがある。
 演算部1bは、局所特徴量の各ビット値を、対応する画素ペアの輝度差と、設定範囲30との比較に基づいて決定する。設定範囲30は、輝度値の範囲であり、輝度値“0”を挟んで設定される。例えば、図1の例のように、設定範囲30は閾値thによって規定され、-thを下限とし、thを上限とする。
 演算部1bは、次のような条件にしたがってビット値を0または1に決定する。演算部1bは、画素ペアの輝度差が設定範囲30の上限より大きい場合には、この画素ペアに対応するビット値を第1の値(図1の例では1)に決定する。演算部1bは、画素ペアの輝度差が設定範囲30の下限より小さい場合には、この画素ペアに対応するビット値を第2の値(図1の例では0)に決定する。演算部1bは、画素ペアの輝度差が設定範囲30に含まれる場合には、この画素ペアに対応するビット値を第1の値と第2の値のうちあらかじめ決められた一方の値(図1の例では0)に決定する。
 このようにして、画像10内の各特徴領域に対応する局所特徴量が算出され、それらの局所特徴量を含む特徴情報10aが生成される。また、画像20内の各特徴領域に対応する局所特徴量が算出され、それらの局所特徴量を含む特徴情報20aが生成される。
 この後、演算部1bは、特徴情報10a,20aを用いて、画像認識処理を実行する(ステップS3)。画像認識処理は、少なくとも、画像20内の特徴領域の中から、画像10内の各特徴領域に類似する類似領域を特定する処理を含む。この特定処理では、各特徴領域についての局所特徴量同士が比較されることで、各特徴領域の類似度が算出される。各特徴領域の類似度は、例えば、対応する局所特徴量同士のハミング距離の計算によって行われる。演算部1bは、画像10内の各特徴領域と画像20内の各特徴領域との類似度の算出結果に基づいて、例えば、画像20の中に画像10と類似する領域が含まれているか否かを判定することができる。なお、以上の画像認識処理は、画像処理装置1とは別の装置において実行されてもよい。
 ここで、局所特徴量のビット値を決定する方法としては、対応する画素ペアの輝度差の符号(正負)に基づいて決定する方法が考えられる。例えば、輝度差が0より大きい場合、ビット値は1とされ、輝度差が0以下の場合、ビット値は0とされる。しかし、この方法では、画素ペアが平坦な画像領域に配置されている場合に、光源やノイズの状態のわずかな変化によってビット値が変化しやすくなり、そのことが特徴領域間の類似性の判定精度を悪化させる原因になるという問題がある。
 例えば、図1の例では、特徴領域11aは平坦な画像領域であるのに対して、特徴領域11bは平坦でない、コントラストの高い画像領域である。この場合、特徴領域11aに含まれる画素ペアの輝度値は0に近くなる。このため、光源やノイズのわずかな変化によって、輝度差の符号が正から負、あるいは負から正に容易に変化してしまう。このようにして算出された局所特徴量同士を比較して類似度を判定した場合、対応する特徴領域同士が本来は類似するものであるとしても、算出された類似度が低くなる可能性があり、類似領域の判定を誤ってしまうことがある。
 これに対して、本実施の形態では、演算部1bは、画素ペアの輝度差が設定範囲30に含まれる場合には、この画素ペアに対応するビット値を0または1のうちあらかじめ決められた一方の値に決定する。これにより、輝度差が0に近い画素ペアについてのビット値はどの画素ペアについても0または1のどちらかに固定され、光源やノイズの変化によって変動しなくなる。したがって、類似領域の誤判定が発生しにくい局所特徴量を算出することができる。
 図1では、例えば、特徴領域11b内の画素ペア22bの輝度差は、設定範囲30に含まれておらず、輝度値“0”から遠いと推定される。この場合、画素ペア22bに対応するビット値は、輝度差の符号に応じて決定されても特に問題にならない。図1の例では、輝度差が設定範囲30の上限より大きいため、対応するビット値は1に決定される。
 一方、例えば、特徴領域11a内の画素ペア22aの輝度差は、設定範囲30に含まれており、輝度値“0”に近いと推定される。この場合、画素ペア22aに対応するビット値は、一方の値(図1では0)に固定される。したがって、類似領域の誤判定が発生しにくい局所特徴量12aを算出することができる。
 [第2の実施の形態]
 次に、第2の実施の形態として、複数の撮像画像の中からキー画像が選択され、キー画像以外の撮像画像からキー画像と類似するシーンの撮像画像を検索する画像処理装置について説明する。なお、第2の実施の形態では、画像の特徴量としてBRIEFをベースとした特徴量を用いるが、例えば、ORB、BRISKなど、特徴点付近に設定した画素ペア間の輝度差を2値化することで得られる他の種類のバイナリ特徴量をベースとすることもできる。
 図2は、第2の実施の形態に係る画像処理装置のハードウェア構成例を示す図である。第2の実施の形態に係る画像処理装置100は、例えば、図2に示すようなコンピュータとして実現される。
 画像処理装置100は、プロセッサ101によって装置全体が制御されている。プロセッサ101は、マルチプロセッサであってもよい。プロセッサ101は、例えばCPU(Central Processing Unit)、MPU(Micro Processing Unit)、DSP(Digital Signal Processor)、ASIC(Application Specific Integrated Circuit)、またはPLD(Programmable Logic Device)である。またプロセッサ101は、CPU、MPU、DSP、ASIC、PLDのうちの2以上の要素の組み合わせであってもよい。
 プロセッサ101には、バス108を介して、RAM102と複数の周辺機器が接続されている。
 RAM102は、画像処理装置100の主記憶装置として使用される。RAM102には、プロセッサ101に実行させるOS(Operating System)プログラムやアプリケーションプログラムの少なくとも一部が一時的に格納される。また、RAM102には、プロセッサ101による処理に必要な各種データが格納される。
 バス108に接続されている周辺機器としては、HDD103、グラフィック処理装置104、入力インタフェース105、読み取り装置106および通信インタフェース107がある。
 HDD103は、画像処理装置100の補助記憶装置として使用される。HDD103には、OSプログラム、アプリケーションプログラム、および各種データが格納される。なお、補助記憶装置としては、SSD(Solid State Drive)などの他の種類の不揮発性記憶装置を使用することもできる。
 グラフィック処理装置104には、表示装置104aが接続されている。グラフィック処理装置104は、プロセッサ101からの命令にしたがって、画像を表示装置104aに表示させる。表示装置としては、液晶ディスプレイや有機EL(Electroluminescence)ディスプレイなどがある。
 入力インタフェース105には、入力装置105aが接続されている。入力インタフェース105は、入力装置105aから出力される信号をプロセッサ101に送信する。入力装置105aとしては、キーボードやポインティングデバイスなどがある。ポインティングデバイスとしては、マウス、タッチパネル、タブレット、タッチパッド、トラックボールなどがある。
 読み取り装置106には、可搬型記録媒体106aが脱着される。読み取り装置106は、可搬型記録媒体106aに記録されたデータを読み取ってプロセッサ101に送信する。可搬型記録媒体106aとしては、光ディスク、光磁気ディスク、半導体メモリなどがある。
 通信インタフェース107は、ネットワーク107aを介して他の装置との間でデータの送受信を行う。
 以上のようなハードウェア構成によって、画像処理装置100の処理機能を実現することができる。
 上記の画像処理装置100の記憶装置(例えば、HDD103)には、複数の撮像画像のデータが記憶される。これらの撮像画像は、撮像装置によって撮像された画像である。これらの撮像画像のデータは、例えば、可搬型記録媒体106aを用いて画像処理装置100の記憶装置に格納されてもよいし、あるいは、ネットワーク107aを介して画像処理装置100の記憶装置に格納されてもよい。
 画像処理装置100では、例えば、写真管理ソフトウェアが実行されることで次のような処理が行われる。ユーザの入力操作により、記憶装置内の複数の撮像画像からキー画像が選択される。すると、画像処理装置100は、記憶装置内の複数の撮像画像のうちキー画像を除く撮像画像(以下、「対象画像」と呼ぶ)から、キー画像と類似するシーンの撮像画像を抽出する。例えば、キー画像に含まれる対象物と同じ対象物が写っていると推定される対象画像が、キー画像と類似するシーンの撮像画像として抽出される。これにより、ユーザは、例えば、素材として必要な画像を画像処理装置100内から検索したり、同じイベントの開催時の写真を集めて自動的に整理することができる。したがって、ユーザに利便性や娯楽性を提供することができる。
 このような画像処理装置100は、例えば、パーソナルコンピュータ、スマートフォンなどのユーザによって操作される端末装置として実現される。また、画像処理装置100は、ネットワーク上のサーバ装置として実現されてもよい。この場合、撮像画像のデータは、例えば、ユーザの端末装置からネットワークを介して画像処理装置100にアップロードされる。
 なお、画像処理装置100の画像検索機能は、上記のような撮像画像の管理の他、例えば、プレゼンテーション資料などの文書コンテンツの管理に利用することもできる。例えば、画像処理装置100の記憶装置に複数の文書のデータが記憶され、これらの中からキー文書が選択される。画像処理装置100は、例えば、文書表示時の見た目がキー文書と似ている文を含む文書をその他の文書の中から抽出することもできるし、あるいは、キー文書と同じ画像や表、グラフなどを含む文書をその他の文書の中から抽出することもできる。これにより、文書を探すための作業時間を低減できる。また、過去の文書資産の再利用が推進され、業務の効率化を図ることもできる。
 また、画像処理装置100の画像検索機能は、医療画像管理システムの付加機能として利用することもできる。例えば、複数の時期に撮影されたCT(Computed Tomography)画像やMRI(Magnetic Resonance Imaging)画像上の患部を自動的に位置合わせして、患部の画像の経時変化を判断するために利用できる。
 図3は、画像処理装置が備える処理機能の構成例を示すブロック図である。画像処理装置100は、記憶部110、画像取得部121、特徴量算出部122および画像認識部123を有する。
 記憶部110は、画像処理装置100が備える記憶装置(例えば、RAM102またはHDD103)の記憶領域として実装される。記憶部110には、画像データ111、画素ペア管理テーブル112および特徴量管理テーブル113が記憶される。
 画像データ111は、撮像画像によって撮像された撮像画像のデータを示す。記憶部110には、画像データ111が複数記憶される。画素ペア管理テーブル112には、局所特徴量を算出するために利用される画素ペアの座標が登録される。特徴量管理テーブル113は、撮像画像ごとに用意される。特徴量管理テーブル113には、撮像画像内の特徴点ごとの特徴量(局所特徴量)が登録される。
 画像取得部121、特徴量算出部122および画像認識部123の処理は、例えば、所定のプログラムがプロセッサ101に実行されることによって実現される。
 画像取得部121は、撮像画像の画像データ111を取得して記憶部110に格納する。例えば、画像取得部121は、撮像画像の画像データ111を可搬型記録媒体106aを介して、あるいはネットワーク107aを介して取得する。
 特徴量算出部122は、画像データ111および画素ペア管理テーブル112を参照しながら、撮像画像内の各特徴点についての局所特徴量を算出し、算出した局所特徴量を特徴量管理テーブル113に登録する。
 画像認識部123は、特徴量管理テーブル113を参照しながら、キー画像の選択操作を受け付け、選択されたキー画像以外の撮像画像の中からキー画像と類似する類似画像を検索する。
 <特徴量算出処理>
 次に、特徴量算出部122による特徴量算出処理について詳しく説明する。
 特徴量算出部122は、撮像画像上に特徴点を設定する。特徴点は、各撮像画像で共通に設定される。本実施の形態では例として、撮像画像上に等間隔(例えば、24画素間隔)で特徴点を設定するDense Samplingを用いる。そして、特徴量算出部122は、各撮像画像の各特徴点についての局所特徴量を算出する。
 BRIEFは、各特徴点を中心とする一定領域(以下、「特徴領域」と呼ぶ)ごとの局所特徴量として算出される。特徴領域は、例えば、特徴点を中心とする48画素四方の矩形領域とされる。また、特徴領域の内部には、複数の画素ペアがあらかじめ設定される。ある特徴点の局所特徴量は、対応する特徴領域内の各画素ペアの輝度差に基づく符号を組み合わせて構成されたビット列として算出される。
 図4は、画素ペア管理テーブルの構成例を示す図である。画素ペアを構成する各画素の座標は、画素ペア管理テーブル112にあらかじめ登録されている。図4に示すように、画素ペア管理テーブル112には、画素ペアを識別するためのIDと、画素ペアを構成する第1画素および第2画素の各座標とが登録される。画素ペアは、例えば、ランダムに設定される。画素ペア管理テーブル112に登録された画素ペアの情報は、すべての特徴領域に対して共通に適用される。
 図5は、局所特徴量を算出する処理の例を示す図である。図5では、撮像画像200における各特徴点の局所特徴量を、この撮像画像200に対応する特徴量管理テーブル113に登録する処理の例を示す。
 例えば、撮像画像200に設定された特徴点201の局所特徴量は、次のようにして算出される。特徴量算出部122は、特徴点201に対応する特徴領域202について、各画素ペアの輝度差を計算する(ステップS11)。画素ペアの輝度差は、例えば、画素ペア管理テーブル112における第1画素の輝度値から第2画素の輝度値を減算することで得られる。
 特徴量算出部122は、算出された輝度差の符号に応じたビット値を組み合わせることでビット列203を生成する(ステップS12)。特徴量算出部122は、画素ペア順にビット値を決定してビット列に付加する。例えば、M組の画素ペアが設定されている場合、Mビットのビット列が生成される。特徴量算出部122は、生成されたビット列203を、特徴点201の局所特徴量として特徴量管理テーブル113に登録する(ステップS13)。
 ここで、ステップS12でのビット列203におけるビット値の決定方法としては、例えば、輝度差が正値の場合にはビット値を“1”(または“0”)とし、輝度差が0以下の場合にはビット値を“0”(または“1”)とする方法が考えられる。しかし、この方法では、画像内の平坦な領域では、輝度差が0に近いため、撮像条件の微妙な違いによってビット値が容易に変化し、そのことが画像認識精度の劣化につながるという問題がある。そこで、本実施の形態では、ビット値を“0”にするか“1”にするかを決定するための輝度差の境界を0からずらすことで、画像認識精度が向上するような局所特徴量を算出可能にする。なお、このビット値の決定方法については後に詳しく述べる。
 図6は、特徴量管理テーブルの構成例を示す図である。前述のように、図6に示す特徴量管理テーブル113は、撮像画像ごとに用意される。
 特徴量管理テーブル113には、撮像画像内の特徴点ごとにレコードが登録される。各レコードには、ID、特徴点座標および局所特徴量が登録される。IDは、撮像画像内の特徴点を識別するための識別番号を示す。特徴点座標は、特徴点の座標を示す。局所特徴量の項目には、特徴点の局所特徴量を示すビット列が登録される。
 <画像認識処理>
 次に、画像認識部123による画像認識処理について詳しく説明する。
 画像認識部123は、ユーザの操作入力に応じて撮像画像からキー画像を選択する。そして、画像認識部123は、選択したキー画像と他の撮像画像(対象画像)とを比較し、対象画像の中からキー画像と類似する画像を探索する。
 キー画像と対象画像との比較では、画像間で類似する特徴点が探索される。この処理では、画像認識部123は、キー画像から選択した特徴点の局所特徴量と、対象画像の各特徴点の局所特徴量とのハミング距離を計算し、対象画像の特徴点のうちハミング距離が最小の特徴点を、類似度が最も高い対応点として抽出する。
 次に、画像認識部123は、キー画像上の特徴点ごとに次のような処理を実行する。画像認識部123は、キー画像上の特徴点と対象画像上の対応点とが一致するように対象画像にキー画像を重ねた場合の、対象画像におけるキー画像の中心位置を推定する。画像認識部123は、対象画像の各画素のうち、推定された中心位置の画素に対して投票する。画像認識部123は、対象画像の画素のうち、投票数が最大の画素を判別し、判別した画素の投票数が所定の閾値を超えている場合に、対象画像をキー画像に類似する画像と判定する。
 ここで、図7は、投票処理を説明するための図である。図7では、キー画像210の特徴点211と類似する対象画像220の対応点を探索する処理の例を示す。画像認識部123は、例えば、キー画像210の特徴点211の局所特徴量と、対象画像220の各特徴点の局所特徴量とのハミング距離を計算することで、対応点を探索する(ステップS21)。
 キー画像210の特徴点211に対する対応点として、対象画像220の特徴点221が抽出されたものとする。このとき、画像認識部123は、特徴点211と特徴点221(対応点)とが一致するように対象画像220にキー画像210を重ねた場合の、対象画像220におけるキー画像210の中心位置212を推定する(ステップS22)。
 ここで、対象画像の横幅および高さの画素数をそれぞれwi,hiとし、キー画像の横幅および高さの画素数をそれぞれwr,hrとする。キー画像の特徴点(xr,yr)に対応する対象画像の対応点として対象画像の特徴点(xi,yi)が探索されたとすると、対象画像におけるキー画像の中心点の位置(xv,yv)は、次の式(1-1),(1-2)を用いて算出される。
xv=xi・xr+(wr/2)   ・・・(1-1)
yv=yi・yr+(hr/2)   ・・・(1-2)
 図7の特徴点211と特徴点221との対応関係に基づいて対象画像220におけるキー画像210の中心位置として画素222が推定されたとすると、画像認識部123は、対象画像220の画素のうち、画素222に対して投票する。この投票処理には、例えば、対象画像220の各画素に対応するエントリを有する投票マップ114が用いられる。投票マップ114の各エントリの初期値は0とされる。図7の処理では、投票マップ114における画素222に対応するエントリに1が加算される(ステップS23)。
 なお、実際には、画像認識部123は、例えば、画素222を中心とした所定領域(例えば、10画素四方の矩形領域)に含まれる各画素に投票してもよい。これにより、キー画像210と対象画像220との違いに対してある程度ロバストな認識処理を行うことが可能になる。
 図8は、投票結果に基づく類似画像の判定処理について説明するための図である。図8に示す投票マップ114aは、図7に示すような処理がキー画像210の各特徴点について実行された後の投票マップ114の状態を示す。画像認識部123は、投票マップ114aにおける各画素についての投票数のうちの最大値を抽出し、この最大値が所定の閾値を超えているかを判定する。
 ここで、キー画像210と対象画像220とに同じ対象物が写っている場合、キー画像210の特徴点と対象画像220の対応点との位置関係が、キー画像の特徴点間で同じ場合が多い。この場合、投票マップ114aにおける同じ画素に対応するエントリに投票数が集中する。一方、キー画像210と対象画像220との関連性が低い場合、キー画像210の特徴点と対象画像220の対応点との位置関係が、キー画像210の特徴点間で異なる場合が多い。この場合、投票マップ114aにおいて投票数が分散する。
 したがって、投票マップ114aにおける投票数の最大値が閾値を超えた場合には、投票数が同じ画素に集中していると推定されるため、キー画像210と対象画像220とに同じ対象物が写っている可能性が高いと判断できる。このことから、画像認識部123は、投票数の最大値が閾値を超えた場合、対象画像220をキー画像210に類似する画像であると判定する。
 なお、実際には、対象画像220における特徴点の数によって投票数の最大値が影響を受けることから、例えば、対象画像220における特徴点の数で投票数を除算するなどの正規化処理が行われた上で、閾値との比較が行われることが望ましい。
 <バイナリ特徴量算出の詳細>
 上記のように、局所特徴量を示すビット列におけるビット値の決定方法としては、輝度差が正値の場合にはビット値を“1”とし、輝度差が0以下の場合にはビット値を“0”とする方法が考えられる。しかし、この方法で算出されたバイナリ特徴量を用いてキー画像の特徴点に類似する対象画像の対応点を探索すると、対応点を誤認識する場合があるという問題がある。この問題点について、図9を用いて説明する。
 図9は、対応点の探索例を示す図である。図9に示す画像230,240には、同じ建物250が写っているが、建物250の位置や方向などの写り方が異なっている。また、画像230の特徴領域231と画像240の特徴領域241には、建物250の外面のうち窓が存在する部分が写っている。一方、画像230の特徴領域232と画像240の特徴領域242には、建物250における平坦な壁面と背景である空との境界部分が写っている。このため、特徴領域232,242は、特徴領域231,241と比較して、平坦な部分が占める面積が広い平坦な画像領域となっている。
 ここで、特徴領域231と特徴領域241とは類似度が高く、特徴領域241は特徴領域231に対する正しい対応領域であるとする。また、特徴領域232と特徴領域242とは類似度が高く、特徴領域242は特徴領域232に対する正しい対応領域であるとする。
 特徴領域231,241には、輝度差が大きい画素ペアが多く含まれる。この場合、光源の状態やノイズの影響によって画素ペアの輝度差の符号が変化する可能性は低い。このため、画素ペアの輝度差の符号に応じて局所特徴量のビット値を決定した場合、撮影条件が変化したとしても画素ペアに対応するビット値は安定的に0または1のどちらかに決定される可能性が高い。その結果、特徴領域231に類似する対応領域として特徴領域241が正しく認識される可能性が高い。
 一方、特徴領域232,242は平坦なので、これらの領域には、各画素の輝度差が0に近い画素ペアが多く含まれる。この場合、光源の状態やノイズのわずかな違いによって、画素ペアの輝度差の符号が変化しやすくなる。このため、画素ペアの輝度差の符号に応じて局所特徴量のビット値を決定する方法では、撮影条件のわずかな違いによって画素ペアに対応するビット値が変化しやすく、局所特徴量の算出値が不安定になる。その結果、特徴領域232に類似する対応領域として特徴領域242が正しく認識されない可能性が高くなり、画像認識精度が低下する。
 図10は、特徴領域での画素ペアの例を示す図である。この図10では、図9に示した画像230の特徴領域232および画像240の特徴領域242における画素ペアの設定パターンの例を示す。なお、図10における特徴領域232,242において、網掛け部分は図9の建物250の壁面を示し、それ以外の部分は背景(空)を示す。建物230の壁面の輝度より背景の輝度の方が高く、これらの間にはある程度大きな差があるものとする。
 設定パターン1では、画素P1が背景に設定され、画素P2が壁面に設定されている。この場合、例えば、撮影状況の違いによって光源やノイズの状態が変化したとしても、画素P1の輝度値p1と画素P2の輝度値p2との差は常に正になる。このため、例えば、輝度差の符号が正の場合にビット値を“1”に決定した場合、ビット値は“1”のまま変動しない可能性が高い。したがって、バイナリ特徴量として安定的な数値が算出される。
 一方、設定パターン2では、画素P1,P2ともに背景に設定されている。この場合、画素P1の輝度値p1と画素P2の輝度値p2との差は0に近い。このため、撮影状況の違いによって光源やノイズの状態が変化した場合に、輝度差(p1-p2)の符号が変化しやすい。したがって、輝度差の符号が正の場合にビット値を“1”に決定する方法では、画素P1,P2のビット値は0にも1にもなる可能性があり、その結果、バイナリ特徴量の算出値が不安定になる。
 設定パターン3では、画素P1,P2ともに壁面に設定されている。この場合も、画素P1の輝度値p1と画素P2の輝度値p2との差は0に近い。したがって、設定パターン2と同様に、バイナリ特徴量の算出値が不安定になる。
 平坦な領域がその多くを占めている特徴領域では、設定パターン1のように輝度差が安定的に正または負になるような画素ペアより、設定パターン2,3のように輝度差の符号が変化しやすい画素ペアが多くなる。そのため、このような特徴領域から算出されたバイナリ特徴量は、撮影状況の違いに対して変化しやすく、不安定であり、このことが画像認識部123による画像認識精度を劣化させる原因になる。
 図11は、画素ペアの輝度差のヒストグラムの例を示す図である。この図11は、多数の撮像画像から算出された画素ペアの輝度差の分布を示している。この図11の例のように、一般的な写真やビジネス文書画像、CT画像から画素ペアの輝度差を算出すると、輝度差の分布は0付近に集中する傾向がある。換言すると、一般的に、画像からバイナリ特徴量を算出すると、輝度差が0に近い画素ペアが多数出現する傾向にある。このため、画像認識処理の精度劣化に与える影響は大きい。
 これに対して、本実施の形態では、特徴量算出部122は、ビット値を“0”にするか“1”にするかを決定するための輝度差の境界(閾値)を0からずらす。これにより、撮影状況の変化に対して、輝度差が0に近い画素ペアについてのビット値を“0”または“1”のどちらかから変化しにくくする。
 図12は、ビット値決定のための閾値の設定例を示す図である。
 図12において、ビット値決定法1は比較例であり、輝度差が0より大きい場合にビット値を“1”にし、輝度差が0以下の場合にビット値を“0”にする方法である。
 これに対して、ビット値決定法2は、本実施の形態で採用される方法である。このビット値決定法2では、0より大きく輝度値の最大値(図12では255)より小さい閾値dが設定される。特徴量算出部122は、例えば、輝度差が閾値dより大きい場合にはビット値を“1”にし、輝度差が閾値d以下の場合にはビット値を“0”にする。この方法によれば、輝度差が0に近く、画像内の平坦な領域に設定された可能性の高い画素ペアについてのビット値が、“0”に固定される。これにより、撮影状況が変化したとしても、平坦な領域の画素ペアについてのビット値は安定的に同じ値をとるようになる。その結果、類似する特徴点同士の探索精度が向上し、それに伴って画像認識精度が向上する。
 なお、特徴量算出部122は、図12の例の他、例えば、輝度差が-d以上の場合にビット値を“1”にし、輝度差が-dより小さい場合にビット値を“0”にしてもよい。また、特徴量算出部122は、輝度差が-d以上d以下の範囲Rに含まれる場合には、ビット値を“0”でなく“1”にしてもよい。
 換言すると、特徴量算出部122は、輝度差が-d以上d以下の範囲Rに含まれる場合には、ビット値を“1”または“0”に固定し、輝度差が範囲Rに含まれない場合には、ビット値決定法1を用いてビット値を決定する。
 また、閾値dとしては、あらかじめ固定的な値が設定されていてもよい。あるいは、次の図13に示す例のように、閾値dは、撮像画像から得られた各画素ペアの輝度差に関する統計情報に基づいて動的に設定されてもよい。
 図13は、閾値を動的に設定する例を示す図である。この図13では、図11に示した輝度差のヒストグラムに基づいて閾値dを設定する例を示す。
 特徴量算出部122は、例えば、輝度差のヒストグラムから、一定割合(例えば50%)の画素ペアが含まれる、輝度差0を中心とした範囲を抽出する。特徴量算出部122は、閾値dとして、抽出した範囲の正側の境界の輝度値を設定する。すなわち、閾値dは、抽出された範囲の幅が2dとなるように設定される。
 このような方法により、画像認識の対象とする撮像画像の状況に応じて、閾値dを適切に設定することができる。
 また、他の方法の例として、特徴量算出部122は、図13のヒストグラムに所定の度数閾値を設定し、度数(画素ペア数)が度数閾値以上となる、輝度差0を中心とした範囲を抽出し、抽出した範囲に基づいて上記と同様に閾値dを設定してもよい。
 なお、ヒストグラムに登録する輝度差の算出対象となる撮像画像(サンプル画像)は、記憶部110に記憶されたすべての画像データ111であってもよいし、それらの中の一部であってもよい。また、サンプル画像は、記憶部110に記憶された画像データ111とは別に専用に用意された画像であってもよい。
 また、上記のような輝度差に関する統計情報に基づいて閾値dを設定する方法は、閾値dの初期設定のために用いられてもよい。この場合、閾値dが一旦設定された後は、例えば撮像画像が追加された場合でも、最初に設定された閾値dを用いてその撮像画像から特徴量が算出される。また、画像認識の対象とする撮像画像が更新されるのに伴って、一定期間ごとに、更新された撮像画像を用いて閾値dが再計算されてもよい。
 <フローチャート>
 次に、画像処理装置100の処理についてフローチャートを用いて説明する。
 図14,図15は、特徴量算出処理の例を示すフローチャートである。
 [ステップS51]特徴量算出部122は、各撮像画像上に複数の特徴点を設定する。例えば、撮像画像上に等間隔(例えば、24画素間隔)で特徴点を設定するDense Samplingが用いられる。特徴量算出部122は、各撮像画像に対応する特徴量管理テーブル113に、設定した各特徴点についてのレコードを作成し、作成した各レコードにIDおよび特徴点座標を登録する。
 [ステップS52]特徴量算出部122は、撮像画像を1つ選択する。
 [ステップS53]特徴量算出部122は、ステップS52で選択した撮像画像から特徴点を1つ選択する。
 [ステップS54]特徴量算出部122は、画素ペア管理テーブル112から画素ペアを1つ選択する。
 [ステップS55]特徴量算出部122は、ステップS53で選択した特徴点を中心とした一定範囲の特徴領域から、ステップS54で選択した画素ペアに対応する2つの画素を選択し、選択した各画素間の輝度差を計算する。輝度差は、画素ペアを構成する画素のうち、第1画素の輝度値から第2画素の輝度値を減算することで算出される。
 [ステップS56]特徴量算出部122は、画素ペア管理テーブル112に登録されたすべての画素ペアについて処理済みかを判定する。処理済みでない画素ペアがある場合、ステップS54に戻り、他の画素ペアが選択される。一方、すべての画素ペアについて処理済みの場合、ステップS57の処理が実行される。
 [ステップS57]特徴量算出部122は、ステップS52で選択した撮像画像に含まれるすべての特徴点について処理済みかを判定する。処理済みでない特徴点がある場合、ステップS53に戻り、他の特徴点が選択される。一方、すべての特徴点について処理済みの場合、ステップS58の処理が実行される。
 [ステップS58]特徴量算出部122は、すべての撮像画像について処理済みかを判定する。処理済みでない撮像画像がある場合、ステップS52に戻り、他の撮像画像が選択される。一方、すべての撮像画像について処理済みの場合、ステップS59の処理が実行される。
 [ステップS59]特徴量算出部122は、ステップS55で算出されたすべての輝度差を用いて、輝度差の度数を示すヒストグラムを作成する。特徴量算出部122は、作成したヒストグラムに基づいて閾値dを決定する。例えば、特徴量算出部122は、ヒストグラムから、一定割合(例えば50%)の画素ペアが含まれる、輝度差0を中心とした範囲を抽出し、抽出した範囲の正側の境界の輝度値を閾値dとする。
 なお、このステップS59では、すべての撮像画像から算出された輝度差ではなく、一部の撮像画像から算出された輝度差だけを用いてヒストグラムが作成されてもよい。また、すべての撮像画像、一部の撮像画像のどちらが用いられる場合でも、画像内の一部の領域から算出された輝度差だけを用いてヒストグラムが作成されてもよい。あるいは、画像内の一部の特徴領域から算出された輝度差だけを用いてヒストグラムが作成されてもよい。
 [ステップS61]特徴量算出部122は、撮像画像を1つ選択する。
 [ステップS62]特徴量算出部122は、ステップS61で選択した撮像画像から特徴点を1つ選択する。
 [ステップS63]特徴量算出部122は、画素ペア管理テーブル112から画素ペアを1つ選択する。
 [ステップS64]特徴量算出部122は、ステップS63で選択した画素ペアについて算出された輝度差と、閾値dとの比較に基づいて、この画素ペアに対応するビット値を決定する。例えば、特徴量算出部122は、輝度差が閾値dより大きい場合には、ビット値を“1”とし、輝度差が閾値d以下である場合には、ビット値を“0”とする。
 [ステップS65]特徴量算出部122は、ステップS62で選択された特徴点についての局所特徴量を示すビット列の下位に、ステップS64で算出したビット値を付加する。
 [ステップS66]特徴量算出部122は、画素ペア管理テーブル112に登録されたすべての画素ペアについて処理済みかを判定する。処理済みでない画素ペアがある場合、ステップS63に戻り、他の画素ペアが選択される。一方、すべての画素ペアについて処理済みの場合、ステップS67の処理が実行される。
 [ステップS67]特徴量算出部122は、ステップS65で作成されたビット列を、ステップS62で選択した特徴点についての局所特徴量として、特徴量管理テーブル113における対応するレコードに登録する。
 [ステップS68]特徴量算出部122は、ステップS61で選択した撮像画像に含まれるすべての特徴点について処理済みかを判定する。処理済みでない特徴点がある場合、ステップS62に戻り、他の特徴点が選択される。一方、すべての特徴点について処理済みの場合、ステップS69の処理が実行される。
 [ステップS69]特徴量算出部122は、すべての撮像画像について処理済みかを判定する。処理済みでない撮像画像がある場合、ステップS61に戻り、他の撮像画像が選択される。一方、すべての撮像画像について処理済みの場合、特徴量算出処理は終了する。
 以上の図14,図15の処理により、各撮像画像に対応する特徴量管理テーブル113に、各特徴点についての局所特徴量が登録される。
 なお、上記の図14,図15では、輝度差の統計情報に基づいて閾値dを動的に設定する例について説明したが、閾値dはあらかじめ決められた値であってもよい。この場合、特徴量算出部122は、例えば、図14のステップS55を実行した時点で、該当するビット値を決定し、ステップS56で“Yes”と判定した時点で、該当する特徴点の局所特徴量を特徴量管理テーブル113に登録してもよい。そうすることで、ステップS59以降の処理は不要になる。
 図16は、画像認識処理の例を示すフローチャートである。
 [ステップS81]画像認識部123は、ユーザの操作入力に応じて撮像画像からキー画像を選択する。
 [ステップS82]画像認識部123は、キー画像以外の撮像画像(対象画像)の中から1つを選択する。
 [ステップS83]画像認識部123は、キー画像の特徴点を1つ選択する。
 [ステップS84]画像認識部123は、ステップS82で選択した対象画像から、ステップS83でキー画像から選択した特徴点に類似する特徴点(対応点)を探索する。この処理では、画像認識部123は、キー画像から選択した特徴点の局所特徴量と、対象画像の各特徴点の局所特徴量とのハミング距離を計算し、対象画像の特徴点のうちハミング距離が最小の特徴点を、類似度が最も高い対応点として抽出する。
 [ステップS85]画像認識部123は、ステップS83で選択した特徴点とステップS84で探索された対応点とが一致するように対象画像にキー画像を重ねた場合の、対象画像におけるキー画像の中心位置を推定する。画像認識部123は、対象画像の各画素のうち、推定された中心位置の画素に対して投票する。なお、実際には、画像認識部123は、例えば、推定された中心位置を中心とした所定領域(例えば、10画素四方の矩形領域)に含まれる各画素に投票してもよい。
 [ステップS86]画像認識部123は、キー画像の全特徴点について処理済みかを判定する。処理済みでない特徴点がある場合、ステップS83に戻り、他の特徴点が選択される。一方、すべての特徴点について処理済みの場合、ステップS87の処理が実行される。
 [ステップS87]画像認識部123は、ステップS82で選択した対象画像の各画素についての投票数の最大値が所定の閾値を超えている場合、この対象画像をキー画像に類似する画像と判定する。この場合、画像認識部123は、例えば、キー画像に類似すると判定された対象画像の識別情報を出力する。一方、画像認識部123は、投票数の最大値が閾値以下の場合、この対象画像をキー画像に類似しない画像と判定する。
 なお、ステップS87では、画像認識部123は、例えば、投票数の最大値が所定の閾値を超えているすべての対象画像の識別情報を、投票数の大きさ順に出力してもよい。
 [ステップS88]画像認識部123は、すべての対象画像について処理済みかを判定する。処理済みでない対象画像がある場合、ステップS82に戻り、他の対象画像が選択される。一方、すべての対象画像について処理済みの場合、画像認識部123は、ステップS87でキー画像に類似すると判定された対象画像の識別情報を出力して、画像認識処理を終了する。
 以上の図16の処理では、図14,図15の処理によって算出された特徴量が用いられることで、ステップS84での対応点の探索精度が向上する。その結果、ステップS87での判定精度が向上する。図11で説明したように、一般の画像は平坦な領域が占める割合が多く、このような画像に設定された局所特徴量算出用の画素ペアの中には、輝度差が0に近いものが多く含まれる。図14,図15の処理により、輝度差が小さい画素ペアについては局所特徴量のビット値が安定的に0と決定される。このため、平坦な領域を広く占める一般の画像を用いた画像認識においては、その認識精度を向上させる効果は大きい。
 <第2の実施の形態の変形例>
 次に、第2の実施の形態の画像処理装置100を変形した変形例について説明する。この変形例は、次の点で第2の実施の形態の画像処理装置100と相違する。変形例では、特徴領域に設定される画素ペアごとに、個別の閾値dが設定される。そして、局所特徴量のビット値を決定する際、ビット値に対応する画素ペアに対して設定された閾値dが利用される。
 この変形例は、図2と同様のハードウェア構成を有する画像処理装置によって実現され、基本的な処理機能の構成も図3と同様である。そこで、変形例について、図2,図3と同じ符号を用いて説明する。ただし、記憶部110には、図3,図4に示した画素ペア管理テーブル112の代わりに、次の図17に示す画素ペア管理テーブルが記憶される。
 図17は、画素ペア管理テーブルの構成例を示す図である。図17に示す画素ペア管理テーブル112aには、図4に示した画素ペア管理テーブル112に対して、閾値dの項目がさらに付加されている。これにより、画素ペア管理テーブル112は、画素ペアごとに個別の閾値dを保持することができる。
 図18,図19は、画像処理装置による特徴量算出の処理例を示すフローチャートである。
 [ステップS101]特徴量算出部122は、図14のステップS51と同様の手順で、各撮像画像上に複数の特徴点を設定する。特徴量算出部122は、各撮像画像に対応する特徴量管理テーブル113に、設定した各特徴点についてのレコードを作成し、作成した各レコードにIDおよび特徴点座標を登録する。
 [ステップS102]特徴量算出部122は、画素ペア管理テーブル112から画素ペアを1つ選択する。
 [ステップS103]特徴量算出部122は、撮像画像を1つ選択する。
 [ステップS104]特徴量算出部122は、ステップS103で選択した撮像画像から特徴点を1つ選択する。
 [ステップS105]特徴量算出部122は、ステップS104で選択した特徴点を中心とした一定範囲の特徴領域から、ステップS102で選択した画素ペアに対応する2つの画素を選択し、選択した各画素間の輝度差を計算する。輝度差は、画素ペアを構成する画素のうち、第1画素の輝度値から第2画素の輝度値を減算することで算出される。
 [ステップS106]特徴量算出部122は、ステップS103で選択した撮像画像に含まれるすべての特徴点について処理済みかを判定する。処理済みでない特徴点がある場合、ステップS104に戻り、他の特徴点が選択される。一方、すべての特徴点について処理済みの場合、ステップS107の処理が実行される。
 [ステップS107]特徴量算出部122は、すべての撮像画像について処理済みかを判定する。処理済みでない撮像画像がある場合、ステップS103に戻り、他の撮像画像が選択される。一方、すべての撮像画像について処理済みの場合、ステップS108の処理が実行される。
 [ステップS108]特徴量算出部122は、ステップS102で選択した画素ペアに関してステップS105で算出された各輝度差を用いて、輝度差の度数を示すヒストグラムを作成する。特徴量算出部122は、作成したヒストグラムに基づいて、選択した画素ペアに対応する閾値dを決定する。例えば、特徴量算出部122は、ヒストグラムから、一定割合(例えば50%)の画素ペアが含まれる、輝度差0を中心とした範囲を抽出し、抽出した範囲の正側の境界の輝度値を閾値dとする。
 [ステップS109]特徴量算出部122は、ステップS108で決定された閾値dが、所定の判定閾値dtより大きいかを判定する。判定閾値dtは、0より大きく、輝度値の最大値(例えば255)より小さい値に設定される。閾値dが判定閾値dtより大きい場合、ステップS110の処理が実行される。一方、閾値dが判定閾値dt以下の場合、特徴量算出部122は、ステップS108で決定された閾値dを、画素ペア管理テーブル112における該当画素ペアのレコードの閾値dの項目に登録する。その後、ステップS111の処理が実行される。
 [ステップS110]特徴量算出部122は、ステップS108で決定された閾値dを0に変更する。特徴量算出部122は、変更後の閾値dを、画素ペア管理テーブル112aにおける該当画素ペアのレコードの閾値dの項目に登録する。
 ここで、閾値dが判定閾値dtより大きい場合(ステップS109で“Yes”と判定される場合)とは、ヒストグラムの輝度値0付近に画素ペアが集中していない場合である。この場合、該当画素ペアの輝度値が0付近になる可能性が低いと推定される。そこで、閾値dを0にすることで、該当画素ペアのビット値については、図12のビット値決定法1のように輝度値の符号を決定されるようになる。これにより、該当画素ペアのビット値を決定する際の計算負荷を低減できる。
 [ステップS111]特徴量算出部122は、画素ペア管理テーブル112に登録されたすべての画素ペアについて処理済みかを判定する。処理済みでない画素ペアがある場合、ステップS102に戻り、他の画素ペアが選択される。一方、すべての画素ペアについて処理済みの場合、図19の処理が実行される。
 図19に示す処理は、図15の処理のうち、ステップS64,S65の処理をステップS64a,S64b,S65aの処理に置き換えたものである。以下、ステップS64a,S64b,S65aの処理についてのみ説明し、図15と同じその他のステップの処理についての説明を省略する。
 [ステップS64a]特徴量算出部122は、画素ペア管理テーブル112aから、ステップS63で選択した画素ペアに対応する閾値dを読み込む。
 [ステップS64b]特徴量算出部122は、ステップS63で選択した画素ペアについて算出された輝度差と、ステップS64aで読み込んだ閾値dとの比較に基づいて、この画素ペアに対応するビット値を決定する。例えば、特徴量算出部122は、輝度差が閾値dより大きい場合には、ビット値を“1”とし、輝度差が閾値d以下である場合には、ビット値を“0”とする。
 [ステップS65a]特徴量算出部122は、ステップS62で選択された特徴点についての局所特徴量を示すビット列の下位に、ステップS64bで算出したビット値を付加する。
 以上説明した変形例によれば、次のような効果が得られる。画素ペアに含まれる第1の画素と第2の画素の各位置および画素間の位置関係は、画素ペアごとに異なる。このため、ビット値を決定するための最適な閾値dは、画素ペアごとに異なる可能性がある。上記の変形例によれば、複数の特徴領域のそれぞれにおける同じ画素ペアごとに輝度差が集計され、それらの輝度差の統計情報に基づいて閾値dが画素ペアごとに算出される。これにより、閾値dが最適化され、平坦な画像領域における局所特徴量が撮影状況のわずかな違いによって変動する現象が発生しにくくなる。その結果、特徴点同士の類似判定の精度が向上し、最終的な画像認識精度も向上する。
 〔第3の実施の形態〕
 図20は、第3の実施の形態に係る画像処理システムの構成例を示す図である。図20に示す画像処理システムは、端末装置300とサーバ装置400とを含む。
 端末装置300は、例えば、携帯電話、スマートフォン、デジタルカメラ、パーソナルコンピュータなどである。端末装置300は、ネットワークを介してサーバ装置400にアクセスすることができる。端末装置300は、画像の撮像機能を有するとともに、撮像画像の特徴量を算出することができる。そして、端末装置300は、撮像画像に特徴量を付加してサーバ装置400に送信する。
 サーバ装置400は、端末装置300から送信された撮像画像を蓄積する。また、サーバ装置400は、撮像画像とともに受信した特徴量を用いて画像認識を行い、蓄積している撮像画像の間で類似する撮像画像のペアを判別する機能を有する。
 上記の画像処理システムは、例えば、ユーザが端末装置300を利用して撮像した撮像画像をサーバ装置400が管理する写真管理サービスなどに適用できる。この場合、サーバ装置400は、撮像画像を単に蓄積するだけでなく、類似する撮像画像を検索することで、同じ対象物が写っている撮像画像にタグ付けするなどの付加サービスを提供することもできる。
 図21は、端末装置のハードウェア構成例を示す図である。端末装置300は、プロセッサ301によって装置全体が制御されている。プロセッサ301は、マルチプロセッサであってもよい。プロセッサ301は、例えばCPU、MPU、DSP、ASICまたはPLDである。また、プロセッサ301は、CPU、MPU、DSP、ASIC、PLDのうちの2以上の要素の組み合わせであってもよい。
 プロセッサ301には、バス309を介して、RAM302と複数の周辺機器が接続されている。
 RAM302は、端末装置300の主記憶装置として使用される。RAM302には、プロセッサ301に実行させるOSプログラムやアプリケーションプログラムの少なくとも一部が一時的に格納される。また、RAM302には、プロセッサ301による処理に必要な各種データが格納される。
 バス309に接続されている周辺機器としては、フラッシュメモリ303、カメラ304、表示装置305、入力装置306、読み取り装置307および通信インタフェース308がある。
 フラッシュメモリ303は、端末装置300の補助記憶装置として使用される。フラッシュメモリ303には、OSプログラム、アプリケーションプログラム、および各種データが格納される。なお、補助記憶装置としては、HDDなどの他の種類の不揮発性記憶装置を使用することもできる。
 表示装置305は、プロセッサ301からの命令にしたがって画像を表示する。表示装置305としては、液晶ディスプレイや有機ELディスプレイなどがある。
 入力装置306は、ユーザによる入力操作に応じた信号をプロセッサ301に送信する。入力装置306としては、キーボードやポインティングデバイスなどがある。ポインティングデバイスとしては、マウス、タッチパネル、タブレット、タッチパッド、トラックボールなどがある。
 読み取り装置307には、可搬型記録媒体307aが脱着される。読み取り装置307は、可搬型記録媒体307aに記録されたデータを読み取ってプロセッサ301に送信する。可搬型記録媒体307aとしては、光ディスク、光磁気ディスク、半導体メモリなどがある。
 通信インタフェース308は、ネットワークを介して他の装置(例えば、サーバ装置400)との間でデータの送受信を行う。
 以上のようなハードウェア構成によって、端末装置300の処理機能を実現することができる。なお、図示を省略するが、サーバ装置400は、例えば、図2に示した画像処理装置100と同様のハードウェア構成を有するコンピュータとして実現される。
 図22は、端末装置およびサーバ装置の処理機能の構成例を示すブロック図である。なお、図22では、図3と同様の構成要素については同じ符号を付して示し、その説明を省略する。
 端末装置300は、記憶部310、画像撮像部321、特徴量算出部322および送信部323を有する。
 記憶部310は、端末装置300が備える記憶装置(例えば、RAM302またはフラッシュメモリ303)の記憶領域として実装される。記憶部310には、図3と同様の画像データ111、画素ペア管理テーブル112および特徴量管理テーブル113が記憶される。なお、画像データ111は、画像撮像部321によって撮像された撮像画像のデータである。
 画像撮像部321、特徴量算出部322および送信部323の処理は、例えば、所定のプログラムがプロセッサ301に実行されることによって実現される。
 画像撮像部321は、カメラ304を制御することで画像を撮像する。画像撮像部321は、撮像された撮像画像についての画像データ111を記憶部310に格納する。
 特徴量算出部322は、図3の特徴量算出部122と同様の処理を実行する。すなわち、特徴量算出部322は、画像データ111および画素ペア管理テーブル112を参照しながら、撮像画像内の各特徴点についての局所特徴量を算出し、算出した局所特徴量を特徴量管理テーブル113に登録する。なお、特徴量算出部322は、図18,図19で説明した変形例による処理手順によって局所特徴量を算出してもよい。
 送信部323は、記憶部310に記憶された各画像データ111を、特徴量管理テーブル113に記録された対応する特徴量情報とともにサーバ装置400に送信する。
 一方、サーバ装置400は、記憶部410、受信部421および画像認識部422を有する。
 記憶部410は、サーバ装置400が備える記憶装置の記憶領域として実装される。記憶部410には、端末装置300から受信した画像データ111およびこれらに対応する特徴量情報が記憶される。なお、受信した特徴量情報の記憶の仕方は特に限定されないが、図22では例として、受信した特徴量情報は、端末装置300の特徴量管理テーブル113と同様の形式で管理されている。
 受信部421および画像認識部422の処理は、例えば、所定のプログラムがサーバ装置400のプロセッサに実行されることによって実現される。
 受信部421は、端末装置300から特徴量情報とともに送信された画像データ111を受信する。受信部421は、受信した画像データ111を記憶部410に格納するとともに、受信した特徴量情報を記憶部410の特徴量管理テーブル113に登録する。
 画像認識部422は、図3の画像認識部123と同様の処理を実行する。すなわち、画像認識部422は、特徴量管理テーブル113を参照しながら、選択されたキー画像以外の撮像画像の中からキー画像と類似する類似画像を検索する。なお、キー画像は、ユーザの操作によって選択されてもよいし、画像認識部422が記憶部410に記憶された撮像画像から自動的に順番にキー画像を選択していってもよい。
 以上の第3の実施の形態では、端末装置300において撮像画像の局所特徴量が算出される際に、輝度差が小さい画素ペアについては局所特徴量のビット値が安定的に0と決定される。したがって、サーバ装置400においてこのように算出された局所特徴量を用いた画像認識処理が実行されることで、その認識精度が向上する。
 なお、上記の各実施の形態に示した装置(画像処理装置1,100、端末装置300およびサーバ装置400)の処理機能は、コンピュータによって実現することができる。その場合、各装置が有すべき機能の処理内容を記述したプログラムが提供され、そのプログラムをコンピュータで実行することにより、上記処理機能がコンピュータ上で実現される。処理内容を記述したプログラムは、コンピュータで読み取り可能な記録媒体に記録しておくことができる。コンピュータで読み取り可能な記録媒体としては、磁気記憶装置、光ディスク、光磁気記録媒体、半導体メモリなどがある。磁気記憶装置には、ハードディスク装置(HDD)、フレキシブルディスク(FD)、磁気テープなどがある。光ディスクには、DVD(Digital Versatile Disc)、DVD-RAM、CD-ROM(Compact Disc-Read Only Memory)、CD-R(Recordable)/RW(ReWritable)などがある。光磁気記録媒体には、MO(Magneto-Optical disk)などがある。
 プログラムを流通させる場合には、例えば、そのプログラムが記録されたDVD、CD-ROMなどの可搬型記録媒体が販売される。また、プログラムをサーバコンピュータの記憶装置に格納しておき、ネットワークを介して、サーバコンピュータから他のコンピュータにそのプログラムを転送することもできる。
 プログラムを実行するコンピュータは、例えば、可搬型記録媒体に記録されたプログラムまたはサーバコンピュータから転送されたプログラムを、自己の記憶装置に格納する。そして、コンピュータは、自己の記憶装置からプログラムを読み取り、プログラムに従った処理を実行する。なお、コンピュータは、可搬型記録媒体から直接プログラムを読み取り、そのプログラムに従った処理を実行することもできる。また、コンピュータは、ネットワークを介して接続されたサーバコンピュータからプログラムが転送されるごとに、逐次、受け取ったプログラムに従った処理を実行することもできる。
 上記については単に本発明の原理を示すものである。さらに、多数の変形、変更が当業者にとって可能であり、本発明は上記に示し、説明した正確な構成および応用例に限定されるものではなく、対応するすべての変形例および均等物は、添付の請求項およびその均等物による本発明の範囲とみなされる。
 1 画像処理装置
 1a 記憶部
 1b 演算部
 10,20 画像
 10a,20a 特徴情報
 11a,11b 特徴領域
 12a,12b 局所特徴量
 21a,21b,22a,22b 画素ペア
 30 設定範囲

Claims (6)

  1.  コンピュータに、
     画像内の特徴領域に設定された複数の画素ペアのそれぞれに含まれる画素間の輝度差を算出し、
     前記輝度差に基づいて、前記複数の画素ペアにそれぞれ対応するビットを有する、前記特徴領域についての局所特徴量を算出する、
     処理を実行させ、
     前記局所特徴量の算出は、前記輝度差のうち、前記局所特徴量に含まれる一のビットに対応する前記画素ペアを基に算出された一の輝度差と、0を挟んで設定された設定範囲とを比較し、前記一の輝度差が前記設定範囲の上限より大きい場合には、前記一のビットの値を第1の値に決定し、前記一の輝度差が前記設定範囲の下限より小さい場合には、前記一のビットの値を第2の値に決定し、前記一の輝度差が前記設定範囲に含まれる場合には、前記一のビットの値を前記第1の値と前記第2の値のうちあらかじめ決められた一方の値に決定する処理を含む、
     画像処理プログラム。
  2.  前記コンピュータに、
     前記複数の画素ペアと同じ位置関係を有する複数の他の画素ペアが設定された1以上のサンプル画像を用い、前記複数の他の画素ペアのそれぞれに含まれる画素間の輝度差の分布に基づいて前記設定範囲を設定する、
     処理をさらに実行させる請求項1記載の画像処理プログラム。
  3.  前記設定範囲の設定では、前記複数の他の画素ペアのそれぞれに含まれる画素間の輝度差のヒストグラムにおいて、輝度差0を中心とした範囲に含まれる前記画素ペアの数が、前記サンプル画像に含まれる前記画素ペアの総数の所定割合となるような前記範囲を、前記設定範囲に設定する、
     請求項2記載の画像処理プログラム。
  4.  前記設定範囲は、前記画素ペアごとに個別に設定され、
     前記一の輝度差と前記設定範囲との比較では、前記一のビットに対応する前記画素ペアに対して設定された前記設定範囲が使用される、
     請求項1記載の画像処理プログラム。
  5.  前記コンピュータに、
     前記局所特徴量と、他の画像に複数設定された他の特徴領域にそれぞれ対応する他の局所特徴量との比較結果に基づいて、前記他の特徴領域の中から前記特徴領域に類似する類似領域を特定する、
     処理をさらに実行させる請求項1乃至4のいずれか1項に記載の画像処理プログラム。
  6.  複数の画素ペアが設定された特徴領域を有する画像を記憶する記憶部と、
     前記複数の画素ペアのそれぞれに含まれる画素間の輝度差を算出し、前記輝度差に基づいて、前記複数の画素ペアにそれぞれ対応するビットを有する、前記特徴領域についての局所特徴量を算出する演算部と、
     を有し、
     前記局所特徴量の算出は、前記輝度差のうち、前記局所特徴量に含まれる一のビットに対応する前記画素ペアを基に算出された一の輝度差と、0を挟んで設定された設定範囲とを比較し、前記一の輝度差が前記設定範囲の上限より大きい場合には、前記一のビットの値を第1の値に決定し、前記一の輝度差が前記設定範囲の下限より小さい場合には、前記一のビットの値を第2の値に決定し、前記一の輝度差が前記設定範囲に含まれる場合には、前記一のビットの値を前記第1の値と前記第2の値のうちあらかじめ決められた一方の値に決定する処理を含む、
     画像処理装置。
PCT/JP2015/078027 2015-10-02 2015-10-02 画像処理プログラムおよび画像処理装置 WO2017056312A1 (ja)

Priority Applications (3)

Application Number Priority Date Filing Date Title
PCT/JP2015/078027 WO2017056312A1 (ja) 2015-10-02 2015-10-02 画像処理プログラムおよび画像処理装置
JP2017542656A JP6465215B2 (ja) 2015-10-02 2015-10-02 画像処理プログラムおよび画像処理装置
US15/704,787 US10339418B2 (en) 2015-10-02 2017-09-14 Computer-readable storage medium storing image processing program and image processing apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/JP2015/078027 WO2017056312A1 (ja) 2015-10-02 2015-10-02 画像処理プログラムおよび画像処理装置

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US15/704,787 Continuation US10339418B2 (en) 2015-10-02 2017-09-14 Computer-readable storage medium storing image processing program and image processing apparatus

Publications (1)

Publication Number Publication Date
WO2017056312A1 true WO2017056312A1 (ja) 2017-04-06

Family

ID=58423122

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2015/078027 WO2017056312A1 (ja) 2015-10-02 2015-10-02 画像処理プログラムおよび画像処理装置

Country Status (3)

Country Link
US (1) US10339418B2 (ja)
JP (1) JP6465215B2 (ja)
WO (1) WO2017056312A1 (ja)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2019046010A (ja) * 2017-08-31 2019-03-22 富士通株式会社 情報処理装置、情報処理方法、及びプログラム

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9048560B2 (en) * 2013-01-29 2015-06-02 Avx Corporation Modular electrical connector assembly and associated method of making
US10621446B2 (en) * 2016-12-22 2020-04-14 Texas Instruments Incorporated Handling perspective magnification in optical flow processing
JP2019016065A (ja) * 2017-07-04 2019-01-31 キヤノン株式会社 画像処理装置およびその制御方法
JP6955156B2 (ja) * 2017-10-23 2021-10-27 富士通株式会社 画像処理プログラム、画像処理装置および画像処理方法
KR20200081367A (ko) * 2017-11-09 2020-07-07 소니 주식회사 화상 처리 장치와 화상 처리 방법
DE102018114090A1 (de) * 2018-06-13 2019-12-19 SURFACE CONCEPT GmbH Bildverarbeitungsvorrichtung und Verfahren zur Bildverarbeitung, insbesondere für ein superauflösendes Mikroskop

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2010087124A1 (ja) * 2009-01-29 2010-08-05 日本電気株式会社 特徴量選択装置
JP2015036929A (ja) * 2013-08-15 2015-02-23 三星電子株式会社Samsung Electronics Co.,Ltd. 画像特徴抽出装置、画像特徴抽出方法、画像特徴抽出プログラム及び画像処理システム
US20150262382A1 (en) * 2014-03-13 2015-09-17 Omron Corporation Image processing apparatus and image processing method

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4479478B2 (ja) * 2004-11-22 2010-06-09 株式会社日立製作所 パターン認識方法および装置
JP2011128990A (ja) * 2009-12-18 2011-06-30 Canon Inc 画像処理装置とその方法
JP6281207B2 (ja) 2013-08-14 2018-02-21 富士通株式会社 情報処理装置、情報処理方法、及びプログラム
JP6202937B2 (ja) 2013-08-21 2017-09-27 キヤノン株式会社 画像認識装置、画像認識方法、及びコンピュータプログラム
JP6997369B2 (ja) * 2017-02-28 2022-02-04 富士通株式会社 プログラム、測距方法、及び測距装置

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2010087124A1 (ja) * 2009-01-29 2010-08-05 日本電気株式会社 特徴量選択装置
JP2015036929A (ja) * 2013-08-15 2015-02-23 三星電子株式会社Samsung Electronics Co.,Ltd. 画像特徴抽出装置、画像特徴抽出方法、画像特徴抽出プログラム及び画像処理システム
US20150262382A1 (en) * 2014-03-13 2015-09-17 Omron Corporation Image processing apparatus and image processing method

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2019046010A (ja) * 2017-08-31 2019-03-22 富士通株式会社 情報処理装置、情報処理方法、及びプログラム

Also Published As

Publication number Publication date
JP6465215B2 (ja) 2019-02-06
JPWO2017056312A1 (ja) 2018-02-01
US10339418B2 (en) 2019-07-02
US20180005080A1 (en) 2018-01-04

Similar Documents

Publication Publication Date Title
JP6465215B2 (ja) 画像処理プログラムおよび画像処理装置
US20110311100A1 (en) Method, Apparatus and Computer Program Product for Providing Object Tracking Using Template Switching and Feature Adaptation
CN111191591B (zh) 一种水印检测、视频处理方法和相关设备
AU2012202352A1 (en) Method, system and apparatus for determining a hash code representing a portion of an image
CN101286230A (zh) 图像处理设备和图像处理方法
US10706581B2 (en) Image processing apparatus for clipping and sorting images from read image according to cards and control method therefor
CN111047496A (zh) 阈值确定方法、水印检测方法、装置和电子设备
JP6347155B2 (ja) 画像処理装置、画像判断方法、及びプログラム
US20230161989A1 (en) Method and system for setting dynamic image threshold for two-dimensional identification code detection
JP6565661B2 (ja) 画像処理システム、画像類似判定方法および画像類似判定プログラム
US10509986B2 (en) Image similarity determination apparatus and image similarity determination method
US9286682B1 (en) Aligning multi-view scans
US20130322748A1 (en) Method for creating thumbnail images of videos and an electronic device for display thereof
US10853972B2 (en) Apparatus for processing image and method thereof
JP6485072B2 (ja) 画像探索装置、画像探索方法および画像探索プログラム
US11593582B2 (en) Method and device for comparing media features
JP6244887B2 (ja) 情報処理装置、画像探索方法、及びプログラム
JP6485084B2 (ja) 画像探索装置、画像探索方法および画像探索プログラム
US20140300790A1 (en) Image processing apparatus, and non-transitory computer readable medium storing image processing program
KR102467036B1 (ko) 2차원 식별코드 검출을 위한 동적 영상 임계치 설정 방법 및 그 시스템
JP2016045837A (ja) 情報処理装置、画像判定方法、及びプログラム
JP5440043B2 (ja) 画像処理装置及び画像処理プログラム
JP2016045538A (ja) 情報処理装置、画像判定方法、及びプログラム
JP6770227B2 (ja) 画像処理装置、画像領域検出方法および画像領域検出プログラム
JP2011141664A (ja) 文書比較装置、文書比較方法、及びプログラム

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 15905465

Country of ref document: EP

Kind code of ref document: A1

ENP Entry into the national phase

Ref document number: 2017542656

Country of ref document: JP

Kind code of ref document: A

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 15905465

Country of ref document: EP

Kind code of ref document: A1