WO2012056518A1 - 画像処理装置、画像処理方法及び画像処理プログラム - Google Patents

画像処理装置、画像処理方法及び画像処理プログラム Download PDF

Info

Publication number
WO2012056518A1
WO2012056518A1 PCT/JP2010/068975 JP2010068975W WO2012056518A1 WO 2012056518 A1 WO2012056518 A1 WO 2012056518A1 JP 2010068975 W JP2010068975 W JP 2010068975W WO 2012056518 A1 WO2012056518 A1 WO 2012056518A1
Authority
WO
WIPO (PCT)
Prior art keywords
image
value
luminance
input
conversion coefficient
Prior art date
Application number
PCT/JP2010/068975
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 US13/260,278 priority Critical patent/US8538192B2/en
Priority to CN201080014815.5A priority patent/CN102741878B/zh
Priority to JP2010542863A priority patent/JP4941950B1/ja
Priority to EP10848135.9A priority patent/EP2613290B1/en
Priority to PCT/JP2010/068975 priority patent/WO2012056518A1/ja
Publication of WO2012056518A1 publication Critical patent/WO2012056518A1/ja

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N1/00Scanning, transmission or reproduction of documents or the like, e.g. facsimile transmission; Details thereof
    • H04N1/387Composing, repositioning or otherwise geometrically modifying originals
    • H04N1/3876Recombination of partial images to recreate the original image
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T3/00Geometric image transformation in the plane of the image
    • G06T3/40Scaling the whole image or part thereof
    • G06T3/4038Scaling the whole image or part thereof for image mosaicing, i.e. plane images composed of plane sub-images
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N5/00Details of television systems
    • H04N5/222Studio circuitry; Studio devices; Studio equipment
    • H04N5/262Studio circuits, e.g. for mixing, switching-over, change of character of image, other special effects ; Cameras specially adapted for the electronic generation of special effects
    • H04N5/2624Studio circuits, e.g. for mixing, switching-over, change of character of image, other special effects ; Cameras specially adapted for the electronic generation of special effects for obtaining an image which is composed of whole input images, e.g. splitscreen

Definitions

  • the present invention relates to an image processing apparatus, an image processing method, and an image processing program.
  • Patent Documents 1 and 2 an apparatus that joins captured images to create a panoramic still image that is a single wide-angle still image is known (see, for example, Patent Documents 1 and 2).
  • the small region is template-matched in the region where the first image and the second image overlap.
  • Positioning is performed, gradation conversion is performed on the pixel value of at least one of the regions where the two images overlap, and the brightness in the region where the two images overlap is corrected so that the joint is not noticeable.
  • the present invention has been made to solve such a technical problem, and an image that can perform processing to make the joint of the image inconspicuous at low load when stitching together images having different exposure conditions. It is an object to provide a processing device, an image processing method, and an image processing program.
  • the image processing apparatus joins a first image configured by joining one image or a plurality of the images and an input second image each time the second image is input.
  • An image processing apparatus that sequentially generates a composite image, wherein a motion vector is acquired based on the immediately preceding input image input immediately before the second image and the second image among the images constituting the first image,
  • An overlapping area acquisition unit that acquires an overlapping area where the immediately preceding input image and the second image overlap based on the acquired motion vector, a luminance value of the first image in the overlapping area, and a luminance of the second image Based on the value, a luminance value conversion coefficient calculation that calculates a luminance conversion coefficient for converting the luminance value of the first image or the second image so that a change in the luminance value of the first image and the second image is small.
  • a composite image generation unit that converts the first image or the second image using the luminance conversion coefficient, and generates the composite image by connecting the first image and the second image. It is prepared for.
  • the overlapping region acquisition unit acquires a motion vector based on the second image and the immediately preceding input image input immediately before the second image, and based on the acquired motion vector, An overlapping area where the input image and the second image overlap is acquired, and the luminance value conversion coefficient calculation unit calculates the first image and the second image based on the luminance value of the first image and the luminance value of the second image in the overlapping area.
  • a luminance conversion coefficient for converting the luminance value of the first image or the second image is calculated so that a change in the luminance value of the first image or the second image is small, and the synthesized image generation unit converts the first image or the second image based on the luminance conversion coefficient. After conversion, both images are stitched together.
  • a luminance absolute value calculation unit that calculates a luminance absolute value of the second image, which is a ratio to the sum of luminance values, and the luminance value conversion coefficient calculation unit includes the first of the images constituting the first image.
  • the luminance value conversion of the second image that depends on the distance from the joint between the target image and the second image based on the luminance absolute value of the target image overlapping the two images and the luminance absolute value of the second image It is preferable to calculate the coefficient.
  • the luminance absolute value of the second image is one image constituting the first image, and the sum of the luminance values of the reference image that is used as a reference when calculating the luminance absolute value is used, without using the sum of the luminance values of the immediately preceding input image. Calculated based on the absolute luminance value. That is, it is not necessary to always record the sum of the luminance values of the reference image in order to calculate the absolute luminance value of the second image that is sequentially input. Therefore, the processing load can be reduced.
  • the luminance value conversion coefficient calculation unit sets the luminance value conversion coefficient so that the weight of the second image at the synthesis position (predetermined position in the synthesis campus) increases in proportion to the distance from the joint of the synthesis position. It is preferable to calculate.
  • the luminance value after conversion of the second image can be corrected so as to approach the original luminance value of the second image as the distance from the joint is increased.
  • the composite image generation unit determines the luminance value conversion coefficient at the composite position based on the distance from the joint of the composite position, and calculates the brightness value of the second image based on the determined brightness value conversion coefficient.
  • a correction function to be converted may be derived, and the luminance value of the second image used at the synthesis position may be calculated based on the correction function and the luminance value of the second image.
  • the correction function is a linear function in which the luminance value conversion coefficient is a proportional constant in a range where the pixel value before conversion and the pixel value after conversion are less than a predetermined threshold, and the pixel value before conversion or In a range in which the pixel value after conversion is equal to or greater than a predetermined threshold, it is preferable that the linear function is continuous with the linear function up to the threshold and passes through the maximum pixel value.
  • the correction function is a linear function that is continuous with the linear function up to the threshold and passes through the maximum pixel value. It is possible to generate a natural composite image while suppressing the calculation cost.
  • a motion vector is acquired based on the image input immediately before the second image among the images constituting the first image, and the second image, and the second image is acquired based on the acquired motion vector.
  • a center position acquisition unit that acquires position information of a first center point that is a center point of each image constituting one image and position information of a second center point that is a center point of the second image;
  • the generation unit acquires the first center point of an image that overlaps the second image among images constituting the first image, and acquires the position information of the first center point and the position of the second center point. Based on the information, it is preferable to connect the obtained perpendicular bisector of the first center point and the second center point as a joint between the first image and the second image to generate the composite image. It is.
  • the composite image generation unit is configured to obtain a pixel value within a range from a joint between the first image and the second image to a position separated by a predetermined distance and within a range narrower than the overlapping region. It is preferable to use a composite value of the pixel value of the first image and the pixel value of the second image.
  • the pixel value from the joint to a position away from the joint by a predetermined distance is a composite value, so that the joint can be made inconspicuous.
  • it is possible to calculate a composite value of pixel values using the second image after the luminance value is converted it is possible to avoid a significant change in the difference between the luminance values.
  • the first region is reduced while reducing the processing load by narrowing the composition region near the joint. The difference between the brightness values of the first image and the second image that become noticeable by narrowing the region can be corrected based on the brightness values of the first image and the second image in a region wider than the region where the pixels are combined. .
  • the image processing method joins a first image configured by joining one image or a plurality of the images and an input second image each time the second image is input.
  • An overlapping area acquisition step for acquiring an overlapping area where the immediately preceding input image and the second image overlap based on the acquired motion vector, a luminance value of the first image in the overlapping area, and a luminance of the second image Based on the value, a luminance conversion coefficient calculation for calculating a luminance conversion coefficient for converting the luminance value of the first image or the second image so that a change in the luminance value of the first image and the second image is small.
  • the image processing method according to the present invention has the same effects as those of the image processing apparatus of the present invention described above.
  • the image processing program causes a computer to input a first image composed of one image or a plurality of the images and an input second image each time the second image is input.
  • An image processing program that functions to sequentially generate a composite image by stitching together, based on the immediately preceding input image and the second image that are input immediately before the second image among the images constituting the first image
  • An overlap area acquisition unit that acquires an overlap area where the immediately preceding input image and the second image overlap based on the acquired motion vector, a luminance value of the first image in the overlap area, and Based on the luminance value of the second image, the luminance value of the first image or the second image is converted so that the change in the luminance value of the first image and the second image is small.
  • the image processing program according to the present invention has the same effects as those of the image processing apparatus of the present invention described above.
  • the image processing apparatus is an apparatus that sequentially creates a single image by joining input images every time it is input. For example, a plurality of continuously captured images are joined in real time. This is suitably employed when generating a panoramic image having a wider angle than the captured image.
  • the image processing apparatus according to the present embodiment is preferably mounted on a mobile terminal with limited resources such as a mobile phone, a digital camera, and a PDA (Personal Digital Assistant), but is not limited thereto. For example, it may be mounted on a normal computer system.
  • a mobile terminal having a camera function will be described as an example of the image processing apparatus according to the present invention in consideration of ease of understanding.
  • FIG. 1 is a functional block diagram of a mobile terminal 2 including an image processing apparatus 1 according to the present embodiment.
  • a mobile terminal 2 shown in FIG. 1 is a mobile terminal carried by a user, for example, and has a hardware configuration shown in FIG.
  • FIG. 2 is a hardware configuration diagram of the mobile terminal 2.
  • the portable terminal 2 physically includes a main storage device such as a CPU (Central Processing Unit) 100, a ROM (Read Only Memory) 101, and a RAM (Random Access Memory) 102, a camera, a keyboard, and the like.
  • the input device 103, the output device 104 such as a display, the auxiliary storage device 105 such as a hard disk, and the like are configured as a normal computer system.
  • Each function of the portable terminal 2 and the image processing apparatus 1 to be described later causes the input device 103 and the output device 104 to be controlled under the control of the CPU 100 by reading predetermined computer software on hardware such as the CPU 100, the ROM 101, and the RAM 102. This is realized by operating and reading and writing data in the main storage device and the auxiliary storage device 105.
  • the image processing apparatus 1 normally includes a CPU 100, a main storage device such as the ROM 101 and the RAM 102, an input device 103, an output device 104, an auxiliary storage device 105, and the like. It may be configured as a computer system.
  • the mobile terminal 2 may include a communication module or the like.
  • the mobile terminal 2 includes a camera 30, an image processing device 1, and a display unit 31.
  • the camera 30 has a function of capturing an image.
  • an image sensor or the like is used as the camera 30.
  • the camera 30 has a continuous imaging function that repeatedly captures images at a predetermined interval from a timing specified by a user operation or the like, for example.
  • the user can slide the camera 30 to capture continuous images that overlap at least vertically and horizontally.
  • the camera 30 has a function of outputting a captured image to the image processing apparatus 1 every time it is captured.
  • the image processing apparatus 1 includes an image input unit 10, a center position acquisition unit 11, a composite image generation unit 12, a center position storage unit 13, an overlapping region acquisition unit 14, a luminance absolute value calculation unit 15, and a luminance value conversion coefficient calculation unit 16. I have.
  • the image input unit 10 has a function of inputting an image captured by the camera 30.
  • the image input unit 10 has a function of inputting, for example, an image captured by the camera 30 every time it is captured.
  • the image input unit 10 also has a function of saving the first input image in a first temporary storage area provided in the mobile terminal 2.
  • the image input unit 10 has a function of saving images input continuously from the next time in a second temporary storage area provided in the mobile terminal.
  • the second temporary storage area is updated each time a new image is input, and the first temporary storage area is overwritten and saved with an image (intermediate composite image) that is sequentially combined each time an image is input.
  • the image stored in the first temporary storage area is described as a first image
  • the image stored in the second temporary storage area is described as a second image.
  • the overlapping area acquisition unit 14 has a function of detecting the motion (motion vector) of the camera based on the input image and the image (immediately input image) input immediately before the input image.
  • the overlapping area acquisition unit 14 has a function of acquiring an overlapping area between the input image and the image input immediately before the input image based on the obtained motion vector.
  • 3 and 4 are schematic diagrams for explaining the overlapping region. As shown in FIG. 3, an overlapping region R1 between the first image F1 and the second image F2 can be calculated based on the camera movement. Also, as shown in FIG. 4, when the first image is composed of a plurality of images F1 and F2, the image input immediately before the second image F3 and the second image F3 based on the movement of the camera.
  • An overlapping region R2 with F2 can be calculated.
  • the overlapping regions R1 and R2 are rectangular regions, and identification thereof is extremely easy.
  • the overlapping area acquisition unit 14 has a function of outputting the overlapping area information to the luminance absolute value calculation unit 15.
  • the luminance absolute value calculation unit 15 has a function of calculating the luminance absolute value of the input image.
  • the luminance absolute value is a luminance value calculated based on the luminance value of a certain image.
  • the reference image is not particularly limited, but here, the first image that is input first and stored in the first temporary storage area will be described as a reference.
  • the luminance absolute value is calculated based on the sum of luminance values in the overlapping area specified by the overlapping area acquisition unit 14. In other words, the luminance absolute value calculation unit 15 calculates the sum of the luminance values of the second image included in the overlapping region and the luminance value of the immediately preceding input image included in the overlapping region, and the ratio of the sum of the luminance values of the two images.
  • the absolute luminance value of the second image is calculated based on the absolute luminance value of the immediately preceding input image. Assuming that the sum of the luminance values of the second image included in the overlapping area is S 2 , the sum of the luminance values of the immediately preceding input images included in the overlapping area is S 1 , and the absolute luminance value of the immediately preceding input image is H 1 , the second image luminance absolute value of H 2 is calculated using equation 1 below. Note that a predetermined value is used as the absolute luminance value of the first image first input and stored in the first temporary storage area, for example, 1.
  • the luminance absolute value calculation unit 15 has a function of outputting the calculated luminance absolute value to the luminance value conversion coefficient calculation unit 16.
  • the center position acquisition unit 11 has a function of acquiring the position information of the center point of the image (the initial first image or the second image) input by the image input unit 10.
  • the center point is a point that is uniquely determined from the outer edge of the image.
  • the position information may be position information associated with the real space, or may be relative position information associated with images input continuously.
  • the center position acquisition unit 11 has a function of detecting a camera motion (motion vector) based on the input image and the image input immediately before it in order to acquire the position information.
  • the center position acquisition unit 11 has a function of calculating the position information of the center point of the input image based on the obtained motion vector and the position information of the center point of the image input immediately before. .
  • the center position acquisition unit 11 acquires the position information of the center point only for the first input image (initial first image), and the subsequent input image (second image).
  • the position information of the center point is acquired based on the motion vector obtained using the input image and the image immediately before the input. For example, for the second image input at the nth time (n> 1), a motion vector is acquired using the second image and the second image input at the (n-1) th time, and based on the acquired motion vector The position information of the center point of the second image input for the nth time is acquired.
  • the center position acquisition unit 11 may calculate the motion vector by using the image which is not only the image input immediately before but the image input immediately before, and further reduces only the luminance element.
  • the center point of each image constituting the first image will be described as the first center point
  • the center point of the second image will be described as the second center point.
  • the center position acquisition unit 11 has a function of outputting the acquired position information of the center point to the composite image generation unit 12.
  • the composite image generation unit 12 has a function of generating a composite image obtained by connecting the input image (second image) and the already input image (first image). Part 122 is provided.
  • the distance calculation unit 121 has a function of specifying an image that overlaps the second image among the images constituting the first image based on, for example, the motion vector acquired by the center position acquisition unit 11. Then, the distance calculation unit 121 specifies the first center point closest to the predetermined position of the image that overlaps the second image, and calculates the distance between the specified first center point and the second center point of the second image. It has a function.
  • the predetermined position may be a position at a grid point arranged in a grid pattern. For example, lattice points are arranged in the composite image (here, the first image) to obtain the above-described predetermined position.
  • the distance calculation unit 121 specifies the first center point closest to the grid point for each grid point before calculating the distance between the first center point and the second center point, and stores the first center point in the center position storage unit 13 in advance.
  • Has the function of storing That is, the center position storage unit 13 stores a lattice point included in the first image and the first center point closest to the lattice point in association with each other.
  • the distance calculation unit 121 identifies an image that overlaps the input second image among the images constituting the first image, refers to the center position storage unit 13, and is closest to the identified grid point. One center point is acquired.
  • the distance calculation unit 121 calculates the distance between the first center point and the second center point that are different for each lattice point.
  • the distance calculation unit 121 has a function of outputting the calculated distance to the synthesis unit 122.
  • the distance calculation unit 121 also has a function of outputting the coordinate information and the like of the first center point and the second center point used for calculating the distance to the luminance value conversion coefficient calculation unit 16.
  • the luminance value conversion coefficient calculation unit 16 has a function of calculating a luminance value conversion coefficient that is a coefficient of a correction function for converting a luminance value.
  • the luminance value conversion coefficient calculation unit 16 joins the target image and the second image based on the luminance absolute value of the target image that overlaps the second image among the images constituting the first image and the luminance absolute value of the second image.
  • the luminance value conversion coefficient calculation unit 16 specifies a vertical bisector that is a joint between the first image and the second image, based on positional information between the first center point and the second center point.
  • the luminance value conversion coefficient calculation unit 16 calculates the luminance value conversion coefficient J using the following Expression 2.
  • the brightness absolute value in H ex is combined position (predetermined position in the composite campus)
  • H 2 is the brightness absolute value of the second image
  • luminance absolute value of H f is the target image
  • D 0 is the perpendicular bisector
  • the luminance value conversion coefficient calculation unit 16 has a function of calculating the luminance value conversion coefficient so that the weight of the second image at the synthesis position increases in proportion to the distance from the joint at the synthesis position. .
  • the luminance value conversion coefficient calculation unit 16 has a function of calculating the luminance value conversion coefficient so that the brightness value of a pixel range from the perpendicular bisector to a maximum combined position D 0 is converted.
  • the luminance value conversion coefficient calculation unit 16 has a function of outputting the generated luminance value conversion coefficient to the synthesis unit 122.
  • the synthesizing unit 122 has a function of joining the first image and the second image based on the distance between the first center point and the second center point calculated by the distance calculation unit 121. For example, the synthesizing unit 122 determines the pixel at the predetermined position based on the distance from the predetermined first position to the vertical bisector between the first center point and the second center point at the predetermined position in the combined image. Has a function to determine the value.
  • 5 and 6 are schematic diagrams for explaining a perpendicular bisector between the first center point and the second center point. As shown in FIG. 5, a perpendicular bisector L1 can be drawn between the first center point P1 of the first image F1 and the second center point P2 of the second image F2.
  • the distance to the vertical bisector L1 at a predetermined position in the composite image is calculated, and the pixel value at the predetermined position is determined.
  • the first image is composed of a plurality of images F1 and F2
  • each of the first center points P1 and P2 is bisected vertically with the second center point P3.
  • Lines L2 and L3 can be drawn.
  • a plurality of vertical bisectors can be drawn.
  • a distance to a vertical bisector at a predetermined position in the composite image is calculated, and a pixel value at the predetermined position is determined.
  • the composition unit 122 has a function of converting the pixel value of the second image before joining the second image to the first image. For example, the synthesis unit 122 determines the luminance value conversion coefficient J at the synthesis position based on the luminance value conversion coefficient J calculated by the luminance value conversion coefficient calculation unit 16 and the distance D from the joint to the synthesis position. . Then, the synthesis unit 122 derives a correction function Y that converts the luminance value of the second image based on the determined luminance value conversion coefficient J.
  • the correction function Y is not particularly limited, and for example, a linear function is used.
  • the synthesizing unit 122 calculates the luminance value of the second image used at the synthesis position based on the correction function Y and the luminance value of the second image.
  • the synthesizing unit 122 executes the luminance value changing process of the second image before the image synthesizing process described later.
  • the combining unit 122 uses the distance to the vertical bisector in order to adopt the pixel value of the image closest to the combining position as the pixel value of the combining position among the first image and the second image. .
  • the synthesizing unit 122 uses the distance from a predetermined position in the synthesized image to the vertical bisector as an evaluation value for evaluating the proximity of the input image.
  • the synthesizing unit 122 evaluates the proximity T of the input image using the following Expression 3.
  • A is a distance from a predetermined position to be synthesized to the second center point
  • B is a distance from the predetermined position to be synthesized to the nearest first center point
  • C is a distance from the first center point to the second center point. The distance to the point.
  • the synthesizing unit 122 determines the pixel value at the synthesis position (predetermined position) using the proximity T obtained by Expression 1 as an evaluation value. For example, when the distance from the predetermined position to the vertical bisector is greater than a predetermined value and the predetermined position is closer to the first center point than the second center point, the synthesizing unit 122 performs pixel processing for the first image. The value is the pixel value at the predetermined position. On the other hand, when the distance from the predetermined position to the vertical bisector is greater than the predetermined value and the predetermined position is closer to the second center point than the first center point, the synthesizing unit 122 performs pixel processing for the second image. The value is the pixel value at the predetermined position.
  • the combining unit 122 combines the pixel value of the first image and the pixel value of the second image to generate a pixel at the predetermined position.
  • Value As a method of combining, a conventional method can be employed. For example, a method of using an average value or a weighted average value of the pixel value of the first image and the pixel value of the second pixel as the pixel value at the predetermined position is used. It is done.
  • the combining unit 122 determines whether the predetermined position of the combined image is closer to the first center point or the second center point with the vertical bisector as a boundary, and determines the first image and the second image. It has a function of determining which pixel value of the image is adopted. Then, when the predetermined position is in the vicinity of the vertical bisector, that is, for the predetermined position where the distance from the vertical bisector in the composite image is equal to or less than the predetermined value, the synthesizing unit 122 In addition, by combining the pixel values of the second image and the pixel values of the second image, the luminance difference between the joints is reduced to generate a composite image with less discomfort.
  • the pixel value at a predetermined position is determined using the closeness T as an evaluation value.
  • T the closeness
  • the predetermined value W used to determine whether or not to combine pixel values.
  • the pixel value of the first image and the pixel value of the second image are combined at an image position within 8 pixels with respect to the vertical bisector.
  • the predetermined value W can be set to a range narrower than the overlapping region by setting it to about several pixels to several tens of pixels.
  • the grid points in the composite image are arranged in a grid pattern so as to include the first image before the second image is input.
  • the lattice points are newly added so as to include not only the first image but also the second image.
  • the combining unit 122 can also read the first center point closest to the lattice point at high speed by referring to the center position storage unit 13.
  • the synthesizing unit 122 has a function of determining the pixel value in the block surrounded by the lattice points based on the determination result at the lattice points in order to further increase the speed. For example, the synthesizing unit 122 is based on the distance from the lattice point arranged in a lattice pattern in the composite image to the perpendicular bisector between the first center point and the second center point closest to the lattice point. It has a function of determining pixel values at the lattice points.
  • the synthesizing unit 122 adopts the pixel value of the first image for the block (region) surrounded by the grid points whose pixel values are the first image. That is, the synthesizing unit 122 does not perform any processing on the block and sets the next block as a processing target.
  • the synthesizing unit 122 adopts the pixel value of the second image for the block surrounded by the grid points whose pixel values are the second image. That is, the composition unit 122 copies the second image as it is for the block.
  • the pixel value is a composite value of the pixel values of the first image and the second image.
  • the proximity T at the pixel position in the block is obtained by linear interpolation from the proximity T at the lattice point, and evaluated by the above-described evaluation method, thereby appropriately specifying the pixel position to be synthesized. Can do.
  • the pixel value determination function of the combining unit 122 (which pixel value of the first image or the second image is used at a certain combining position, or the average of both images)
  • the function of determining whether to use a value etc.) and the brightness value conversion function are described separately, and the example of determining the pixel value after converting the brightness value has been described.
  • the brightness value is converted. May be.
  • it may be configured such that the conversion of the luminance value and the determination of the pixel value are performed at the same time by using a single determination formula for exhibiting both functions.
  • the distance D used in Equation 2 is 1 ⁇ 2 of the proximity T used in Equation 3.
  • the distance D has an origin on the vertical bisector, takes a positive value when the synthesis position is on the first image side as viewed from the vertical bisector, and the synthesis position is second when viewed from the vertical bisector. When it is on the image side, it takes a negative value. For this reason, as shown below, it is possible to simultaneously determine the pixel value determination at a predetermined position and the presence / absence of luminance conversion using the distance D as an evaluation value.
  • the predetermined value W is the same as the predetermined value W used in the above-described determination formula with the proximity T as an evaluation value, and W / 2 is larger than the maximum distance D 0 from the vertical bisector to the composite position. as smaller, predetermined value W and the maximum distance D 0 is preset. For example, 16 pixels as a predetermined value W (first threshold value) used for determining whether or not to combine, and an input image as a maximum distance D 0 (second threshold value) used for determining whether or not to perform luminance conversion 3/8 of the width is used.
  • the synthesis unit 122 can increase the speed by first performing the above-described determination formula in units of blocks.
  • the synthesizing unit 122 calculates a composition ratio (blend ratio) and a luminance conversion value for each pixel position, and thus the method of changing the pixel value and the luminance value is independent of each other. However, since the distance calculation and the pixel value determination process can be performed at the same time, it is possible to increase the speed by using the determination formula.
  • the synthesizing unit 122 has a function of updating the nearest first center point recorded for each lattice point after generating a synthesized image by the above processing. For example, when a composite image is generated by connecting the first image and the second image, the closest first center point may be changed depending on the lattice points included in the composite image. For this reason, by performing the process of updating the nearest first center point after executing the joining process, accurate information on the nearest first center point can be maintained.
  • the composition unit 122 overwrites and saves the composite image created by joining the first image and the second image in the first temporary storage area.
  • the composition unit 122 stores the latest composite image in the first temporary storage area. That is, when there is a second image to be input next, a process of joining the second image to the latest composite image (intermediate composite image) is executed.
  • the synthesizing unit 122 does not record and hold all the images to be synthesized, but refers to them by sequentially synthesizing the input images, so that the images can be synthesized with a small amount of memory.
  • the synthesizing unit 122 has a function of outputting the synthesized image stored in the first temporary storage area to the display unit 31.
  • the display unit 31 is connected to the composite image generation unit 12 and has a function of notifying the user of the output composite image. For example, a liquid crystal display or the like is used as the display unit 31.
  • FIG. 7 is a flowchart showing the operation of the image processing apparatus 1 according to the present embodiment.
  • the control process illustrated in FIG. 7 is executed, for example, at the timing when the imaging function of the mobile terminal 2 is turned on, and is repeatedly executed at a predetermined cycle.
  • FIGS. 8 and 13 are schematic diagrams when one image is connected to one already input image
  • FIG. 9 is a schematic diagram explaining the luminance absolute value
  • FIG. 10 is a diagram explaining the luminance value conversion coefficient.
  • FIGS. 11 and 12 are schematic diagrams for explaining a correction function
  • FIGS. 14 and 15 are schematic diagrams when one image is joined to an image that has already been input and synthesized.
  • the image processing apparatus 1 executes an initial process (S12).
  • the image input unit 10 inputs an image F1 from the camera 30 and stores the image F1 in the first temporary storage area as the first image F1.
  • the center position acquisition unit 11 acquires position information of the first center point P1, which is the center point of the first image F1.
  • the synthesized image generation unit 12 arranges grid points K n (n: integer) in a grid pattern on the synthesized campus (synthesized image) so as to include the first image F1.
  • the composite image generating unit 12 specifies the first center point P1 as a first center point closest to the grid point K n, each grid point K n in association a first center point P1 center position storage section 13 To record. This completes the initial process.
  • the process of S12 proceeds to the second image input process (S14).
  • the image input unit 10 inputs the image F2 from the camera 30, and stores it as the second image F2 in the second temporary storage area.
  • the second image F2 is an image of the same size captured at an imaging position different from the imaging position of the first image F1, and has an overlapping area with the first image F1.
  • the process of S14 proceeds to the acquisition process of the center point position and the overlapping area acquisition process (S15, S17).
  • the center point position acquisition process and the overlap area acquisition process are processed in parallel thereafter. First, the process of acquiring the position of the center point will be described.
  • the center position acquisition unit 11 acquires the position information of the second center point P2, which is the center point of the second image F2. For example, the center position acquisition unit 11 acquires the position information of the second center point P2 based on the motion vectors of the first image F1 and the second image F2.
  • the process of S15 ends, the process proceeds to a distance acquisition process between the center points (S16).
  • the distance calculation unit 121 determines the first center based on the position information of the first center point P1 obtained in the process of S12 and the position information of the second center point P2 obtained in the process of S16. A distance between the point P1 and the second center point P2 is calculated. As shown in FIG. 8, the distance C between the first center point P1 of the first image F1 and the second center point P2 of the second image F2 is calculated. By calculating the distance C between the center points, the distance between the first center point P1 and the second center point P2 to the vertical bisector L1 is evaluated, and the vertical bisector L1 is determined as the image F1 and the image F1. It can be connected to F2. When the process of S16 ends, the process proceeds to a luminance value conversion coefficient calculation process (S19).
  • the overlapping area acquisition unit 14 acquires the overlapping area of the first image input in the process of S12 and the second image input in the process of S14.
  • the overlapping region acquisition unit 14 acquires the overlapping region R1 based on the motion vectors of the first image F1 and the second image F2.
  • the process proceeds to a luminance absolute value calculation process (S18).
  • the luminance absolute value calculation unit 15 calculates the luminance absolute value H based on the overlapping region R1 acquired in the process of S17.
  • FIG. 9 is a graph showing the luminance value at the combined position of each image, where the horizontal axis is the combined campus position and the vertical axis is the luminance value. As shown in FIG. 9, it is assumed that the first image F1 and the second image F2 overlap in the overlapping region R1. Here, with respect to the first image F1 which is initially input to the luminance absolute value H 1 of the first image F1 and 1.
  • the ratio (S 2 / S 1 ) of the sum S 1 of pixel values in the overlapping region R 1 of the first image F 1 to the sum S 2 of pixel values in the overlapping region R 1 of the second image F 2 is 1.2 here.
  • the brightness absolute value calculating unit 15 using Equation 1 described above, the brightness absolute value of H 2 second image F2 is calculated as 1.2.
  • the luminance value conversion coefficient calculation unit 16 specifies the vertical bisector of the first center point and the second center point from the position information of the center point acquired in the processes of S15 and S16. Then, the luminance value conversion coefficient calculation unit 16 calculates the absolute luminance value H 2 of the second image F2 specified in the processing of S18 and the absolute luminance value H f of the first image F1 stored in the absolute luminance value storage unit.
  • the luminance value conversion coefficient J is calculated based on For example, the luminance value conversion coefficient calculation unit 16, before calculating the luminance value conversion factor J, keep the brightness absolute value H f of the first image F1 and stored in the luminance absolute value storage unit.
  • the luminance value conversion coefficient calculation unit 16 combines the absolute luminance value H f after the composition by multiplying the absolute luminance value H 2 of the second image F2 by the luminance value conversion coefficient J into the absolute luminance value storage unit after the synthesis. Is stored in the luminance absolute value storage unit of the first image F1.
  • FIG. 10 is a schematic diagram illustrating the determination process of the luminance value conversion coefficient J of the second image.
  • the absolute luminance value H f of an image constituting the first image F1 is 1.1
  • the absolute luminance value H 2 of the second image F2 input next to this image is 1.2. To do.
  • the luminance value conversion coefficient calculation unit 16 uses the equation 2 to calculate the luminance for the composite position G1 existing on the vertical bisector L1 because the distance D from the vertical bisector L is 0.
  • the value conversion coefficient J is calculated as 0.92.
  • the synthetic position G2 when the weighting D / D 0 of the input image and 0.7, calculated as 0.97 the luminance value conversion factor J using Equation 2.
  • the weight D / D 0 of the input image is set to 1, and the luminance value conversion coefficient J is calculated to be 1.00 using Equation 2.
  • the composition unit 122 corrects the second image by setting the correction function Y, and then combines the images F1 and F2 to generate a composite image.
  • the setting of the correction function Y will be described.
  • 11 and 12 are schematic diagrams for explaining the correction functions Y1 and Y2, where the horizontal axis indicates the input image value and the vertical axis indicates the final pixel value. That is, the correction functions Y1 and Y2 are functions that return the value of the final pixel value when an input pixel value is given.
  • the synthesizer 122 sets the correction functions Y1 and Y2 with the luminance value conversion coefficient J as the slope of the correction functions Y1 and Y2, that is, the luminance value conversion coefficient J as a proportional constant of a linear function.
  • the correction function is a linear function
  • the difference between the input pixel value and the final pixel value increases as the input pixel value increases regardless of the magnitude of the luminance value conversion coefficient J.
  • the correction function Y1 converts the final pixel values to “58” and “253”, respectively, and the differences are “8” and “33”.
  • the correction function Y2 the final pixel values are converted to “40” and “176”, and the differences are “10” and “44”, respectively.
  • the final pixel value is constant at 255 for an input pixel value greater than a certain value, and there is a possibility that the information of the original pixel value may not be appropriately expressed. Therefore, for example, as illustrated in FIG. 12, the combining unit 122 finally passes the maximum pixel value (255) in a range where the pixel value before conversion or the pixel value after conversion is equal to or greater than a predetermined threshold value. As described above, the correction functions Y1 and Y2 are bent at the intersection of the threshold values.
  • the range from 0 to the threshold value is a linear function having the luminance value conversion coefficient J as a slope
  • the threshold value to the final pixel value is a linear function that is continuous with the linear function up to the threshold value and passes through the maximum pixel value.
  • the composition unit 122 inputs the second image after setting the correction function Y, and converts the pixel value.
  • the pixel value here is expressed in, for example, a YUV space, and the pixel value is also changed by changing the luminance value.
  • the synthesis unit 122 joins the image F1 and the converted image F2 to generate a synthesized image.
  • the first image F1 and the second image F2 are arranged in the coordinate space of the composite image. And about the area
  • the additional grid points K m, combining unit 122 identifies the first center point P1 as a first center point closest to the grid point K m, associating a first center point P1 to the respective grid point K m And recorded in the center position storage unit 13. At this time, a point at infinity is set in P1.
  • the synthesis unit 122 evaluates the distance from the vertical bisector L1 for each grid point K n , K m arranged in the first image F1 and the second image F2, and the grid point K n , determining the pixel values in the K m. For example, to calculate a closeness T using equation 3 described above in order from the lattice point K n located at the upper left. Then, as a 16 predetermined value W which is used to determine whether the synthesis of the pixel value, to assess the closeness T, determining the pixel values at the grid points K n.
  • the synthesis unit 122 refers to the center position storage unit 13 and acquires the closest first center point P1, and the distance C between the first center point P1 and the second center point P2. Then, the distance A to the first center point P1 and the distance B to the second center point P2 are calculated, and the proximity T is calculated using Equation 3. Similar processing is performed for the lattice point X2. Combining unit 122, for the grid point X1, X2, since a grid point K n which are arranged in the first image F1, performs a process of evaluation by calculating a closeness T as described above. On the other hand, for the newly added lattice point K m , the proximity T is clearly below the threshold value, so the proximity T of these lattice points K m is set to ⁇ , and the calculation of the proximity T is omitted.
  • the synthesizing unit 122 evaluates the calculated proximity T for each grid point K n , and all the proximity T of each of the grid points K n are larger than 16 for the blocks surrounded by the grid points K n at the four corners. In this case, the processing is skipped for the block. For example, for the lattice points X3 to X6, since the closeness T is all greater than 16, processing is skipped for blocks surrounded by the lattice points X3 to X6. On the other hand, 4 closeness T corners of the grid points K n is when all smaller than -16 employs the pixel value of the second image F2 as the pixel value of the block.
  • the second image F2 is copied for the block surrounded by the lattice points X7 to X10. Then, 4 if closeness T corners of the grid points K n is not greater than all 16, or 4 if closeness T corners of the grid points K n is not less than all -16, pixel of the block
  • the pixel values of the first image F1 and the second image F2 are synthesized as values. For example, the proximity T is larger than 0 for the lattice points X11 and X12, and the proximity T is smaller than 0 for the lattice points X13 and X14.
  • the pixel values of the first image F1 and the second image F2 are synthesized.
  • the proximity T at the pixel position in the block is linearly interpolated with the proximity T of X11 to X14, the proximity T is calculated at each pixel position, and the threshold W is evaluated.
  • This evaluation method is the same as described above. Then, for the pixel position of closeness T that is greater than or equal to the threshold value ⁇ W and less than or equal to the threshold value W, the average of the pixel value of the first image F1 and the pixel value of the second image F2 is calculated, and the pixel value at the pixel position is calculated.
  • the synthesizing unit 122 identifies the pixel value at the lattice point using a determination formula using the distance D instead of the proximity T. For example, to calculate a closeness T using equation 3 above from the lattice point K n located at the upper left in order to calculate the distance D from the closeness T.
  • a predetermined value W used for determining whether or not to synthesize pixel values is set to 16
  • a maximum distance D 0 used for determining whether or not to perform luminance conversion is set to 240 (input image width of 640 pixels 3 / 8), and to evaluate the distance D, and determining the pixel values at the grid points K n.
  • the synthesis unit 122 refers to the center position storage unit 13 and acquires the closest first center point P1, and the distance C between the first center point P1 and the second center point P2.
  • the distance A to the first center point P1 and the distance B to the second center point P2 are calculated
  • the proximity T is calculated using Equation 3
  • the distance D is calculated from the proximity T. Similar processing is performed for the lattice point X2.
  • the synthesizing unit 122 evaluates the calculated distance D for each grid point K n , and when all the distances D of the grid points K n are larger than 8 for the blocks surrounded by the grid points K n at the four corners ( That is, when the absolute value of the distance D is larger than 8 and the combined position is closer to the first center point than the second center point), the processing is skipped for the block.
  • the distances D are all greater than 8 for the lattice points X3 to X6. Therefore, for the block surrounded by the lattice points X3 to X6, the pixels of the first image are adopted, and the processing is skipped.
  • the distance D of the corners of the grid points K n is less than all -240 (i.e., the absolute value of the distance D is greater than 240, and the synthesis position in the second center point than the first center point If it is close, the pixel value of the second image F2 is copied as the pixel value of the block.
  • the four corners of the grid points K n distance D are all -240 or more and smaller than 8 (i.e., the absolute value of the distance D is larger than 8, and at 240 or less, and the combination position When closer to the second center point than the first center point), the pixel value of the second image F2 that has been subjected to luminance conversion by the correction function Y is copied as the pixel value of the block.
  • the four corners of the distance D of grid points K n all -8 or more and, in the case of 8 or less (i.e., when the absolute value of the distance D is 8 or less), as the pixel value of the block, the The pixel value of one image and the pixel value of the second image F2 subjected to luminance conversion by the correction function Y are synthesized (weighted average). Then, 4 when the corners of the determination of the grid points K n is not all the same, the distance D at a pixel position in the block, and linear interpolation distance D 4 corners of the grid points K n, at each pixel location distance to calculate the D, and evaluated by the predetermined value W and the maximum distance D 0. This evaluation method is the same as described above.
  • the combining unit 122 is a process of updating the first center point P ⁇ b> 1 recorded in the center position storage unit 13. Since the image F2 is synthesized, there are two first center points P1 and P2. Thus, combining unit 122, the first image to update the first center point closest to the grid point K n stored in the first temporary storage area. For example, in the case of the grid point X2, since the first center point P1 is closer to the first center point P1, P2, the update is not executed because it is the same as the previous time. On the other hand, for example, in the case of the grid point X1, since the first center point P2 is closer to the first center points P1 and P2, the stored information in the center position storage unit 13 is updated.
  • the process of S22 ends, the process proceeds to a process for determining the presence or absence of an input image (S24).
  • the image input unit 10 determines whether there is an image to be further input. For example, when the current imaging count is smaller than the auto continuous imaging count, it is determined that an input image exists. If it is determined in step S24 that an input image exists, the process proceeds to image input processing again (S14). Then, for example, the image F3 is input and stored in the second temporary storage area. Then, the center position acquisition unit 11 acquires the position of the center point P3 of the image F3 (S15). The distance calculation unit 121 then determines the distance between the first center points P1 and P2 of the composite image composed of the images F1 and F2 stored in the first temporary storage area and the second center point P3 of the input image F2. Are respectively calculated (S16).
  • the overlapping area acquisition unit 14 acquires an overlapping area R2 between the image F2 and the image F3 (S17).
  • the luminance absolute value calculation unit 15 calculates the luminance absolute value of the image F3 using Equation 1 (S18).
  • the luminance absolute value is based on the first input image, but the information on the reference image is not used for the calculation of the luminance absolute value.
  • the luminance value conversion coefficient calculation unit 16 of the image F3 calculates the luminance value conversion coefficient of the image F3 (S19).
  • the composition unit 122 converts the image F3 with the correction function
  • the images F1 and F2 and the image F3 are connected to generate a composite image.
  • the first images F1, F2 and the second image F3 are arranged in the coordinate space of the composite image.
  • new grid point K m (m: integer, dotted line in the figure) is added The Then, the additional grid points K m, combining unit 122, identifies the first central point P3 as the first center point closest to the grid point K m, associating a first central point P3 to each grid point K m And recorded in the center position storage unit 13.
  • the synthesizing unit 122 has lattice points K n and K m (for example, X15, X16, and the like) arranged in the first image F1 and F2 and the second image F3.
  • the distance from the vertical bisectors L2 and L3 is evaluated every X17, etc., and the pixel values at the lattice points K n and K m are specified.
  • an image in which the images F1, F2, and F3 are combined is generated.
  • the synthesis unit 122 updates the center point position of the grid point K n (S22). As described above, when there is an input image, the processes of S14 to S24 are repeatedly executed.
  • step S24 if it is determined in step S24 that there is no input image, the process proceeds to display processing (S26).
  • the image processing apparatus 1 outputs the composite image stored in the first temporary storage area to the display unit 31 for display.
  • the image processing apparatus 1 may cut out both ends of the composite image, adjust the size, and output the combined image to the display unit 31.
  • the control process shown in FIG. 7 ends.
  • the process of S26 may be performed every time one image is input (that is, between S20 and S24).
  • the image processing program includes a main module, an input module, and an arithmetic processing module.
  • the main module is a part that comprehensively controls image processing.
  • the input module operates the mobile terminal 2 so as to acquire an input image.
  • the arithmetic processing module includes a center position acquisition module, a distance calculation module, an overlapping area acquisition module, a luminance absolute value calculation module, a luminance value conversion coefficient calculation module, and a synthesis module.
  • the functions realized by executing the main module, the input module, and the arithmetic processing module are the image input unit 10, the center position acquisition unit 11, the distance calculation unit 121, the synthesis unit 122, and the overlap region acquisition of the image processing apparatus 1 described above.
  • the functions of the unit 14, the luminance absolute value calculation unit 15, and the luminance value conversion coefficient calculation unit 16 are the same.
  • the image processing program is provided by a storage medium such as a ROM or a semiconductor memory, for example.
  • the image processing program may be provided as a data signal via a network.
  • the overlapping area acquisition unit 14 moves based on the second image and the immediately preceding input image input immediately before the second image.
  • a vector is acquired, and based on the acquired motion vector, an overlapping region where the immediately preceding input image and the second image overlap is acquired, and the luminance value conversion coefficient calculation unit 16 acquires the luminance value of the first image in the overlapping region and the first image.
  • a luminance value conversion coefficient J for converting the luminance value of the second image so as to reduce the change in the luminance values of the first image and the second image is calculated.
  • the first image and the second image converted based on the luminance value conversion coefficient J are joined together.
  • the absolute luminance value is calculated based on the sum of the luminance values
  • the luminance conversion coefficient is calculated using the absolute luminance value. Therefore, a robust calculation can be performed with a simple configuration.
  • the luminance absolute value of the second image is one image constituting the first image, and the sum of the luminance values of the reference image that is used as a reference when calculating the luminance absolute value is used, without using the sum of the luminance values of the immediately preceding input image. Calculated based on the absolute luminance value. That is, it is not necessary to always record the sum of the luminance values of the reference image in order to calculate the absolute luminance value of the second image that is sequentially input. Therefore, the processing load can be reduced. Furthermore, when the luminance value conversion coefficient is calculated, the difference can be easily managed by using the luminance absolute value.
  • the brightness value after the conversion of the second image is increased as the distance from the vertical bisector L that is a joint increases. Correction can be made so as to approach the original luminance value.
  • the calculation cost of the correction function Y can be suppressed by adopting a linear function as the correction function Y.
  • the correction function Y of the linear function is employed, the difference between the pixel value before conversion and the pixel value after conversion increases as the pixel value before conversion increases, and as a result, an unnatural composite image may be generated. is there. For this reason, in a range where the pixel value before conversion or the pixel value after conversion is equal to or greater than a predetermined threshold value, the correction function Y is corrected to a linear function that is continuous with the linear function up to the threshold value and passes through the maximum pixel value. A natural composite image can be generated while reducing the calculation cost of the function Y.
  • the image processing device 1 when the first image and the input second image are sequentially combined, the first center point and the second center point Since the vertical bisector L can be used as a joint between images, it is possible to realize the sequential synthesis process at high speed and with a low load.
  • the pixel value from the joint to a position that is a predetermined distance away is the composite value, so that the joint is not conspicuous. Can do.
  • it is possible to calculate a composite value of pixel values using the second image after the luminance value is converted it is possible to avoid a significant change in the difference between the luminance values.
  • the first region is reduced while reducing the processing load by narrowing the composition region near the joint.
  • the difference between the brightness values of the first image and the second image that become noticeable by narrowing the area can be corrected based on the brightness values of the first image and the second image in an area wider than the area where the pixels are combined. .
  • the above-described embodiment shows an example of the image processing apparatus according to the present invention.
  • the image processing apparatus according to the present invention is not limited to the image processing apparatus 1 according to the embodiment, and the image processing apparatus according to the embodiment may be modified or otherwise changed without changing the gist described in each claim. It may be applied to the above.
  • the camera 30 may capture a moving image.
  • the image input unit 10 may have a function of extracting continuous images from the captured moving image.
  • the image input by the image input unit 10 may be an image transmitted from another device via a network.
  • the size of the image captured by the camera 30 is described as being the same. However, the size of the captured image may be different for each imaging.
  • the area surrounded by the lattice points is described as a rectangle, but it may be a triangle or another polygon.
  • the center position acquisition unit 11 calculates the motion vector using the input image and the image input immediately before has been described.
  • the motion vector calculation method is not limited thereto. Is not something
  • the motion vector may be calculated using the input image and the synthesized image generated so far.
  • the example in which the luminance value of the second image is operated when the first image and the second image overlap each other has been described.
  • the luminance value of the first image is operated, or It may be a case where the brightness values of both the first image and the second image are manipulated.
  • SYMBOLS 1 DESCRIPTION OF SYMBOLS 1 ... Image processing apparatus, 10 ... Image input part, 11 ... Center position acquisition part, 12 ... Composite image generation part, 121 ... Distance calculation part, 122 ... Composition part, 13 ... Center position memory

Abstract

 1枚の画像又は画像を複数つなぎ合わせて構成される第1画像と入力された第2画像とを当該第2画像の入力の度につなぎ合わせて合成画像を逐次生成する画像処理装置であって、第1画像を構成する画像のうち第2画像の直前に入力された直前入力画像及び第2画像に基づいて動きベクトルを取得し、取得された動きベクトルに基づいて直前入力画像と第2画像とが重なる重なり領域を取得する重なり領域取得部14と、重なり領域における第1画像の輝度値及び第2画像の輝度値に基づいて、第1画像及び第2画像の輝度値の変化が小さくなるように第1画像又は第2画像の輝度値を変換する輝度変換係数を算出する輝度値変換係数算出部16と、輝度変換係数を用いて第1画像又は第2画像を変換し、第1画像と第2画像とをつなぎ合わせて合成画像を生成する合成画像生成部12と、を備えることを特徴とする。

Description

画像処理装置、画像処理方法及び画像処理プログラム
 本発明は、画像処理装置、画像処理方法及び画像処理プログラムに関するものである。
 従来、画像処理装置として、撮像された画像をつなぎ合わせて一枚の広角な静止画像であるパノラマ静止画像を作成する装置が知られている(例えば、特許文献1,2参照)。特許文献1,2記載の画像処理装置は、第1の画像と第2の画像とをつなぎ合わせる際に、第1の画像と第2の画像とが重なる領域内において小領域をテンプレートマッチングさせて位置決めし、2つの画像が重なる領域のうち少なくとも一方の画像の画素値の階調変換を行い、つなぎ目が目立たないように2つの画像が重なる領域での明るさを補正するものである。
特開平9-321972号公報 特開平10-91765号公報
 近年、デジタルカメラは一般に普及しつつあり、携帯電話等のポータブル機器にも採用されている。小型化が要求される上記機器にあっては、少ないリソースで高速なパノラマ画像の生成処理をすることが望まれている。上記特許文献1,2記載の装置にあっては、処理高速化の観点から改善の余地がある。
 そこで、本発明はこのような技術課題を解決するためになされたものであって、露光条件の異なる画像をつなぎ合わせる際に、画像のつなぎ目を目立たなくする処理を低負荷で行うことができる画像処理装置、画像処理方法及び画像処理プログラムを提供することを目的とする。
 すなわち、本発明に係る画像処理装置は、1枚の画像又は前記画像を複数つなぎ合わせて構成される第1画像と入力された第2画像とを当該第2画像の入力の度につなぎ合わせて合成画像を逐次生成する画像処理装置であって、前記第1画像を構成する画像のうち前記第2画像の直前に入力された直前入力画像及び前記第2画像に基づいて動きベクトルを取得し、取得された前記動きベクトルに基づいて前記直前入力画像と前記第2画像とが重なる重なり領域を取得する重なり領域取得部と、前記重なり領域における前記第1画像の輝度値及び前記第2画像の輝度値に基づいて、前記第1画像及び前記第2画像の輝度値の変化が小さくなるように前記第1画像又は前記第2画像の輝度値を変換する輝度変換係数を算出する輝度値変換係数算出部と、前記輝度変換係数を用いて前記第1画像又は前記第2画像を変換し、前記第1画像と前記第2画像とをつなぎ合わせて前記合成画像を生成する合成画像生成部と、を備えて構成される。
 本発明に係る画像処理装置では、重なり領域取得部により、第2画像及び第2画像の直前に入力された直前入力画像に基づいて動きベクトルが取得され、取得された動きベクトルに基づいて、直前入力画像と第2画像とが重なる重なり領域が取得され、輝度値変換係数算出部により、重なり領域における第1画像の輝度値及び第2画像の輝度値に基づいて、第1画像及び第2画像の輝度値の変化が小さくなるように第1画像又は第2画像の輝度値を変換する輝度変換係数が算出され、合成画像生成部により、輝度変換係数に基づいて第1画像又は第2画像が変換されて、両者の画像がつなぎ合わせられる。このように、直前入力画像と第2画像との重なり領域を動きベクトルで取得することにより、重なり領域の輝度値の情報を低負荷で高速に取得することができる。よって、露光条件の異なる画像をつなぎ合わせる際に、画像のつなぎ目を目立たなくする処理を低負荷で行うことが可能となる。
 ここで、前記重なり領域における前記直前入力画像の輝度値の総和及び前記第2画像の輝度値の総和に基づいて、前記第1画像のうち所定の基準画像の輝度値の総和と前記第2画像の輝度値の総和との比である前記第2画像の輝度絶対値を算出する輝度絶対値算出部を備え、前記輝度値変換係数算出部は、前記第1画像を構成する画像のうち前記第2画像と重なる対象画像の前記輝度絶対値及び前記第2画像の前記輝度絶対値に基づいて、前記対象画像と前記第2画像とのつなぎ目からの距離に依存する前記第2画像の輝度値変換係数を算出することが好適である。
 このように構成することで、輝度値の総和に基づいて輝度絶対値を算出し、この輝度絶対値を用いて輝度変換係数を算出することができるので、ロバストな演算が可能となる。また、第2画像の輝度絶対値が、第1画像を構成する1つの画像であって輝度絶対値を算出する際に基準となる基準画像の輝度値の総和を用いることなく、直前入力画像の輝度絶対値に基づいて算出される。すなわち逐次入力される第2画像の輝度絶対値を算出するために基準画像の輝度値の総和を常に記録しておく必要がない。よって、処理負荷を軽減できる。
 また、前記輝度値変換係数算出部は、合成位置(合成キャンパス内の所定位置)における前記第2画像の重みが合成位置のつなぎ目からの距離に比例して大きくなるように前記輝度値変換係数を算出することが好適である。
 このように構成することで、第2画像の変換後の輝度値を、つなぎ目から離れるほど第2画像の元の輝度値に近づくように補正することができる。
 また、合成画像生成部は、合成位置のつなぎ目からの距離に基づいて合成位置での前記輝度値変換係数を決定し、決定された前記輝度値変換係数に基づいて前記第2画像の輝度値を変換する補正関数を導出し、前記補正関数及び前記第2画像の輝度値に基づいて合成位置で用いる前記第2画像の輝度値を算出してもよい。
 また、前記補正関数は、変換前の画素値及び変換後の画素値が所定の閾値未満となる範囲においては、前記輝度値変換係数を比例定数とする一次関数であり、変換前の画素値又は変換後の画素値が所定の閾値以上となる範囲においては、閾値までの一次関数と連続し最大画素値を通る一次関数であることが好適である。
 このように、補正関数として一次関数を採用することで、補正関数の計算コストを抑えることができる。また、変換前の画素値又は変換後の画素値が所定の閾値以上となる範囲においては、補正関数を閾値までの一次関数と連続し最大画素値を通る一次関数とすることで、補正関数の計算コストを抑えつつ、自然な合成画像を生成することが可能となる。
 また、前記第1画像を構成する画像のうち前記第2画像の直前に入力された画像、及び前記第2画像に基づいて動きベクトルを取得し、取得された前記動きベクトルに基づいて、前記第1画像を構成する画像それぞれの中心点である第1中心点の位置情報、及び前記第2画像の中心点である第2中心点の位置情報を取得する中心位置取得部を備え、前記合成画像生成部は、前記第1画像を構成する画像のうち前記第2画像と重なる画像の前記第1中心点を取得し、取得された前記第1中心点の位置情報及び前記第2中心点の位置情報に基づいて、取得された前記第1中心点と前記第2中心点との垂直二等分線を前記第1画像及び前記第2画像のつなぎ目としてつなぎ合わせ前記合成画像を生成することが好適である。
 このように構成することで、第1画像と入力した第2画像とを逐次合成する際に、第1中心点と第2中心点との垂直二等分線を画像のつなぎ目とすることができるので、逐次合成処理を高速かつ低負荷で実現することが可能となる。さらに、垂直二等分線を用いることで2つの画像のズレ量を低減できるので、合成画像の品質を向上することが可能となる。
 さらに、前記合成画像生成部は、前記第1画像と前記第2画像とのつなぎ目から所定距離離れた位置までの範囲内であって、前記重なり領域よりも狭い範囲内にある画素値を、前記第1画像の画素値及び前記第2画像の画素値の合成値とすることが好適である。
 このように構成することで、つなぎ目から所定距離離れた位置までの画素値が合成値とされるため、つなぎ目を目立たないようにすることができる。また、輝度値を変換した後の第2画像を用いて画素値の合成値を算出することが可能となるので、輝度値の差分が大きく変化することを回避することができる。さらに、輝度値の調整処理と、画素値の合成処理とを別個に独立して行うことが可能となるので、例えば、つなぎ目付近の合成領域については狭めることで処理負荷を低減させつつ、第1領域を狭めることで顕著となる第1画像及び第2画像の輝度値の差分を、画素を合成した領域よりも広い領域における第1画像及び第2画像の輝度値に基づいて補正することができる。
 また、本発明に係る画像処理方法は、1枚の画像又は前記画像を複数つなぎ合わせて構成される第1画像と入力された第2画像とを当該第2画像の入力の度につなぎ合わせて合成画像を逐次生成する画像処理方法であって、前記第1画像を構成する画像のうち前記第2画像の直前に入力された直前入力画像及び前記第2画像に基づいて動きベクトルを取得し、取得された前記動きベクトルに基づいて前記直前入力画像と前記第2画像とが重なる重なり領域を取得する重なり領域取得ステップと、前記重なり領域における前記第1画像の輝度値及び前記第2画像の輝度値に基づいて、前記第1画像及び前記第2画像の輝度値の変化が小さくなるように前記第1画像又は前記第2画像の輝度値を変換する輝度変換係数を算出する輝度変換係数算出ステップと、前記輝度変換係数を用いて前記第1画像又は前記第2画像を変換し、前記第1画像と前記第2画像とをつなぎ合わせて前記合成画像を生成する合成画像生成ステップと、を備えることを特徴とする。
 本発明に係る画像処理方法によれば、上述した本発明の画像処理装置と同様の効果を奏する。
 また、本発明に係る画像処理プログラムは、コンピュータを、1枚の画像又は前記画像を複数つなぎ合わせて構成される第1画像と入力された第2画像とを当該第2画像の入力の度につなぎ合わせて合成画像を逐次生成するように機能させる画像処理プログラムであって、前記第1画像を構成する画像のうち前記第2画像の直前に入力された直前入力画像及び前記第2画像に基づいて動きベクトルを取得し、取得された前記動きベクトルに基づいて前記直前入力画像と前記第2画像とが重なる重なり領域を取得する重なり領域取得部、前記重なり領域における前記第1画像の輝度値及び前記第2画像の輝度値に基づいて、前記第1画像及び前記第2画像の輝度値の変化が小さくなるように前記第1画像又は前記第2画像の輝度値を変換する輝度変換係数を算出する輝度値変換係数算出部、及び、前記輝度変換係数を用いて前記第1画像又は前記第2画像を変換し、前記第1画像と前記第2画像とをつなぎ合わせて前記合成画像を生成する合成画像生成部として機能させることを特徴とする。
 本発明に係る画像処理プログラムによれば、上述した本発明の画像処理装置と同様の効果を奏する。
 本発明によれば、露光条件の異なる画像をつなぎ合わせる際に、画像のつなぎ目を目立たなくする処理を低負荷で行うことができる。
実施形態に係る画像処理装置を搭載した携帯端末の機能ブロック図である。 実施形態に係る画像処理装置が搭載される携帯端末のハードウェア構成図である。 既に入力した画像とその後に入力した画像との重なり領域を説明する概要図である。 合成画像とその後に入力した画像との重なり領域を説明する概要図である。 既に入力した画像とその後に入力した画像との中心点の距離を説明する概要図である。 合成画像とその後に入力した画像との中心点の距離を説明する概要図である。 実施形態に係る画像処理装置の動作を示すフローチャートである。 既に入力した画像とその後に入力した画像との合成を説明する概要図である。 輝度絶対値を説明する概要図である。 輝度変換係数を説明する概要図である。 補正関数を説明する概要図である。 補正関数の他の例を説明する概要図である。 合成画像を説明する概要図である。 合成画像とその後に入力した画像との合成を説明する概要図である。 合成画像を説明する概要図である。
 以下、添付図面を参照して本発明の実施形態について説明する。なお、各図において同一又は相当部分には同一の符号を付し、重複する説明を省略する。
 本実施形態に係る画像処理装置は、入力画像を入力の度につなぎ合わせて一枚の画像を逐次作成する装置であって、例えば連続撮像された複数の画像をリアルタイムでつなぎ合わせ、1枚の撮像画像よりも広角なパノラマ画像を生成する場合に好適に採用されるものである。本実施形態に係る画像処理装置は、例えば、携帯電話、デジタルカメラ、PDA(Personal Digital Assistant)等、リソースに制限のあるモバイル端末に好適に搭載されるものであるが、これらに限られるものではなく、例えば通常のコンピュータシステムに搭載されてもよい。なお、以下では、説明理解の容易性を考慮し、本発明に係る画像処理装置の一例として、カメラ機能を備えた携帯端末に搭載される画像処理装置を説明する。
 図1は、本実施形態に係る画像処理装置1を備える携帯端末2の機能ブロック図である。図1に示す携帯端末2は、例えばユーザにより携帯される移動端末であり、図2に示すハードウェア構成を有する。図2は、携帯端末2のハードウェア構成図である。図2に示すように、携帯端末2は、物理的には、CPU(Central Processing Unit)100、ROM(Read Only Memory)101及びRAM(Random Access Memory)102等の主記憶装置、カメラ又はキーボード等の入力デバイス103、ディスプレイ等の出力デバイス104、ハードディスク等の補助記憶装置105などを含む通常のコンピュータシステムとして構成される。後述する携帯端末2及び画像処理装置1の各機能は、CPU100、ROM101、RAM102等のハードウェア上に所定のコンピュータソフトウェアを読み込ませることにより、CPU100の制御の元で入力デバイス103及び出力デバイス104を動作させるとともに、主記憶装置や補助記憶装置105におけるデータの読み出し及び書き込みを行うことで実現される。なお、上記の説明は携帯端末2のハードウェア構成として説明したが、画像処理装置1がCPU100、ROM101及びRAM102等の主記憶装置、入力デバイス103、出力デバイス104、補助記憶装置105などを含む通常のコンピュータシステムとして構成されてもよい。また、携帯端末2は、通信モジュール等を備えてもよい。
 図1に示すように、携帯端末2は、カメラ30、画像処理装置1及び表示部31を備えている。カメラ30は、画像を撮像する機能を有している。カメラ30として、例えば撮像素子等が用いられる。カメラ30は、例えばユーザ操作等により指定されたタイミングから所定の間隔で繰り返し撮像する連続撮像機能を有している。ユーザは、例えばカメラ30をスライドさせて少なくとも上下左右において重なる連続画像を撮像することができる。そして、カメラ30は、例えば撮像された画像を撮像の度に画像処理装置1へ出力する機能を有している。
 画像処理装置1は、画像入力部10、中心位置取得部11、合成画像生成部12、中心位置記憶部13、重なり領域取得部14、輝度絶対値算出部15及び輝度値変換係数算出部16を備えている。
 画像入力部10は、カメラ30により撮像された画像を入力する機能を有している。画像入力部10は、例えばカメラ30により撮像された画像を撮像の度に入力する機能を有している。また、画像入力部10は、最初に入力した画像を、携帯端末2に備わる第1の一時記憶領域に保存する機能を有している。また、画像入力部10は、次回以降連続して入力される画像を、携帯端末に備わる第2の一時記憶領域に保存する機能を有している。なお、後述するように、第2の一時記憶領域は新たな画像の入力の度に更新され、第1の一時記憶領域は、画像入力の度に逐次合成した画像(中間合成画像)が上書き保存で格納される。なお、以下では、第1の一時記憶領域に格納された画像を第1画像、第2の一時記憶領域に格納された画像を第2画像として説明する。
 重なり領域取得部14は、入力された画像及びその直前に入力された画像(直前入力画像)に基づいてカメラの動き(動きベクトル)を検出する機能を有している。また、重なり領域取得部14は、得られた動きベクトルに基づいて、入力された画像及びその直前に入力された画像の重なり領域を取得する機能を有している。図3,4は、重なり領域を説明する概要図である。図3に示すように、カメラの動きに基づいて第1画像F1と第2画像F2との重なり領域R1を算出することができる。また、図4に示すように、第1画像が複数の画像F1,F2で構成される場合には、カメラの動きに基づいて第2画像F3と当該第2画像F3の直前に入力された画像F2との重なり領域R2を算出することができる。なお、重なり領域R1,R2は矩形領域であり、その特定が極めて容易である。さらに、重なり領域取得部14は、重なり領域の情報を輝度絶対値算出部15へ出力する機能を有している。
 輝度絶対値算出部15は、入力された画像の輝度絶対値を算出する機能を有している。輝度絶対値とは、ある画像の輝度値を基準として算出される輝度値である。基準とする画像は、特に限定されないが、ここでは、最初に入力され、第1の一時記憶領域に格納された第1画像を基準として説明する。また、輝度絶対値は、重なり領域取得部14によって特定された重なり領域における輝度値の総和に基づいて算出される。すなわち、輝度絶対値算出部15は、重なり領域に含まれる第2画像の輝度値の総和と、重なり領域に含まれる直前入力画像の輝度値の総和を算出し、両者の輝度値の総和の比及び直前入力画像の輝度絶対値に基づいて、第2画像の輝度絶対値を算出する。重なり領域に含まれる第2画像の輝度値の総和をS、重なり領域に含まれる直前入力画像の輝度値の総和をS、直前入力画像の輝度絶対値をHとすると、第2画像の輝度絶対値Hは以下の式1を用いて算出される。
Figure JPOXMLDOC01-appb-M000001
なお、最初に入力され第1の一時記憶領域に格納された第1画像の輝度絶対値は所定の値が用いられ、例えば1が用いられる。また、輝度絶対値算出部15は、算出した輝度絶対値を輝度値変換係数算出部16へ出力する機能を有している。
 中心位置取得部11は、画像入力部10が入力した画像(初期の第1画像又は第2画像)の中心点の位置情報を取得する機能を有している。中心点とは、画像の外縁から一義的に決定される点である。位置情報は、実空間と関連づけされた位置情報であってもよいし、連続して入力される画像間で関連づけされた相対的な位置情報であってもよい。中心位置取得部11は、上記の位置情報を取得するために、入力された画像及びその直前に入力された画像に基づいてカメラの動き(動きベクトル)を検出する機能を有している。また、中心位置取得部11は、得られた動きベクトル及び直前に入力された画像の中心点の位置情報に基づいて、入力された画像の中心点の位置情報を算出する機能を有している。なお、中心位置取得部11は、最初に入力された画像(初期の第1画像)だけは、当該画像のみで中心点の位置情報を取得し、以降入力される画像(第2画像)については、入力画像及び入力直前の画像を用いて得られる動きベクトルに基づいて中心点の位置情報を取得する。例えば、n回目(n>1)に入力した第2画像については、当該第2画像及びn-1回目に入力した第2画像を用いて動きベクトルを取得し、取得された動きベクトルに基づいてn回目に入力した第2画像の中心点の位置情報を取得する。ここで、中心位置取得部11は、直前に入力された画像そのものではなく、直前に入力された画像を縮小し、更に輝度要素のみとした画像を用いて動きベクトルを算出してもよい。このように直前に入力された画像を加工して動きベクトルを取得することで、処理時間又は処理コストを低減することができる。なお、以下では、第1画像を構成する画像それぞれの中心点を第1中心点、第2画像の中心点を第2中心点として説明する。さらに、中心位置取得部11は、取得された中心点の位置情報を合成画像生成部12へ出力する機能を有している。
 合成画像生成部12は、入力した画像(第2画像)と既に入力されている画像(第1画像)とをつなぎ合わせた合成画像を生成する機能を有しており、距離算出部121及び合成部122を備えている。
 距離算出部121は、例えば、中心位置取得部11により取得された動きベクトルに基づいて、第1画像を構成する画像のうち第2画像と重なる画像を特定する機能を有している。そして、距離算出部121は、第2画像と重なる画像の所定位置から最も近い第1中心点を特定し、特定された第1中心点と第2画像の第2中心点との距離を算出する機能を有している。ここで、上記の算出処理を高速化するために、所定位置は格子状に配列させた格子点での位置とされてもよい。例えば、合成画像(ここでは第1画像)内に格子点を配列して上述した所定位置とする。そして、距離算出部121は、第1中心点と第2中心点との距離の算出前に、格子点ごとに当該格子点に最も近い第1中心点を特定し、中心位置記憶部13に予め格納する機能を有している。すなわち、中心位置記憶部13には、第1画像に含まれる格子点と、当該格子点に最も近い第1中心点とが関連付けされて格納されている。この場合、距離算出部121は、第1画像を構成する画像のうち、入力した第2画像に重なる画像を特定し、中心位置記憶部13を参照して、特定された格子点に最も近い第1中心点を取得する。なお、第1画像を構成する画像のうち第2画像に重なる画像が複数存在する場合には、格子点によっては最も近い第1中心点が異なる場合がある。この場合、距離算出部121は、格子点ごとに異なる第1中心点と、第2中心点との距離を算出する。距離算出部121は、算出された距離を合成部122へ出力する機能を有している。また、距離算出部121は、距離の算出に用いた第1中心点及び第2中心点の座標情報等を輝度値変換係数算出部16へ出力する機能を有している。
 輝度値変換係数算出部16は、輝度値を変換する補正関数の係数である輝度値変換係数を算出する機能を有している。輝度値変換係数算出部16は、第1画像を構成する画像のうち第2画像と重なる対象画像の輝度絶対値及び第2画像の輝度絶対値に基づいて、対象画像と第2画像とのつなぎ目からの距離に依存する第2画像の輝度値変換係数を算出する機能を有している。例えば、輝度値変換係数算出部16は、第1中心点と第2中心点との位置情報に基づいて、第1画像と第2画像とのつなぎ目である垂直二等分線を特定する。そして、輝度値変換係数算出部16は、以下の式2を用いて、輝度値変換係数Jを算出する。
Figure JPOXMLDOC01-appb-M000002
ここで、Hexは合成位置(合成キャンパス内の所定位置)での輝度絶対値、Hは第2画像の輝度絶対値、Hは対象画像の輝度絶対値、Dは垂直二等分線から合成位置までの最大距離(輝度変換領域を決定する閾値)、Dは垂直二等分線から合成位置までの距離である。なお、距離D>Dの場合には、合成位置が輝度値を変換する領域外に位置しているため、D=Dとして処理すればよい。このように、輝度値変換係数算出部16は、合成位置における第2画像の重みが合成位置のつなぎ目からの距離に比例して大きくなるように輝度値変換係数を算出する機能を有している。また、輝度値変換係数算出部16は、垂直二等分線から最大合成位置Dまでのピクセル範囲の輝度値が変換されるように輝度値変換係数を算出する機能を有している。輝度値変換係数算出部16は、生成した輝度値変換係数を合成部122へ出力する機能を有している。
 合成部122は、距離算出部121により算出された第1中心点と第2中心点との距離に基づいて、第1画像及び第2画像をつなぎ合わせる機能を有している。例えば、合成部122は、合成画像内の所定位置において、当該所定位置から最も近い第1中心点と第2中心点との垂直二等分線までの距離に基づいて、当該所定位置での画素値を決定する機能を有している。図5,6は、第1中心点と第2中心点との垂直二等分線を説明する概要図である。図5に示すように、第1画像F1の第1中心点P1と第2画像F2の第2中心点P2との間に垂直二等分線L1を引くことができる。そして、合成画像内の所定位置の垂直二等分線L1までの距離を算出して、当該所定位置での画素値を決定する。また、図6に示すように、第1画像が複数の画像F1,F2で構成される場合には、それぞれの第1中心点P1,P2ごとに、第2中心点P3との垂直二等分線L2,L3を引くことができる。このように、第1中心点が複数ある場合には、複数の垂直二等分線を引くことができる。そして、合成画像内の所定位置の垂直二等分線までの距離を算出して、当該所定位置での画素値を決定する。
 また、合成部122は、第1画像に第2画像をつなぎ合わせる前に、第2画像の画素値を変換する機能を有している。例えば、合成部122は、輝度値変換係数算出部16によって算出された輝度値変換係数Jと、つなぎ目から合成位置までの距離Dに基づいて、当該合成位置での輝度値変換係数Jを決定する。そして、合成部122は、決定された輝度値変換係数Jに基づいて第2画像の輝度値を変換する補正関数Yを導出する。補正関数Yは、特に限定されず、例えば一次関数が用いられる。そして、合成部122は、補正関数Y及び第2画像の輝度値に基づいて当該合成位置で用いる第2画像の輝度値を算出する。なお、合成部122は、第2画像の輝度値の変更処理を後述する画像合成処理の前に実行する。
 また、合成部122は、第1画像及び第2画像のうち、合成位置に最も近い画像の画素値を当該合成位置の画素値として採用するために、垂直二等分線までの距離を利用する。言い換えれば、合成部122は、合成画像内の所定位置から垂直二等分線までの距離を、入力画像の近さを評価する評価値として用いている。例えば、合成部122は、入力画像の近さTを以下の式3で評価する。
Figure JPOXMLDOC01-appb-M000003
ここで、Aは、合成予定の所定位置から第2中心点までの距離、Bは、合成予定の所定位置から最も近い第1中心点までの距離、Cは、第1中心点から第2中心点までの距離である。
 合成部122は、式1により得られた近さTを評価値として合成位置(所定位置)での画素値を決定する。例えば、合成部122は、所定位置から垂直二等分線までの距離が所定値よりも大きく、かつ所定位置が第2中心点よりも第1中心点に近い場合には、第1画像の画素値を当該所定位置の画素値とする。一方、合成部122は、所定位置から垂直二等分線までの距離が所定値よりも大きく、かつ所定位置が第1中心点よりも第2中心点に近い場合には、第2画像の画素値を当該所定位置の画素値とする。そして、合成部122は、所定位置から垂直二等分線までの距離が所定値以下の場合には、第1画像の画素値と第2画像の画素値とを合成して当該所定位置の画素値とする。合成する手法は、従来の手法を採用することができ、例えば、第1画像の画素値と第2画素の画素値との平均値又は加重平均値を当該所定位置の画素値とする手法が用いられる。このように、合成部122は、合成画像の所定位置が、垂直二等分線を境として、第1中心点及び第2中心点のどちらに近いのかを判断して、第1画像及び第2画像の何れの画素値を採用するのかを判断する機能を有している。そして、合成部122は、所定位置が垂直二等分線近傍の場合、すなわち、合成画像のうち垂直二等分線からの距離が所定値以下となる所定位置については、第1画像の画素値及び第2画像の画素値とを合成することにより、つなぎ目の輝度差を小さくして違和感の少ない合成画像を生成する機能を有している。すなわち、以下に示すように近さTを評価値として所定位置での画素値を決定する。
Figure JPOXMLDOC01-appb-M000004
なお、画素値の合成をするか否かの判断に用いられる所定値Wは、例えば16(ピクセル)が用いられる。この場合、垂直二等分線を基準として8ピクセル内にある画像位置において、第1画像の画素値と第2画像の画素値が合成される。また、所定値Wは、数ピクセル~十数ピクセル程度とすることで、重なり領域よりも狭い範囲とすることができる。
 合成画像内の格子点は、第2画像の入力前にあっては、第1画像を全て含むように格子状に配列されている。一方、第2画像の入力後にあっては、格子点は第1画像だけでなく第2画像も含むように、新たに追加される。このように、所定位置として格子点を採用することで、合成画像に含まれる全ての位置(ピクセル位置)について、垂直二等分線までの距離を算出する必要がなくなるため、処理負荷を低減することができる。さらに、合成部122は、中心位置記憶部13を参照することにより、格子点に最も近い第1中心点を高速に読み取ることもできる。これにより、過去に合成された全ての画像の第1中心点の位置と、格子点の位置とを比較する必要がなくなるため、使用メモリ量を低減することができる。そして、合成部122は、さらなる高速化を図るべく、格子点での判定結果に基づいて、格子点に囲まれたブロック内の画素値を決定する機能を有している。例えば、合成部122は、合成画像内に格子状に配列された格子点において、当該格子点から最も近い第1中心点と第2中心点との垂直二等分線までの距離に基づいて、当該格子点での画素値を決定する機能を有している。そして、合成部122は、画素値が第1画像とされた格子点に囲まれるブロック(領域)については、第1画像の画素値を採用する。すなわち、合成部122は、当該ブロックについては何も処理をしないで、次のブロックを処理対象とする。一方、合成部122は、画素値が第2画像とされた格子点に囲まれるブロックについては、第2画像の画素値を採用する。すなわち、合成部122は、当該ブロックについては第2画像をそのままコピーする。そして、ブロックを囲む格子点での画素値が、全て第1画像でない場合又は全て第2画像でない場合、すなわち、ブロックと垂直二等分線が交わる場合には、合成部122は、当該ブロック内の画素値を、第1画像及び第2画像の画素値の合成値とする機能を有している。この場合、ブロック内のピクセル位置での近さTを、格子点での近さTから線形補間して求めて、上述した評価方法で評価することで、合成するピクセル位置を適切に特定することができる。
 なお、上記では、説明理解の容易性を考慮して、合成部122の画素値決定機能(ある合成位置において第1画像又は第2画像のどちらの画素値を用いるか、又は両者の画像の平均値等を用いるのかを決定する機能)及び輝度値変換機能を別々に説明するとともに、輝度値を変換した後に画素値を決定する例を説明したが、画素値を決定した後に輝度値を変換してもよい。さらに、両者の機能を発揮するための判定式を一つとすることで輝度値の変換と画素値の決定を同時に行うように構成してもよい。
 以下、輝度値の変換と画素値の決定を同時に行う場合を説明する。式2で用いた距離Dは、式3で用いた近さTの1/2となる。なお、距離Dは、垂直二等分線上を原点とし、垂直二等分線からみて合成位置が第1画像側にあるときには正の値をとり、垂直二等分線からみて合成位置が第2画像側にあるときには負の値をとる。このため、以下に示すように、距離Dを評価値として所定位置での画素値決定及び輝度変換の有無を同時に判断することができる。
Figure JPOXMLDOC01-appb-M000005
なお、所定値Wは、近さTを評価値とした上記の判定式で用いた所定値Wと同じであり、垂直二等分線から合成位置までの最大距離DよりもW/2が小さくなるように、所定値W及び最大距離Dが予め設定されている。例えば、合成するか否かの判断に用いられる所定値W(第1の閾値)として16ピクセル、輝度変換を行うか否かの判断に用いられる最大距離D(第2の閾値)として入力画像の幅の3/8が用いられる。合成部122は、上述した判定式をまずブロック単位で行うことで高速化することができる。合成部122は、画素位置ごとに合成比率(ブレンド比率)や輝度変換値を算出するため、画素値及び輝度値の変化のさせ方はそれぞれ独立である。しかし、距離の計算や画素値決定処理は同時に行うことができるため、上記判定式を用いることで高速化することが可能となる。
 また、合成部122は、上記処理により合成画像を生成した後に、格子点ごとに記録された最も近い第1中心点を更新する機能を備えている。例えば、第1画像と第2画像とをつなぎ合わせて合成画像を生成した場合、この合成画像内に含まれる格子点によっては、最も近い第1中心点が変更される場合がある。このため、つなぎ合わせる処理を実行した後に、最も近い第1中心点を更新する処理を行うことで、最も近い第1中心点の正確な情報を維持することができる。
 さらに、合成部122は、第1画像と第2画像とをつなぎ合わせて作成した合成画像を第1の一時記憶領域に上書き保存する。このように、合成部122は、最新の合成画像を第1の一時記憶領域に保存しておく。すなわち、次に入力される第2画像が存在する場合には、最新の合成画像(中間合成画像)に対して、第2画像をつなぎ合わせる処理を実行する。このように、合成部122は、合成対象の画像を全て記録保持して参照しているのではなく、入力された画像を逐次合成することで、少ないメモリ量で画像を合成可能としている。また、合成部122は、第1の一時記憶領域に格納された合成画像を表示部31へ出力する機能を有している。表示部31は、合成画像生成部12に接続されており、出力された合成画像をユーザに報知する機能を有している。表示部31として例えば液晶ディスプレイ等が用いられる。
 次に、本実施形態に係る画像処理装置1の動作について説明する。図7は、本実施形態に係る画像処理装置1の動作を示すフローチャートである。図7に示す制御処理は、例えば携帯端末2の撮像機能をONしたタイミングで実行され、所定の周期で繰り返し実行される。なお、説明理解の容易性を考慮して、図8~15に示す図を参照しながら画像処理装置1の動作を説明する。図8,13は、既に入力している1つの画像に1つの画像をつなぎ合わせる場合の概要図、図9は、輝度絶対値を説明する概要図、図10は、輝度値変換係数を説明する概要図、図11,12は、補正関数を説明する概要図、図14,15は、既に入力して合成された画像に1つの画像をつなぎ合わせる場合の概要図である。
 図7に示すように、最初に画像処理装置1が初期処理を実行する(S12)。図6に示すように、画像入力部10が、カメラ30から画像F1を入力し、第1画像F1として第1の一時記憶領域に格納する。そして、中心位置取得部11が第1画像F1の中心点である第1中心点P1の位置情報を取得する。そして、合成画像生成部12が、第1画像F1を含むように、合成キャンパス(合成画像)に格子状に格子点K(n:整数)を配置する。そして、合成画像生成部12が、格子点Kに最も近い第1中心点として第1中心点P1を特定し、格子点Kそれぞれに第1中心点P1を関連付けして中心位置記憶部13に記録する。以上で初期処理を終了する。S12の処理が終了すると、第2画像の入力処理へ移行する(S14)。
 S14の処理では、画像入力部10が、カメラ30から画像F2を入力し、第2画像F2として第2の一時記憶領域に格納する。なお、ここでは第2画像F2は、第1画像F1の撮像位置とは異なる撮像位置で撮像された同一の大きさの画像であって、第1画像F1と重なり領域を有する画像である。S14の処理が終了すると、中心点の位置の取得処理及び重なり領域取得処理へ移行する(S15,S17)。中心点の位置の取得処理及び重なり領域取得処理は、以降で並列に処理される。最初に、中心点の位置の取得処理から説明する。
 S15の処理では、中心位置取得部11が第2画像F2の中心点である第2中心点P2の位置情報を取得する。例えば、中心位置取得部11は、第1画像F1と第2画像F2の動きベクトルに基づいて、第2中心点P2の位置情報を取得する。S15の処理が終了すると、中心点間の距離取得処理へ移行する(S16)。
 S16の処理では、距離算出部121が、S12の処理で得られた第1中心点P1の位置情報、及びS16の処理で得られた第2中心点P2の位置情報に基づいて、第1中心点P1と第2中心点P2との間の距離を算出する。図8に示すように、第1画像F1の第1中心点P1と、第2画像F2の第2中心点P2との距離Cを算出する。中心点間の距離Cを算出することで、第1中心点P1と第2中心点P2との垂直二等分線L1までの距離を評価し、当該垂直二等分線L1を画像F1と画像F2とのつなぎ目にすることができる。S16の処理が終了すると、輝度値変換係数算出処理へ移行する(S19)。
 一方、S17の処理では、重なり領域取得部14が、S12の処理で入力された第1画像と、S14の処理で入力された第2画像との重なり領域を取得する。例えば、重なり領域取得部14は、第1画像F1と第2画像F2の動きベクトルに基づいて、重なり領域R1を取得する。S17の処理が終了すると、輝度絶対値の算出処理へ移行する(S18)。
 S18の処理では、輝度絶対値算出部15が、S17の処理で取得された重なり領域R1に基づいて輝度絶対値Hを算出する。図9は、各画像の合成位置における輝度値を示すグラフであり、横軸が合成キャンパス位置、縦軸が輝度値のグラフである。図9に示すように、第1画像F1と第2画像F2とが、重なり領域R1で重なっているものとする。ここで、最初に入力された第1画像F1を基準とし、第1画像F1の輝度絶対値Hを1とする。また、第1画像F1の重なり領域R1における画素値の総和Sと、第2画像F2の重なり領域R1における画素値の総和Sとの比(S/S)がここでは1.2とする。この場合、輝度絶対値算出部15は、上述した式1を用いて、第2画像F2の輝度絶対値Hを1.2と算出する。S18の処理が終了すると、輝度値変換係数算出処理へ移行する(S19)。
 S19の処理では、輝度値変換係数算出部16が、S15,S16の処理で取得した中心点の位置情報から第1中心点及び第2中心点の垂直二等分線を特定する。そして、輝度値変換係数算出部16は、S18の処理で特定された第2画像F2の輝度絶対値H、及び、輝度絶対値記憶部に保存された第1画像F1の輝度絶対値Hに基づいて輝度値変換係数Jを算出する。例えば、輝度値変換係数算出部16は、輝度値変換係数Jの算出前に、第1画像F1の輝度絶対値Hを輝度絶対値記憶部に保存しておく。輝度値変換係数算出部16は、合成後、絶対輝度値記憶部に第2画像F2の輝度絶対値Hに輝度値変換係数Jをかけた変換後の輝度絶対値を、輝度絶対値Hとして第1画像F1の輝度絶対値記憶部に保存する。図10は、第2画像の輝度値変換係数Jの決定処理を説明する概要図である。ここで、例えば、第1画像F1を構成するある画像の輝度絶対値Hが1.1、この画像の次に入力された第2画像F2の輝度絶対値Hが1.2であるとする。この場合、輝度値変換係数算出部16は、垂直二等分線L1上に存在する合成位置G1については、垂直二等分線Lからの距離Dが0であるので、式2を用いて輝度値変換係数Jを0.92と算出する。また、合成位置G2については、入力画像の重みD/Dを0.7とした場合、式2を用いて輝度値変換係数Jを0.97と算出する。さらに、合成位置G3については、D>Dであるので、入力画像の重みD/Dを1とし、式2を用いて輝度値変換係数Jを1.00と算出する。S19の処理が終了すると、合成処理へ移行する(S20)。
 S20の処理では、合成部122が、補正関数Yを設定して第2画像を補正し、その後、画像F1と画像F2とをつなぎ合わせて合成画像を生成する。最初に、補正関数Yの設定から説明する。図11,図12は、補正関数Y1,Y2を説明する概要図であり、横軸が入力画像値、縦軸が最終画素値を示している。すなわち、補正関数Y1,Y2は、入力画素値が与えられると最終画素値の値を返す関数である。合成部122は、輝度値変換係数Jを補正関数Y1,Y2の傾き、すなわち輝度値変換係数Jを一次関数の比例定数として補正関数Y1,Y2を設定する。例えば図11の補正関数Y1は、輝度値変換係数J=1.15とした例であり、例えば図11の補正関数Y2は、輝度値変換係数J=0.80とした例である。
 ここで、補正関数を一次関数とした場合、輝度値変換係数Jの大きさにかかわらず、入力画素値が大きくなるほど入力画素値と最終画素値との差が大きくなる。例えば、入力画素値を「50」,「220」とした場合、補正関数Y1では、最終画素値としてそれぞれ「58」,「253」に変換され、その差は「8」,「33」である。また、補正関数Y2では、最終画素値として「40」,「176」に変換され、その差はそれぞれ「10」,「44」である。このように、入力画素値が大きくなるほど入力画素値と最終画素値との差が大きくなることがわかる。また、補正関数Y1では、ある値以上の入力画素値に対しては最終画素値が255と一定となり、元の画素値の情報が適切に表現されないおそれがある。このため、合成部122は、例えば図12に示すように、変換前の画素値又は変換後の画素値が所定の閾値以上となる範囲においては、最終的に最大画素値(255)を通過するように、補正関数Y1,Y2を閾値の交点で折り曲げる。すなわち、0から閾値までの範囲は、輝度値変換係数Jを傾きとする一次関数とし、閾値から最終画素値までは、閾値までの一次関数と連続し最大画素値を通る一次関数とする。これにより、元の画素値の情報が適切に表現されない現象を回避できる。
 合成部122は、補正関数Yを設定後、第2画像を入力し、画素値を変換する。なお、ここでいう画素値は、例えばYUV空間で表現されており、輝度値を変更することで画素値も変更される。
 次に、合成部122は、画像F1と変換後の画像F2とをつなぎ合わせて合成画像を生成する。図8に示すように、第1画像F1と第2画像F2とが合成画像の座標空間に配置される。そして、第2画像F2のうち第1画像F1と重ならない領域については、格子点Kが配置されていないため、新たに格子点K(m:整数、図中点線)が追加される。そして、追加された格子点Kについて、合成部122が、格子点Kに最も近い第1中心点として第1中心点P1を特定し、格子点Kそれぞれに第1中心点P1を関連付けして中心位置記憶部13に記録する。このときP1には、無限遠の点が設定される。
 そして、合成部122は、第1画像F1と第2画像F2とに配置された格子点K,Kごとに垂直二等分線L1からの距離を評価して、当該格子点K,Kにおける画素値を特定する。例えば、左上に位置する格子点Kから順に上述した式3を用いて近さTを算出する。そして、画素値の合成をするか否かの判断に用いられる所定値Wを16として、近さTを評価することで、格子点Kにおける画素値を特定する。例えば、合成部122は、格子点X1であれば、中心位置記憶部13を参照して、最も近い第1中心点P1を取得し、第1中心点P1と第2中心点P2との距離C、第1中心点P1までの距離A及び第2中心点P2までの距離Bを算出し、式3を用いて近さTを算出する。格子点X2についても同様の処理を行う。合成部122は、格子点X1,X2については、第1画像F1に配置された格子点Kであるため、上記のように近さTを算出して評価する処理を行う。一方、新たに追加された格子点Kについては、明らかに近さTが閾値よりも下回るため、これらの格子点Kの近さTは-∞とし、近さTの演算を省略する。
 合成部122は、算出された近さTを格子点Kごとに評価し、格子点Kで4隅を囲まれたブロックについて、格子点Kそれぞれの近さTが全て16よりも大きい場合には当該ブロックについては処理をスキップする。例えば、格子点X3~X6については、近さTが全て16よりも大きいため、格子点X3~X6で囲まれるブロックについては処理をスキップする。一方、4隅の格子点Kの近さTが全て-16よりも小さい場合には、当該ブロックの画素値として第2画像F2の画素値を採用する。例えば、格子点X7~X10については、近さTが全て-16よりも小さいため、格子点X7~X10で囲まれるブロックについては、第2画像F2をコピーする。そして、4隅の格子点Kの近さTが全て16よりも大きくない場合、又は4隅の格子点Kの近さTが全て-16よりも小さくない場合には、当該ブロックの画素値として第1画像F1及び第2画像F2の画素値を合成する。例えば、格子点X11、X12については、近さTが0よりも大きく、格子点X13、X14については、近さTが0よりも小さいので、格子点X11~X14で囲まれるブロックについては、第1画像F1及び第2画像F2の画素値を合成する。この場合、当該ブロック内の画素位置における近さTを、X11~X14の近さTで線形補間し、各画素位置で近さTを算出して、閾値Wで評価する。この評価のやり方は上述したものと同様である。そして、閾値-W以上で閾値W以下となる近さTの画素位置については、第1画像F1の画素値と第2画像F2の画素値との平均を算出し、当該画素位置での画素値とする。このように、最初は格子点Kを用いてブロック単位でスキップ、コピー又は合成を判断し、合成が必要な箇所が含まれるブロックについては、ピクセルごとに線形補間した近さTでさらに細かく評価し、スキップ、コピー又は合成を判断する。S20の処理を実行することで、図13に示すように、画像F1と画像F2とが垂直二等分線L1をつなぎ目としてつなぎ合わされるとともに、垂直二等分線L1に沿って帯状の合成領域Q1が形成される。この合成領域Q1の幅は閾値Wとなる。そして、画像F1に画像F2がつなぎ合わされた画像を、第1画像として第1の一時記憶領域に格納する。すなわち、第1の一時記憶領域に格納された第1画像を更新する。
 なお、合成部122は、補正関数Yを設定後、第2画像を入力し、画素値を変換し、その後合成する場合を説明したが、画素値を変換する処理及び画素値を特定する処理を同時に行ってもよい。この場合、合成部122は、近さTに替えて距離Dを用いた判定式で格子点における画素値を特定する。例えば、左上に位置する格子点Kから順に上述した式3を用いて近さTを算出し、近さTから距離Dを算出する。そして、画素値の合成をするか否かの判断に用いられる所定値Wを16とし、輝度変換を行うか否かの判断に用いられる最大距離Dを240(入力画像の幅640ピクセルの3/8)とし、距離Dを評価することで、格子点Kにおける画素値を特定する。例えば、合成部122は、格子点X1であれば、中心位置記憶部13を参照して、最も近い第1中心点P1を取得し、第1中心点P1と第2中心点P2との距離C、第1中心点P1までの距離A及び第2中心点P2までの距離Bを算出し、式3を用いて近さTを算出し、近さTから距離Dを算出する。格子点X2についても同様の処理を行う。
 合成部122は、算出された距離Dを格子点Kごとに評価し、格子点Kで4隅を囲まれたブロックについて、格子点Kそれぞれの距離Dが全て8よりも大きい場合(すなわち、距離Dの絶対値が8よりも大きく、かつ、合成位置が第2中心点よりも第1中心点に近い場合)には、当該ブロックについては処理をスキップする。例えば、格子点X3~X6については、距離Dが全て8よりも大きい。このため、格子点X3~X6で囲まれるブロックについては、第1画像の画素を採用することとし、処理をスキップする。一方、4隅の格子点Kの距離Dが全て-240よりも小さい場合(すなわち、距離Dの絶対値が240よりも大きく、かつ、合成位置が第1中心点よりも第2中心点に近い場合)には、当該ブロックの画素値として第2画像F2の画素値をコピーする。また、4隅の格子点Kの距離Dが全て-240以上、かつ、-8よりも小さい場合(すなわち、距離Dの絶対値が8よりも大きく、240以下であり、かつ、合成位置が第1中心点よりも第2中心点に近い場合)には、当該ブロックの画素値として補正関数Yによる輝度変換を行った第2画像F2の画素値をコピーする。さらに、4隅の格子点Kの距離Dが全て-8以上、かつ、8以下の場合(すなわち、距離Dの絶対値が8以下である場合)には、当該ブロックの画素値として、第1画像の画素値と、補正関数Yによる輝度変換を行った第2画像F2の画素値とを合成(加重平均)する。そして、4隅の格子点Kの判定がすべて同一とならない場合には、当該ブロック内の画素位置における距離Dを、4隅の格子点Kの距離Dで線形補間し、各画素位置で距離Dを算出して、所定値W及び最大距離Dで評価する。この評価のやり方は上述したものと同様である。このように、最初は格子点Kを用いてブロック単位でスキップ、コピー又は合成を判断し、合成が必要な箇所が含まれるブロックについては、ピクセルごとに線形補間した近さTでさらに細かく評価し、スキップ、コピー又は合成を判断する。S20の処理が終了すると、中心点位置の更新処理へ移行する(S22)。
 S22の処理では、合成部122が、中心位置記憶部13に記録された第1中心点P1を更新する処理である。画像F2を合成したため、第1中心点はP1,P2の2つになっている。このため、合成部122は、第1の一時記憶領域に格納された第1画像について格子点Kに最も近い第1中心点を更新する。例えば格子点X2の場合、第1中心点P1,P2のうち第1中心点P1の方が近いので、前回と同様であるため更新を実行しない。一方、例えば格子点X1の場合、第1中心点P1,P2のうち第1中心点P2の方が近いので、中心位置記憶部13の記憶情報を更新する。S22の処理が終了すると、入力画像の有無を判定する処理へ移行する(S24)。
 S24の処理では、画像入力部10が、さらに入力する画像が存在するか否かを判定する。例えば、現在の撮像回数がオート連続撮像回数よりも小さい場合には、入力画像が存在すると判定する。S24の処理において、入力画像が存在すると判定した場合には、画像の入力処理へ再度移行する(S14)。そして、例えば画像F3を入力して第2の一時記憶領域へ格納する。そして、中心位置取得部11が画像F3の中心点P3の位置を取得する(S15)。そして、距離算出部121が、第1の一時記憶領域に格納された画像F1及び画像F2からなる合成画像の第1中心点P1,P2と、入力した画像F2の第2中心点P3との距離をそれぞれ算出する(S16)。同時に、重なり領域取得部14が、画像F2と画像F3との重なり領域R2を取得する(S17)。そして、図9に示すように、輝度絶対値算出部15が、式1を用いて画像F3の輝度絶対値を算出する(S18)。このように、輝度絶対値は最初に入力された画像を基準としているが、輝度絶対値の演算には基準画像の情報を用いていない。このように演算することで、輝度絶対値を算出するにあたり、基準画像の情報を備える必要がないため、演算に必要なリソースを低減することができる。そして、画像F3の輝度値変換係数算出部16が画像F3の輝度値変換係数を算出する(S19)。そして、合成部122が、補正関数で画像F3を変換した後に、画像F1,F2と画像F3とをつなぎ合わせて合成画像を生成する。図14に示すように、第1画像F1,F2と第2画像F3とが合成画像の座標空間に配置される。そして、第2画像F3のうち第1画像F1,F2と重ならない領域については、格子点Kが配置されていないため、新たに格子点K(m:整数、図中点線)が追加される。そして、追加された格子点Kについて、合成部122が、格子点Kに最も近い第1中心点として第1中心点P3を特定し、格子点Kそれぞれに第1中心点P3を関連付けして中心位置記憶部13に記録する。そして、合成部122は、画像F1,F2をつなぎ合わせた場合と同様に、第1画像F1,F2と第2画像F3とに配置された格子点K,K(例えば、X15,X16,X17等)ごとに垂直二等分線L2,L3からの距離を評価して、当該格子点K,Kにおける画素値を特定する。これにより、図15に示すように、画像F1,F2,F3が合成された画像が生成される。合成後、合成部122は、格子点Kの中心点位置を更新する(S22)。このように、入力画像が存在する場合には、S14~S24の処理が繰り返し実行される。
 一方、S24の処理において、入力画像がないと判定した場合には、表示処理へ移行する(S26)。S26の処理では、画像処理装置1が第1の一時記憶領域に保存された合成画像を表示部31へ出力して表示させる。なお、画像処理装置1は、合成画像の両端を切り取り、大きさを整えてから表示部31へ出力してもよい。S26の処理が終了すると、図7に示す制御処理を終了する。なお、S26の処理は、画像を一枚入力するごとに(すなわちS20とS24との間に)行ってもよい。
 図7に示す制御処理を実行することで、低負荷で高速な逐次合成を行うことができる。なお、S17の処理が重なり領域取得ステップに該当し、S18の処理が輝度変換係数算出ステップに該当し、S19~S24の処理が合成画像生成ステップに該当する。
 次に、携帯端末(コンピュータ)2を上記画像処理装置1として機能させるための画像処理プログラムを説明する。
 画像処理プログラムは、メインモジュール、入力モジュール及び演算処理モジュールを備えている。メインモジュールは、画像処理を統括的に制御する部分である。入力モジュールは、入力画像を取得するように携帯端末2を動作させる。演算処理モジュールは、中心位置取得モジュール、距離算出モジュール、重なり領域取得モジュール、輝度絶対値算出モジュール、輝度値変換係数算出モジュール及び合成モジュールを備えている。メインモジュール、入力モジュール及び演算処理モジュールを実行させることにより実現される機能は、上述した画像処理装置1の画像入力部10、中心位置取得部11、距離算出部121、合成部122、重なり領域取得部14、輝度絶対値算出部15及び輝度値変換係数算出部16の機能とそれぞれ同様である。
 画像処理プログラムは、例えば、ROM等の記憶媒体または半導体メモリによって提供される。また、画像処理プログラムは、データ信号としてネットワークを介して提供されてもよい。
 以上、本実施形態に係る画像処理装置1、画像処理方法及び画像処理プログラムによれば、重なり領域取得部14により、第2画像及び第2画像の直前に入力された直前入力画像に基づいて動きベクトルが取得され、取得された動きベクトルに基づいて、直前入力画像と第2画像とが重なる重なり領域が取得され、輝度値変換係数算出部16により、重なり領域における第1画像の輝度値及び第2画像の輝度値に基づいて、第1画像及び第2画像の輝度値の変化が小さくなるように第2画像の輝度値を変換する輝度値変換係数Jが算出され、合成画像生成部12により、第1画像と輝度値変換係数Jに基づいて変換した第2画像とがつなぎ合わせられる。このように、直前入力画像と第2画像との重なり領域を動きベクトルで取得することにより、重なり領域の輝度値の情報を低負荷で高速に取得することができる。よって、露光条件の異なる画像をつなぎ合わせる際に、画像のつなぎ目を目立たなくする処理を低負荷で行うことが可能となる。
 また、本実施形態に係る画像処理装置1、画像処理方法及び画像処理プログラムによれば、輝度値の総和に基づいて輝度絶対値を算出し、この輝度絶対値を用いて輝度変換係数を算出することができるので、簡単な構成でロバストな演算が可能となる。また、第2画像の輝度絶対値が、第1画像を構成する1つの画像であって輝度絶対値を算出する際に基準となる基準画像の輝度値の総和を用いることなく、直前入力画像の輝度絶対値に基づいて算出される。すなわち逐次入力される第2画像の輝度絶対値を算出するために基準画像の輝度値の総和を常に記録しておく必要がない。よって、処理負荷を軽減できる。さらに、輝度値変換係数を算出する際に、輝度絶対値を用いることで差分の管理が容易となる。
 また、本実施形態に係る画像処理装置1、画像処理方法及び画像処理プログラムによれば、第2画像の変換後の輝度値を、つなぎ目である垂直二等分線Lから離れるほど第2画像の元の輝度値に近づくように補正することができる。
 また、本実施形態に係る画像処理装置1、画像処理方法及び画像処理プログラムによれば、補正関数Yとして一次関数を採用することで、補正関数Yの計算コストを抑えることができる。一方、一次関数の補正関数Yを採用すると変換前の画素値が大きいほど変換前の画素値と変換後の画素値との差が大きくなり、結果として不自然な合成画像が生成されるおそれがある。このため、変換前の画素値又は変換後の画素値が所定の閾値以上となる範囲においては、補正関数Yを閾値までの一次関数と連続し最大画素値を通る一次関数とすることで、補正関数Yの計算コストを抑えつつ、自然な合成画像を生成することが可能となる。
 また、本実施形態に係る画像処理装置1、画像処理方法及び画像処理プログラムによれば、第1画像と入力した第2画像とを逐次合成する際に、第1中心点と第2中心点との垂直二等分線Lを画像のつなぎ目とすることができるので、逐次合成処理を高速かつ低負荷で実現することが可能となる。
 また、本実施形態に係る画像処理装置1、画像処理方法及び画像処理プログラムによれば、つなぎ目から所定距離離れた位置までの画素値が合成値とされるため、つなぎ目を目立たないようにすることができる。また、輝度値を変換した後の第2画像を用いて画素値の合成値を算出することが可能となるので、輝度値の差分が大きく変化することを回避することができる。さらに、輝度値の調整処理と、画素値の合成処理とを別個に独立して行うことが可能となるので、例えば、つなぎ目付近の合成領域については狭めることで処理負荷を低減させつつ、第1領域を狭めることで顕著となる第1画像及び第2画像の輝度値の差分を、画素を合成した領域よりも広い領域における第1画像及び第2画像の輝度値に基づいて補正することができる。このように、画素値を操作してつなぎ目を目立たなくさせるアプローチと、輝度値を操作してつなぎ目を目立たなくさせるアプローチとを併用することが可能となる。よって、つなぎ目の色合いが自然で、かつ、画像内の明るさが全体として自然な画像を生成することができる。
 なお、上述した実施形態は本発明に係る画像処理装置の一例を示すものである。本発明に係る画像処理装置は、実施形態に係る画像処理装置1に限られるものではなく、各請求項に記載した要旨を変更しない範囲で、実施形態に係る画像処理装置を変形し、又は他のものに適用したものであってもよい。
 例えば、上述した実施形態では、カメラ30が静止画像を連続撮像する例を説明したが、カメラ30は、動画を撮像するものであってもよい。この場合、画像入力部10は、撮像された動画から連続する画像を抽出する機能を有していてもよい。また、画像入力部10が入力する画像は、別の機器からネットワークを介して送信された画像であってもよい。
 また、上述した実施形態では、カメラ30により撮像された画像の大きさは同一であるとして説明したが、撮像された画像の大きさは撮像の度に異なる大きさであってもよい。
 また、上述した実施形態では、格子点で囲まれる領域を矩形として説明したが、三角形又は他の多角形であってもよい。
 また、上述した実施形態では、中心位置取得部11が、入力された画像と直前に入力された画像とを用いて動きベクトルを算出する例を説明したが、動きベクトルの算出方法はこれに限られるものではない。例えば、入力された画像と、それまでに生成された合成画像とを用いて動きベクトルを算出してもよい。
 さらに、上述した実施形態では、第1画像と第2画像とが重なった際に第2画像の輝度値を操作する例を説明したが、第1画像の輝度値のみを操作する場合、又は、第1画像及び第2画像の両方の輝度値を操作する場合であってもよい。
 1…画像処理装置、10…画像入力部、11…中心位置取得部、12…合成画像生成部、121…距離算出部、122…合成部、13…中心位置記憶部、14…重なり領域取得部、15…輝度絶対値算出部、16…輝度値変換係数算出部、31…表示部。

Claims (9)

  1.  1枚の画像又は前記画像を複数つなぎ合わせて構成される第1画像と入力された第2画像とを当該第2画像の入力の度につなぎ合わせて合成画像を逐次生成する画像処理装置であって、
     前記第1画像を構成する画像のうち前記第2画像の直前に入力された直前入力画像及び前記第2画像に基づいて動きベクトルを取得し、取得された前記動きベクトルに基づいて前記直前入力画像と前記第2画像とが重なる重なり領域を取得する重なり領域取得部と、
     前記重なり領域における前記第1画像の輝度値及び前記第2画像の輝度値に基づいて、前記第1画像及び前記第2画像の輝度値の変化が小さくなるように前記第1画像又は前記第2画像の輝度値を変換する輝度変換係数を算出する輝度値変換係数算出部と、
     前記輝度変換係数を用いて前記第1画像又は前記第2画像を変換し、前記第1画像と前記第2画像とをつなぎ合わせて前記合成画像を生成する合成画像生成部と、
    を備えることを特徴とする画像処理装置。
  2.  前記重なり領域における前記直前入力画像の輝度値の総和及び前記第2画像の輝度値の総和に基づいて、前記第1画像のうち所定の基準画像の輝度値の総和と前記第2画像の輝度値の総和との比である前記第2画像の輝度絶対値を算出する輝度絶対値算出部を備え、
     前記輝度値変換係数算出部は、前記第1画像を構成する画像のうち前記第2画像と重なる対象画像の前記輝度絶対値及び前記第2画像の前記輝度絶対値に基づいて、前記対象画像と前記第2画像とのつなぎ目からの距離に依存する前記第2画像の輝度値変換係数を算出する請求項1に記載の画像処理装置。
  3.  前記輝度値変換係数算出部は、合成位置における前記第2画像の重みが合成位置のつなぎ目からの距離に比例して大きくなるように前記輝度値変換係数を算出する請求項1又は2に記載の画像処理装置。
  4.  合成画像生成部は、合成位置のつなぎ目からの距離に基づいて合成位置での前記輝度値変換係数を決定し、決定された前記輝度値変換係数に基づいて前記第2画像の輝度値を変換する補正関数を導出し、前記補正関数及び前記第2画像の輝度値に基づいて合成位置で用いる前記第2画像の輝度値を算出する請求項1~3の何れか一項に記載の画像処理装置。
  5.  前記補正関数は、変換前の画素値及び変換後の画素値が所定の閾値未満となる範囲においては、前記輝度値変換係数を比例定数とする一次関数であり、変換前の画素値又は変換後の画素値が所定の閾値以上となる範囲においては、閾値までの一次関数と連続し最大画素値を通る一次関数である請求項4に記載の画像処理装置。
  6.  前記第1画像を構成する画像のうち前記第2画像の直前に入力された画像、及び前記第2画像に基づいて動きベクトルを取得し、取得された前記動きベクトルに基づいて、前記第1画像を構成する画像それぞれの中心点である第1中心点の位置情報、及び前記第2画像の中心点である第2中心点の位置情報を取得する中心位置取得部を備え、
     前記合成画像生成部は、前記第1画像を構成する画像のうち前記第2画像と重なる画像の前記第1中心点を取得し、取得された前記第1中心点の位置情報及び前記第2中心点の位置情報に基づいて、取得された前記第1中心点と前記第2中心点との垂直二等分線を前記第1画像及び前記第2画像のつなぎ目としてつなぎ合わせ前記合成画像を生成する請求項1~5の何れか一項に記載の画像処理装置。
  7.  前記合成画像生成部は、前記第1画像と前記第2画像とのつなぎ目から所定距離離れた位置までの範囲内であって、前記重なり領域よりも狭い範囲内にある画素値を、前記第1画像の画素値及び前記第2画像の画素値の合成値とする請求項6に記載の画像処理装置。
  8.  1枚の画像又は前記画像を複数つなぎ合わせて構成される第1画像と入力された第2画像とを当該第2画像の入力の度につなぎ合わせて合成画像を逐次生成する画像処理方法であって、
     前記第1画像を構成する画像のうち前記第2画像の直前に入力された直前入力画像及び前記第2画像に基づいて動きベクトルを取得し、取得された前記動きベクトルに基づいて前記直前入力画像と前記第2画像とが重なる重なり領域を取得する重なり領域取得ステップと、
     前記重なり領域における前記第1画像の輝度値及び前記第2画像の輝度値に基づいて、前記第1画像及び前記第2画像の輝度値の変化が小さくなるように前記第1画像又は前記第2画像の輝度値を変換する輝度変換係数を算出する輝度変換係数算出ステップと、
     前記輝度変換係数を用いて前記第1画像又は前記第2画像を変換し、前記第1画像と前記第2画像とをつなぎ合わせて前記合成画像を生成する合成画像生成ステップと、
    を備えることを特徴とする画像処理方法。
  9.  コンピュータを、1枚の画像又は前記画像を複数つなぎ合わせて構成される第1画像と入力された第2画像とを当該第2画像の入力の度につなぎ合わせて合成画像を逐次生成するように機能させる画像処理プログラムであって、
     前記第1画像を構成する画像のうち前記第2画像の直前に入力された直前入力画像及び前記第2画像に基づいて動きベクトルを取得し、取得された前記動きベクトルに基づいて前記直前入力画像と前記第2画像とが重なる重なり領域を取得する重なり領域取得部、
     前記重なり領域における前記第1画像の輝度値及び前記第2画像の輝度値に基づいて、前記第1画像及び前記第2画像の輝度値の変化が小さくなるように前記第1画像又は前記第2画像の輝度値を変換する輝度変換係数を算出する輝度値変換係数算出部、及び
     前記輝度変換係数を用いて前記第1画像又は前記第2画像を変換し、前記第1画像と前記第2画像とをつなぎ合わせて前記合成画像を生成する合成画像生成部
    として機能させることを特徴とする画像処理プログラム。
PCT/JP2010/068975 2010-10-26 2010-10-26 画像処理装置、画像処理方法及び画像処理プログラム WO2012056518A1 (ja)

Priority Applications (5)

Application Number Priority Date Filing Date Title
US13/260,278 US8538192B2 (en) 2010-10-26 2010-10-26 Image processing device, image processing method and storage medium
CN201080014815.5A CN102741878B (zh) 2010-10-26 2010-10-26 图像处理装置、图像处理方法以及图像处理程序
JP2010542863A JP4941950B1 (ja) 2010-10-26 2010-10-26 画像処理装置、画像処理方法及び画像処理プログラム
EP10848135.9A EP2613290B1 (en) 2010-10-26 2010-10-26 Image processing device, image processing method, and image processing program
PCT/JP2010/068975 WO2012056518A1 (ja) 2010-10-26 2010-10-26 画像処理装置、画像処理方法及び画像処理プログラム

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/JP2010/068975 WO2012056518A1 (ja) 2010-10-26 2010-10-26 画像処理装置、画像処理方法及び画像処理プログラム

Publications (1)

Publication Number Publication Date
WO2012056518A1 true WO2012056518A1 (ja) 2012-05-03

Family

ID=45993274

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2010/068975 WO2012056518A1 (ja) 2010-10-26 2010-10-26 画像処理装置、画像処理方法及び画像処理プログラム

Country Status (5)

Country Link
US (1) US8538192B2 (ja)
EP (1) EP2613290B1 (ja)
JP (1) JP4941950B1 (ja)
CN (1) CN102741878B (ja)
WO (1) WO2012056518A1 (ja)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140016866A1 (en) * 2012-07-10 2014-01-16 Samsung Electronics Co., Ltd. Method and apparatus for processing image

Families Citing this family (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7983835B2 (en) 2004-11-03 2011-07-19 Lagassey Paul J Modular intelligent transportation system
US20090310149A1 (en) * 2008-06-13 2009-12-17 Kyocera Mita Corporation Image forming apparatus
WO2012092058A2 (en) * 2010-12-29 2012-07-05 Orthodyne Electroncis Corporation Methods and systems for aligning tooling elements of ultrasonic bonding systems
US8902313B2 (en) * 2011-11-02 2014-12-02 Robert Bosch Gmbh Automatic image equalization for surround-view video camera systems
US20130169663A1 (en) * 2011-12-30 2013-07-04 Samsung Electronics Co., Ltd. Apparatus and method for displaying images and apparatus and method for processing images
JP2013196454A (ja) * 2012-03-21 2013-09-30 Honda Elesys Co Ltd 画像処理装置、画像処理方法および画像処理プログラム
JP5929849B2 (ja) * 2013-07-08 2016-06-08 株式会社デンソー 画像生成装置、画像生成方法及び画像生成プログラム
CN104125410B (zh) * 2014-07-02 2017-04-12 深圳英飞拓科技股份有限公司 一种全景视频多镜头曝光补偿方法及其装置
JP6536183B2 (ja) * 2015-06-01 2019-07-03 富士ゼロックス株式会社 画像読取装置及びプログラム
JP6551316B2 (ja) * 2016-06-10 2019-07-31 京セラドキュメントソリューションズ株式会社 画像読取装置および画像形成装置
JP6932934B2 (ja) * 2017-01-23 2021-09-08 セイコーエプソン株式会社 スキャナー、スキャンプログラムおよびスキャンデータの生産方法
US11049218B2 (en) * 2017-08-11 2021-06-29 Samsung Electronics Company, Ltd. Seamless image stitching
CN109087606A (zh) * 2018-08-15 2018-12-25 苏州佳世达光电有限公司 大尺寸显示屏幕的均匀度调整方法及系统
CN113256516A (zh) * 2021-05-18 2021-08-13 中国科学院长春光学精密机械与物理研究所 一种图像增强方法

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH09321972A (ja) 1996-05-28 1997-12-12 Canon Inc 画像合成装置及び方法
JPH1091765A (ja) 1996-09-10 1998-04-10 Canon Inc 画像合成装置及びその方法
JPH11102430A (ja) * 1997-09-25 1999-04-13 Sharp Corp 画像処理装置
JPH11196319A (ja) * 1997-12-26 1999-07-21 Minolta Co Ltd 撮像装置
JP2002042109A (ja) * 2000-07-21 2002-02-08 Topcon Corp 医用画像合成処理装置及び方法並びに記憶媒体
JP2006119730A (ja) * 2004-10-19 2006-05-11 Seiko Epson Corp 画像のつなぎ合わせ
JP2006345400A (ja) * 2005-06-10 2006-12-21 Matsushita Electric Ind Co Ltd ビデオカメラ装置
JP2009033224A (ja) * 2007-07-24 2009-02-12 Nippon Hoso Kyokai <Nhk> 合成画像生成装置および合成画像生成プログラム

Family Cites Families (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6205259B1 (en) * 1992-04-09 2001-03-20 Olympus Optical Co., Ltd. Image processing apparatus
EP0625853B1 (en) * 1993-05-21 1999-03-03 Nippon Telegraph And Telephone Corporation Moving image encoder and decoder
US5982951A (en) 1996-05-28 1999-11-09 Canon Kabushiki Kaisha Apparatus and method for combining a plurality of images
JP3851384B2 (ja) * 1996-09-18 2006-11-29 シャープ株式会社 画像合成装置および方法
US6215914B1 (en) 1997-06-24 2001-04-10 Sharp Kabushiki Kaisha Picture processing apparatus
US6720997B1 (en) 1997-12-26 2004-04-13 Minolta Co., Ltd. Image generating apparatus
JP2004334843A (ja) * 2003-04-15 2004-11-25 Seiko Epson Corp 複数の画像から画像を合成する方法
US7260258B2 (en) * 2003-06-12 2007-08-21 Fuji Xerox Co., Ltd. Methods for multisource color normalization
JP4377932B2 (ja) 2007-07-26 2009-12-02 株式会社モルフォ パノラマ画像生成装置およびプログラム
EP2048878B1 (en) * 2007-08-03 2011-10-26 Panasonic Corporation Imaging device, imaging method, and program
JP5179223B2 (ja) * 2008-02-26 2013-04-10 オリンパス株式会社 撮像装置及び撮像プログラム

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH09321972A (ja) 1996-05-28 1997-12-12 Canon Inc 画像合成装置及び方法
JPH1091765A (ja) 1996-09-10 1998-04-10 Canon Inc 画像合成装置及びその方法
JPH11102430A (ja) * 1997-09-25 1999-04-13 Sharp Corp 画像処理装置
JPH11196319A (ja) * 1997-12-26 1999-07-21 Minolta Co Ltd 撮像装置
JP2002042109A (ja) * 2000-07-21 2002-02-08 Topcon Corp 医用画像合成処理装置及び方法並びに記憶媒体
JP2006119730A (ja) * 2004-10-19 2006-05-11 Seiko Epson Corp 画像のつなぎ合わせ
JP2006345400A (ja) * 2005-06-10 2006-12-21 Matsushita Electric Ind Co Ltd ビデオカメラ装置
JP2009033224A (ja) * 2007-07-24 2009-02-12 Nippon Hoso Kyokai <Nhk> 合成画像生成装置および合成画像生成プログラム

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140016866A1 (en) * 2012-07-10 2014-01-16 Samsung Electronics Co., Ltd. Method and apparatus for processing image
US9224190B2 (en) * 2012-07-10 2015-12-29 Samsung Electronics Co., Ltd. Method and apparatus for processing image taken under low illumination environment

Also Published As

Publication number Publication date
EP2613290A4 (en) 2013-10-09
CN102741878B (zh) 2015-08-19
JPWO2012056518A1 (ja) 2014-02-24
US8538192B2 (en) 2013-09-17
JP4941950B1 (ja) 2012-05-30
US20120177302A1 (en) 2012-07-12
EP2613290B1 (en) 2019-05-08
CN102741878A (zh) 2012-10-17
EP2613290A1 (en) 2013-07-10

Similar Documents

Publication Publication Date Title
JP4941950B1 (ja) 画像処理装置、画像処理方法及び画像処理プログラム
US8233055B2 (en) Image processing device and program
CN107256532B (zh) 图像处理装置、图像处理方法以及记录介质
JP5687553B2 (ja) 画像合成装置、画像合成方法及び画像合成プログラム
US10931875B2 (en) Image processing device, image processing method and storage medium
US8861846B2 (en) Image processing apparatus, image processing method, and program for performing superimposition on raw image or full color image
JP5493112B2 (ja) 画像処理装置、画像処理方法及び画像処理プログラム
JP2014225843A (ja) 画像処理装置、画像処理方法およびプログラム
US10095919B2 (en) Image processing apparatus, image processing method and storage medium to suitably clip a subject region from a moving image
JP5158262B2 (ja) 画像処理方法および画像処理装置
JP2010034964A (ja) 画像合成装置、画像合成方法及び画像合成プログラム
JP5022498B2 (ja) 画像処理装置、画像処理方法及び画像処理プログラム
JP2007226656A (ja) 画像の高解像度化方法及び装置
US11195247B1 (en) Camera motion aware local tone mapping
JP4212430B2 (ja) 多重画像作成装置、多重画像作成方法、多重画像作成プログラム及びプログラム記録媒体
JP2020057242A (ja) 画像処理装置、画像処理方法、及びプログラム
JP5687370B2 (ja) 画像処理装置、画像処理方法、画像処理プログラム及び記録媒体
JP2006119728A (ja) 合成画像の表示
JP5381207B2 (ja) 画像合成装置及びプログラム
JP2016208083A (ja) 画像処理装置、画像処理方法、及びプログラム
JP2015177529A (ja) 画像処理装置、画像処理方法及びプログラム

Legal Events

Date Code Title Description
WWE Wipo information: entry into national phase

Ref document number: 201080014815.5

Country of ref document: CN

WWE Wipo information: entry into national phase

Ref document number: 2010542863

Country of ref document: JP

WWE Wipo information: entry into national phase

Ref document number: 13260278

Country of ref document: US

WWE Wipo information: entry into national phase

Ref document number: 2010848135

Country of ref document: EP

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

Ref document number: 10848135

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE