APPARATUS AND METHOD FOR RAW-COST CALCULATION USING ADAPTIVE WINDOW MASK
20170116739 ยท 2017-04-27
Inventors
Cpc classification
G06V10/7515
PHYSICS
G06T7/44
PHYSICS
International classification
Abstract
Disclosed is an apparatus and method for calculating a raw-cost necessary for combining images into one image by matching of stereo images. The raw-cost calculation apparatus includes an image acquirer, a window generator, a window mask generator, a window masker, and a raw-cost calculator. In the raw-cost calculation apparatus and method, a raw cost may be calculated by using an adaptive window mask so that accurate 3D information may be obtained on the boundary of thin structures even when stereo images are matched and combined.
Claims
1. A raw-cost calculation apparatus using an adaptive window mask, the apparatus comprising: an image acquirer configured to acquire image information that includes pattern and texture information of a reference image, and pattern and texture information of a target image; a window generator configured to generate a plurality of windows, each including at least one pixel, by receiving the texture information, included in the acquired image information, from a user, or by dividing the texture information by a predetermined size; a window mask generator configured to generate a window mask, which has a same size as a size of the generated windows, and is capable of converting the pattern information, included in the acquired image information, according to a predetermined algorithm; a window masker configured to perform masking of the reference image and the target image the by using the generated window mask to convert the pattern information of the reference image and the pattern information of the target image included in the acquired image information; and a raw-cost calculator configured to match pattern information of the masked reference image and pattern information of the masked target image to calculate a difference, and to calculate a raw cost based on the difference.
2. The apparatus of claim 1, wherein the window generator generates windows having a size determined depending on resolution of a received texture image or types of objects of the texture image, or according to predetermined criteria.
3. The apparatus of claim 1, wherein the window mask generator generates the window mask that includes a set value for masking, wherein the set value for masking varies depending on a camera setting of the received texture image, a light amount, a state of lighting, and image resolution.
4. The apparatus of claim 3, wherein the window mask generator generates the window mask that includes all pixels of windows in response to the set value for masking being greater than a predetermined value.
5. The apparatus of claim 1, wherein by assuming that an absolute difference, calculated by matching windows of the generated reference image and windows of the target image, on an X axis is defined as W, an absolute difference on a Y axis is defined as H, and a maximum absolute difference between images having the X axis and Y axis is defined as D, the raw cost calculator calculates a volume of the raw cost by using the defined values W, H, and D and according to a predetermined algorithm, and calculates a final raw cost by combining the calculated volume of raw cost with adjacent pixels.
6. A raw-cost calculation method using an adaptive window mask, the method comprising: acquiring image information that includes pattern and texture information of a reference image, and pattern and texture information of a target image; generating a plurality of windows, each including at least one pixel, by receiving the texture information, included in the acquired image information, from a user, or by dividing the texture information by a predetermined size; generating a window mask, which has a same size as a size of the generated windows, and is capable of converting the pattern information, included in the acquired image information, according to a predetermined algorithm; performing masking of the reference image and the target image by using the generated window mask to convert the pattern information of the reference image and the pattern information of the target image included in the acquired image information; and matching pattern information of the masked reference image and pattern information of the masked target image to calculate a difference, and calculating a raw cost based on the difference.
7. The method of claim 6, wherein the generating of the plurality of windows comprises determining a size of windows depending on resolution of a received texture image or types of objects of the texture image, or according to predetermined criteria.
8. The method of claim 6, wherein the generating of the window mask comprises generating the window mask that includes a set value for masking, wherein the set value for masking varies depending on a camera setting of the received texture image, a light amount, a state of lighting, and image resolution.
9. The method of claim 8, wherein the generating of the window mask comprises generating the window mask that includes all pixels of windows in response to the set value for masking being greater than a predetermined value.
10. The method of claim 6, wherein by assuming that an absolute difference, calculated by matching windows of the generated reference image and windows of the target image, on an X axis is defined as W, an absolute difference on a Y axis is defined as H, and a maximum absolute difference between images having the X axis and Y axis is defined as D, the calculation of the raw cost comprises calculating a volume of the raw cost by using the defined values W, H, and D and according to a predetermined algorithm, and calculating a final raw cost by combining the calculated volume of raw cost with adjacent pixels.
Description
BRIEF DESCRIPTION OF THE DRAWINGS
[0019]
[0020]
[0021]
[0022]
[0023]
[0024]
[0025]
[0026]
[0027]
[0028] Throughout the drawings and the detailed description, unless otherwise described, the same drawing reference numerals will be understood to refer to the same elements, features, and structures. The relative size and depiction of these elements may be exaggerated for clarity, illustration, and convenience.
DETAILED DESCRIPTION
[0029] The following description is provided to assist the reader in gaining a comprehensive understanding of the methods, apparatuses, and/or systems described herein. Accordingly, various changes, modifications, and equivalents of the methods, apparatuses, and/or systems described herein will be suggested to those of ordinary skill in the art. Also, descriptions of well-known functions and constructions may be omitted for increased clarity and conciseness.
[0030] It will be further understood that the terms comprises and/or comprising, or includes and/or including when used in this specification, specify the presence of stated features, regions, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, regions, integers, steps, operations, elements, components, and/or groups thereof.
[0031] Hereinafter, the apparatus and method for raw-cost calculation using an adaptive window mask will be described with reference to the accompanying drawings.
[0032]
[0033] Referring to
[0034] The image acquirer 10 may acquire left and right images of an object desired to be photographed by using a stereo camera.
[0035] The stereo camera refers to a camera that may acquire two images of an object through two imaging lenses that are spaced apart with a specific distance therebetween.
[0036] When images captured by the stereo camera are combined by stereo matching, the combined image appears three-dimensional due to parallax caused by different viewpoints of two lenses.
[0037] The image preprocessor 20 may tune an epipolar line and brightness between left and right images by preprocessing such as noise removal or image correction.
[0038] The epipolar line refers to a line on a common plane, where two vectors of the position of cameras and an image point viewing the cameras are located, in images acquired from two stereo cameras based on a point defined as an object in a 3D image.
[0039] The raw-cost calculation apparatus 1000 acquires preprocessed images and classifies the images into pattern or texture images of a reference image or pattern or texture images of a target image. Then, the raw-cost calculation apparatus 1000 performs masking by generating windows and window masks from the classified images, and matches the masked images to obtain a disparity, so that a raw cost may be calculated based on the disparity.
[0040] The raw-cost calculation apparatus 1000 will be described in further detail with reference to
[0041] The difference value compensator 30 may generate a disparity map by using a calculated raw cost, and may perform stereo matching of a reference image and a target image by compensating for a difference value through the generated disparity map.
[0042] The disparity map may refer to an absolute difference, i.e., a disparity, which is obtained by matching a reference image and a target image.
[0043]
[0044] Referring to
[0045] The image information acquirer 100 may acquire image information that includes pattern and texture information of a reference image and pattern and texture information of a target image.
[0046] The texture refers to a two-dimensional (2D) image seen by rendering UV coordinates to a 3D object.
[0047] There are various types of textures according to usage, and examples thereof include: a color texture that includes color information regarding colors and textures; a normal texture that represents uneven or detailed shapes; a highlight texture used to represent light reflection to maximize texture representation; and an environment texture that represents the surrounding environment of an object.
[0048] The pattern refers to unique characteristics of data that are obtained by analyzing image data.
[0049] In one exemplary embodiment, by preparing a pattern of a reference image as a reference pattern, and by matching the reference pattern and a pattern of a target image, an absolute difference may be calculated.
[0050] The reference image may be an image selected between two images acquired by a stereo camera, and the other image may be defined as a target image.
[0051] The window generator 200 may generate a plurality of windows, each including at least one pixel, by receiving texture information, included in the acquired image information, from a user, or by dividing texture information by a predetermined size.
[0052] In one exemplary embodiment, the size of windows may be input from a user or may be predetermined, and the windows may be generated to be NN in size, with N number of rows and columns of pixels.
[0053] In this manner, windows may be generated by dividing texture images of a reference image and a target image by an NN size.
[0054] In one exemplary embodiment, the window size may be predetermined according to predetermined criteria, depending on resolution of a received texture image or the types of objects of a texture image.
[0055] The window mask generator 300 may have the same size as the size of generated windows, and may generate a window mask that may be used to convert pattern information, included in the acquired image information, according to a predetermined algorithm.
[0056] The window mask will be described in further detail with reference to
[0057]
[0058] Referring to
[0059] As illustrated in
[0060] In
[0061] Further, the window mask has nine values of 1/9 in a 33 array of pixels, with each 1/9 being multiplied by each pixel value in a 33 matrix window, and masking is performed by combining the multiplied values, such that the 33 matrix window is converted into a decimal number of 39.
[0062] The algorithm predetermined for the conversion may use a method of multiplying values in a window mask and combining multiplied values as illustrated in
[0063] In one exemplary embodiment, the mask may include a set value for masking, and the set value for masking may vary depending on a camera setting of a received texture image, a light amount, a state of lighting, and image resolution.
[0064] In the case where a set value for masking is greater than a predetermined value, a window mask that includes all the pixels in the window may be generated, and in the case where a set value for masking is lower than a predetermined value, a window mask having a predetermined number of pixels may be generated.
[0065] The set value for masking may be generated by calculating a difference between peripheral pixels and center pixels of a window.
[0066] The window masker 400 may perform masking of a reference image and a target image by using a generated window mask to convert pattern information of the reference image and pattern information of the target image.
[0067] In one exemplary embodiment, by masking pattern information using the generated window mask, an image of pattern information having an NN matrix may be converted into decimal numbers or binary numbers according to a predetermined algorithm.
[0068] The masking may be performed by using an algorithm for converting pattern information into decimal numbers as illustrated in
[0069]
[0070] Referring to
[0071] Pattern information may be converted into binary numbers by masking of a 33 matrix, in which eight numbers thus indicated are read from the left to the right one row after another.
[0072] The raw-cost calculator 500 may calculate a raw cost by calculating a difference obtained by matching pattern information of a masked target image with pattern information of a masked reference image.
[0073] In one exemplary embodiment, by preparing a pattern of a reference image as a reference pattern, and by comparing the reference pattern with a pattern of a target image (pattern matching), an absolute difference may be obtained, and a raw cost may be calculated based on the absolute difference.
[0074] The raw cost refers to a value of similarity between two images captured by two cameras disposed with a base line therebetween in stereo matching.
[0075] In order to indicate the similarity in numbers, an absolute difference between two images may be generated to be used as a raw cost.
[0076] The raw cost may be arrayed in a 3D matrix (widthheightdisparity).
[0077] An absolute difference will be described with reference to
[0078]
[0079] As illustrated in
[0080] A method of calculating an absolute difference will be described with reference to
[0081]
[0082] Referring to
[0083] A hamming distance may be used as a method of calculating an absolute difference, but the method is not limited thereto, and any method that may calculate a value of difference between images may also be used.
[0084]
[0085]
[0086] By defining an absolute difference d generated by matching windows S of a specific size, with the width and length defined as X, Y, a raw cost may be calculated by using
[0087] A Sum of Differences (SAD) may be used as a method of calculating a raw cost, but the method is not limited thereto, and any method that may calculate a raw cost by using a widthheightdisparity type.
[0088] In one exemplary embodiment, an absolute difference, calculated by matching windows of a generated reference image and windows of a target image, on an X axis is defined as W, an absolute difference on a Y axis is defined as H, and a maximum absolute difference between images having the X axis and Y axis is defined as D, and a volume of a raw cost may be calculated by using the defined values W, H, and D and according to a predetermined algorithm, and a final raw cost may be calculated by combining the calculated volume of raw cost with adjacent pixels.
[0089]
[0090] Referring to
[0091] In the case where there is no color difference between a center point of an object and adjacent pixels, as in an image with no object included in a background, windows are generated for an entire image, such that there is no difference from a case where no windows are used. However, in an image that includes the boundary of an object, there is a color difference between center pixels and adjacent pixels, such that it is desired to use windows to determine the image boundary more clearly, thereby enabling efficient calculation of a raw cost.
[0092]
[0093] Image information including a reference image and a target image is acquired in S10.
[0094] In one exemplary embodiment, image information may be acquired, which includes pattern and texture information of a reference image and pattern and texture information of a target image.
[0095] By preparing a pattern of a reference image as a reference pattern, and by matching the reference pattern and a pattern of a target image (pattern matching), an absolute difference may be calculated.
[0096] A plurality of windows are generated by using texture information included in the acquired image information in S20.
[0097] In one exemplary embodiment, by receiving texture information, included in the acquired image information, from a user, or by dividing texture information by a predetermined size, a plurality of windows, each having at least one pixel, may be generated.
[0098] In the exemplary embodiment, the size of windows may be input from a user or may be predetermined, and windows may be generated to be NN in size, with N number of rows and columns of pixels.
[0099] The size of windows may be predetermined according to predetermined criteria, depending on resolution of a received texture image, or the types of objects of a texture image.
[0100] A window mask, having the same size as the size of generated windows, is generated in S30.
[0101] In the exemplary embodiment, a window mask may be generated, which has the same size as the size of generated windows, and pattern information, included in the acquired image information, may be converted according to a predetermined algorithm.
[0102] In the exemplary embodiment, the window mask may include a set value for masking, and the set value for masking may vary depending on a camera setting of a received texture image, a light amount, a state of lighting, and image resolution.
[0103] In the exemplary embodiment, in the case where the set value for masking is greater than a predetermined value, a window mask, which includes all the pixels of windows, may be generated, and in the case where the set value for masking is lower than a predetermined value, a window mask having a predetermined number of pixels may be generated.
[0104] Masking of pattern information is performed by using the generated window mask in S40.
[0105] In the exemplary embodiment, the masking may be performed by using the generated window mask so that pattern information of a received reference image and pattern information of a target image may be converted.
[0106] In the exemplary embodiment, by masking pattern information using the generated window mask, an image of pattern information having an NN matrix may be converted into decimal numbers or binary numbers according to a predetermined algorithm.
[0107] A raw cost may be calculated based on a difference obtained by matching masked pattern information in S50.
[0108] In the exemplary embodiment, by matching pattern information of a masked reference image and pattern information of a masked target image, a difference between pattern information of the masked reference image and pattern information of the masked target image may be obtained, and a raw cost may be calculated based on the difference.
[0109] In the exemplary embodiment, by preparing a pattern of a reference image as a reference pattern, and by matching the reference pattern and a pattern of a target image, an absolute difference may be obtained, and a raw cost may be calculated based on the difference.
[0110] A number of examples have been described above. Nevertheless, it should be understood that various modifications may be made. For example, suitable results may be achieved if the described techniques are performed in a different order and/or if components in a described system, architecture, device, or circuit are combined in a different manner and/or replaced or supplemented by other components or their equivalents. Accordingly, other implementations are within the scope of the following claims. Further, the above-described examples are for illustrative explanation of the present invention, and thus, the present invention is not limited thereto.