WO2015136698A1 - 電子機器及び画像処理方法 - Google Patents

電子機器及び画像処理方法 Download PDF

Info

Publication number
WO2015136698A1
WO2015136698A1 PCT/JP2014/056951 JP2014056951W WO2015136698A1 WO 2015136698 A1 WO2015136698 A1 WO 2015136698A1 JP 2014056951 W JP2014056951 W JP 2014056951W WO 2015136698 A1 WO2015136698 A1 WO 2015136698A1
Authority
WO
WIPO (PCT)
Prior art keywords
image
reflection
area
subject
amount
Prior art date
Application number
PCT/JP2014/056951
Other languages
English (en)
French (fr)
Inventor
山本 晃司
Original Assignee
株式会社 東芝
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 株式会社 東芝 filed Critical 株式会社 東芝
Priority to PCT/JP2014/056951 priority Critical patent/WO2015136698A1/ja
Publication of WO2015136698A1 publication Critical patent/WO2015136698A1/ja

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/80Camera processing pipelines; Components thereof
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/70Circuitry for compensating brightness variation in the scene
    • H04N23/71Circuitry for evaluating the brightness variation
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/70Circuitry for compensating brightness variation in the scene
    • H04N23/741Circuitry for compensating brightness variation in the scene by increasing the dynamic range of the image compared to the dynamic range of the electronic image sensors
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/70Circuitry for compensating brightness variation in the scene
    • H04N23/76Circuitry for compensating brightness variation in the scene by influencing the image signals

Definitions

  • the CPU 101 also executes a basic input / output system (BIOS) stored in the BIOS-ROM 105.
  • BIOS is a program for hardware control.
  • the system controller 102 also has a function of executing communication with the sound controller 110.
  • the sound controller 110 is a sound source device and outputs audio data to be reproduced to the speaker 18.
  • the camera module 109 captures an image in response to, for example, the user touching (tapping) a button (graphical object) displayed on the screen of the touch screen display 17.
  • the camera module 109 can also capture a plurality of continuous images such as moving images.
  • the position sensor 111 detects the position (place) where the tablet computer 10 is used. For example, a room where the tablet computer 10 is used is identified using the position data detected by the position sensor 111.
  • the motion sensor 112 detects the movement of the tablet computer 10.
  • the motion sensor 112 is, for example, an acceleration sensor, a gyro sensor, or the like.
  • a plurality of images obtained by photographing the subject from different positions and angles that is, a plurality of images in which overexposure (reflection) occurs at different positions on the image, Generate an image with reduced distortion.
  • a reference image is obtained by using a pixel in which a reflection 311 does not occur among pixels included in the reference image 31 and a pixel in which a reflection 321 does not occur in pixels included in the reference image 32.
  • the reflection detection unit 41 detects a reflection area from the input image. For example, the reflection detection unit 41 detects the first reflection area 511 from the reference image 51.
  • the reflection detection unit 41 estimates, for example, whether or not a certain pixel in the image has a whiteout caused by reflection, and calculates an evaluation value based on the estimation result. For this evaluation value, for example, a smaller evaluation value is set as the possibility of overexposure (reflection) occurs. In other words, the evaluation value is set to a larger evaluation value that is less likely to be reflected and is suitable for reducing reflection.
  • the reflection detection unit 41 calculates a first evaluation value corresponding to a pixel in the reference image 51, and detects a pixel group having an evaluation value less than the threshold as the first reflection region 511.
  • the notification processing unit 46 may notify the user that the reflection reduction function is enabled or disabled according to the setting of whether the reflection reduction function is enabled or disabled. For example, the notification processing unit 46 displays a button indicating whether the reflection reduction function is valid or invalid on the screen.
  • the preview processing unit 43 displays a preview of an image (hereinafter also referred to as a preview image) 52 captured by the camera module 109 when the reflection reduction function is set to ON. For example, the preview processing unit 43 sequentially displays preview images generated continuously by the camera module 109 on the screen.
  • the reflection detection unit 41 detects the second reflection area 521 from the preview image 52 of the subject photographed using the camera module 109 in the same manner as when the first reflection area 511 is detected from the reference image 51. To do.
  • the corresponding point detection unit 44 detects a feature point on the reference image 51.
  • This feature point is a corner in the image detected using local feature robust to rotation and deformation of the subject such as SIFT (scale-invariant-feature transform) and SURF (speeded uprobust features). And a plurality of images can be detected from one image.
  • the corresponding point detection unit 44 detects feature points on the preview image 52 in the same manner as in the case of the reference image 51.
  • the alignment unit 45 aligns the reference image 51 and the preview image 52 based on the detected corresponding points. More specifically, the alignment unit 45 uses the corresponding point to convert the position of the feature point on the reference image 51 to the position of the corresponding feature point on the preview image 52 (for example, projective transformation). Coefficient). The alignment unit 45 estimates a conversion coefficient from the corresponding points using, for example, the least square method or RANSAC (random sample consensus).
  • the alignment unit 45 converts the first reflection area 511 on the reference image 51 into a corresponding area 522 on the preview image 52 based on the corresponding points between the reference image 51 and the preview image 52. More specifically, the alignment unit 45 converts the first reflected area 511 on the reference image 51 into a corresponding area (hereinafter referred to as “the corresponding area” on the preview image 52) based on the projective transformation coefficient calculated using the corresponding points. , which is also referred to as a conversion reflection area). Note that this conversion is not limited to projective transformation, and may be affine transformation, parallel movement, and the like.
  • the notification processing unit 46 notifies the user of the amount of deviation between the first reflection area 511 and the second reflection area 521 on the subject (for example, a whiteboard). For example, the notification processing unit 46 notifies the user of the amount of deviation between the converted reflection area 522 and the second reflection area 521 on the preview image 52 using the conversion result of the alignment unit 45.
  • the amount of deviation is calculated based on, for example, an area that does not overlap the second reflection area 521 in the conversion reflection area 522.
  • the amount of this shift may be represented by the ratio of the size of the area that does not overlap the second reflected area 521 in the converted reflected area 522 to the size of the converted reflected area 522.
  • the reference image generation unit 47 uses the conversion result of the alignment unit 45 to calculate the first reflection area 511 (conversion reflection area 522) and the second reflection area 521 on the subject. If the amount of deviation is greater than or equal to the first threshold value, a reference image is generated using the image 52 being preview-displayed. That is, the reference image generation unit 47 automatically generates a reference image without an instruction from the user based on the deviation between the first reflection area 511 on the standard image 51 and the second reflection area 521 on the preview image 52. Can be generated. Thereby, the reference image for acquiring the reflection reduction image can be efficiently acquired. Note that the reference image generation unit 47 uses the image 52 in the preview display when the first reflection area 511 (conversion reflection area 522) and the second reflection area 521 do not overlap at all on the subject. Thus, a reference image may be generated.
  • the reference image generation unit 47 and the composite image generation unit 48 can preview a preview image (for example, a first captured area 511 in the standard image 51 can be efficiently reduced from a plurality of preview images 52 generated continuously.
  • a preview image in which the degree of reduction of the first reflection region 511 is maximized may be selected, and the preview image may be used as a reference image to generate a reflection reduction image.
  • two preview images are taken, that is, after the first preview image of the subject is taken using the camera module 109, the second preview image of the subject is taken. Assume further shooting.
  • the reflection detection unit 41 detects, from the first preview image, the second reflection area where the reflection has occurred, and the second preview image is displayed on the screen. Is displayed, the third reflection area where the reflection has occurred is detected from the second preview image. Then, the reference image generation unit 47 and the composite image generation unit 48 are configured such that the amount of deviation between the first reflection area 511 and the third reflection area on the subject is the same as that of the first reflection area 511 and the first reflection area 511 on the subject. When it is larger than the amount of deviation from the two reflection areas, the reflection reduction image is generated using the reference image 51 and the second preview image.
  • the reference image generation unit 47 determines that the amount of deviation between the first reflection area 511 and the third reflection area on the subject is the first reflection area 511 and the second reflection area on the subject. If it is larger than the amount of deviation from the embedded area, a reference image is generated using the second preview image. That is, the reference image generation unit 47 shifts between the first reflection area 511 on the standard image 51 and the second reflection area on the first preview image, and the first reflection area 511 on the standard image 51 and the first reflection area.
  • the reference image can be automatically generated without an instruction from the user based on the deviation from the third captured area on the two preview images. Thereby, the reference image for acquiring the reflection reduction image can be efficiently acquired.
  • the composite image generation unit 48 uses the reference image 51 and the second preview image to generate a reflection reduced image in which the reflection of the first reflection region 511 is reduced.
  • the reference image generation unit 47 and the composite image generation unit 48 may determine the reference image by further considering the movement of the camera module 109. That is, the reference image generation unit 47 and the composite image generation unit 48 are configured such that the amount of deviation between the first reflection area 511 and the third reflection area on the subject is the same as that of the first reflection area 511 and the first reflection area 511 on the subject. When the amount of deviation from the two reflected areas is larger and the amount of movement of the camera module 109 is less than the second threshold value, the reflected reduced image is obtained using the reference image 51 and the second preview image. Generate.
  • FIG. 7 shows an example of a screen when the reflection reduction function is set to ON.
  • a reference image 61 photographed using the camera module 109 is displayed.
  • the screen 6 has an “ON / OFF” button 62 indicating ON / OFF of the reflection reduction function, an “OPEN FILE” button 63 for loading an already stored image file, and an instruction for photographing.
  • the reference image 61 includes a reflection area 611. Therefore, the function on / off unit 42 automatically sets the reflection reduction function to on in order to reduce the reflection area 611. Then, when the reflection reduction function is set to ON, the notification processing unit 46 displays the “ON / OFF” button 62 on the screen 6 so as to indicate “ON”.
  • the user can confirm that the reflection reduction function is turned on by looking at the “ON / OFF” button 62.
  • the notification processing unit 46 displays an indicator 72 indicating the degree to which the reflection area 611 in the reference image 61 is reduced by the displayed preview image 71.
  • the degree to which the reflection area 611 is reduced by the preview image 71 is, for example, the reflection area 711 in the preview image 71 in the area on the preview image 71 corresponding to the reflection area 611 in the reference image 61. Calculated based on non-overlapping areas. Accordingly, the user may instruct acquisition of a reference image for reducing the reflected area 611 in the standard image 61 by confirming the preview image 71 and the indicator 72 by, for example, an operation of depressing the “shoot” button 64. it can.
  • the composite image generation unit 48 detects the cutout range 312 corresponding to the range acquired as the output image from the reference image 31. For example, the composite image generation unit 48 detects edges in the reference image 31 using pixel values (luminance values) of a plurality of pixels included in the reference image 31. Then, the composite image generation unit 48 detects the maximum rectangle formed by the detected edges as the cutout range 312. Thereby, for example, a range in which the whiteboard (subject) is reflected in the reference image 31 can be detected as the cutout range 312.
  • the corresponding point detection unit 44 detects corresponding points between the standard image 31 and the reference image 32. More specifically, the corresponding point detection unit 44 detects feature points from each of the standard image 31 and the reference image 32. The corresponding point detection unit 44 uses the feature points detected from the standard image 31 and the reference image 32 to detect the feature points on the reference image 32 corresponding to the feature points on the standard image 31, thereby Corresponding points between 31 and the reference image 32 are detected.
  • the corresponding point detection unit 44 detects the feature point 32 ⁇ / b> A on the reference image 32 corresponding to the feature point 31 ⁇ / b> A on the standard image 31. That is, the corresponding point detection unit 44 detects the feature point 31A on the standard image 31 and the feature point 32A on the reference image 32 as corresponding points. Similarly, the corresponding point detection unit 44 detects a feature point 32B on the reference image 32 corresponding to the feature point 31B on the standard image 31. That is, the corresponding point detection unit 44 detects the feature point 31B on the standard image 31 and the feature point 32B on the reference image 32 as corresponding points. Similarly, the corresponding point detection unit 44 detects a large number of corresponding points between the standard image 31 and the reference image 32.
  • the reflection detection unit 41 detects the reflection 311 on the reference image 31 and the reflection 331 on the projective transformation image 33. More specifically, the reflection detection unit 41 estimates, for example, whether or not a whiteout caused by reflection occurs in a certain pixel in the image, and calculates an evaluation value based on the estimation result. . For this evaluation value, for example, a smaller evaluation value is set as the possibility of overexposure (reflection) occurs. Therefore, the reflection detection unit 41 calculates the first evaluation value corresponding to the pixel in the standard image 31, and calculates the second evaluation value corresponding to the pixel in the projection conversion image 33 obtained by converting the reference image 32. .
  • the composite image generation unit 48 generates the reflection reduction image 34 by combining the base image 31 and the projective conversion image 33 (that is, the projective conversion reference image 32).
  • the composite image generation unit 48 generates a weight map (alpha map) based on the calculated first evaluation value and second evaluation value.
  • the first evaluation value indicates the degree to which a pixel in the reference image 31 is a pixel suitable for combining the reference image 31 and the projective transformation image 33 (that is, calculating a combined image).
  • the second evaluation value indicates the degree to which the pixels in the projective conversion image 33 are suitable for combining the reference image 31 and the projective conversion image 33.
  • the weight map includes, for example, a weight ⁇ for alpha blending the projective transformation image 33 and the reference image 31.
  • the weight map indicates the weight ⁇ for pixels on one image.
  • the weight ⁇ is a value from 0 to 1, for example. In that case, the weight for the pixel on the other image is (1- ⁇ ).
  • the weight map when the first evaluation value is larger than the corresponding second evaluation value, the weight for the pixel (pixel value) of the reference image 31 is set larger than the weight for the pixel of the projective transformation image 33. Composed. Further, the weight map is configured to make the weight for the pixel of the reference image 31 smaller than the weight for the pixel of the projective transformation image 33 when the first evaluation value is smaller than the corresponding second evaluation value. Further, when the first evaluation value is equal to the corresponding second evaluation value, the weight for the pixel of the reference image 31 and the weight for the pixel of the projective transformation image 33 are configured to be equal.
  • the composite image generation unit 48 weights and adds (alpha blending) the base image 31 and the projective conversion image 33 of the reference image 32 based on the generated weight map, thereby generating a reflection reduced image (composite image) 34. Generate. For example, the composite image generation unit 48 calculates the pixel value of the pixel in the reference image 31 weighted with the weight ⁇ and the pixel value of the corresponding pixel in the projective transformation image 33 weighted with the weight (1 ⁇ ). By calculating the sum, an image reduction image 34 is generated.
  • the composite image generation unit 48 further cuts out an image corresponding to the cutout range 312 from the calculated reflection reduction image 34. Then, the composite image generation unit 48 performs distortion correction (rectangular correction) on the cut out image, thereby generating an image 35 in which the reflection is reduced and the rectangular image is corrected. Thus, the user can view the image 35 in which the reflection is reduced and the rectangle is corrected.
  • distortion correction linear correction
  • the composite image generation unit 48 sets the reflection reduction image 34 (or the image 35 in which reflection is reduced and corrected to a rectangle) as a new reference image 31. Therefore, by acquiring the reference image 32 and repeating the process of reducing the reflection on the standard image 31 using the reference image 32, the reflection area on the reflection reduced image can be reduced. .
  • the composite image generation unit 48 determines that the size of the reflection area on the reflection reduction image 34 is the third threshold. When it becomes less than the value, the photographing (that is, acquisition of the reference image) is ended.
  • the notification processing unit 46 may display on the screen a message indicating that the shooting has ended in response to the end of the shooting.
  • the camera module 109 detects the reference image 51 (block B11).
  • the reflection detection unit 41 detects the reflection area 511 from the reference image 51 (block B12).
  • the function on / off unit 42 turns on the reflection reduction function (block B14).
  • the function on / off unit 42 sets the reflection reduction function to off (block B15).
  • FIG. 11 shows an example of the procedure of the reflection reduction process executed by the tablet computer 10.
  • the preview processing unit 43 determines whether or not the reflection reduction function is set to ON (block B21). When the reflection reduction function is set to OFF (NO in block B21), the process returns to block B21 and it is determined again whether or not the reflection reduction function is set to ON.
  • the preview processing unit 43 previews the image (preview image) 52 taken by the camera module 109 on the screen (block B22). Then, the reflection detection unit 41 detects the reflection area 521 from the preview image 52 being displayed (block B23).
  • the corresponding point detection unit 44 detects a corresponding point between the reference image 51 and the preview image 52 (block B24).
  • the alignment unit 45 converts the reflection area 511 on the reference image 51 into a corresponding area (conversion reflection area) 522 on the preview image 52 (block B25).
  • the reference image generation unit 47 uses the conversion result obtained by the alignment unit 45 on the subject of the reflection area 511 (conversion reflection area 522) on the standard image 51 and the reflection area 521 on the preview image 52. It is determined whether or not the amount of deviation is greater than or equal to the first threshold value (block B26). The reference image generation unit 47, for example, based on whether or not the ratio of the area in which the reflection is reduced by the preview image 52 in the reflection area 511 on the standard image 51 is equal to or higher than the first threshold value. It is determined whether or not the reflection area 511 and the reflection area 521 are sufficiently shifted. When the shift of the reflected area is less than the first threshold value (NO in block B26), the process returns to block B22 and a process for a new preview image is performed.
  • the reference image generation unit 47 When the shift of the reflection area is equal to or greater than the first threshold value (YES in block B26), the reference image generation unit 47 generates a reference image using the preview image 52 (block B27). Note that the reference image generation unit 47 further displays the preview image 52 when the amount of shift in the reflected area is equal to or greater than the first threshold value and the amount of movement of the camera module 109 is less than the second threshold value. A reference image may be generated using.
  • the composite image generation unit 48 generates a reflection reduced image by combining the standard image 51 and the reference image (block B28).
  • the composite image generation unit 48 aligns the reference image 51 and the reference image in cooperation with, for example, the reflection detection unit 41, the corresponding point detection unit 44, and the alignment unit 45, and the aligned reference image 51 and A reflection reduction image is generated by alpha blending with the reference image.
  • the composite image generation unit 48 determines whether or not the amount of reflection in the generated reflection reduction image is less than the third threshold (block B29). When the amount of reflection is greater than or equal to the third threshold (NO in block B29), the composite image generation unit 48 sets the generated reflection reduction image as a new reference image (block B30), and this new The processing using the new reference image and the new preview image is continued. If the amount of reflection is less than the third threshold value (YES in block B29), the process ends.
  • the flowchart of FIG. 12 shows another example of the procedure of the reflection reduction process.
  • the preview processing unit 43 determines whether or not the reflection reduction function is set to ON (block B41). When the reflection reduction function is set to OFF (NO in block B41), the process returns to block B41, and it is determined again whether or not the reflection reduction function is set to ON.
  • the preview processing unit 43 previews the image (preview image) 52 taken by the camera module 109 on the screen (block B42). Then, the reflection detection unit 41 detects the reflection area 521 from the preview image 52 being displayed (block B43).
  • the corresponding point detection unit 44 detects a corresponding point between the reference image 51 and the preview image 52 (block B44).
  • the alignment unit 45 converts the reflection area 511 on the reference image 51 into a corresponding area (conversion reflection area) 522 on the preview image 52 (block B45).
  • the notification processing unit 46 presents a reduction amount of the reflection by the preview image 52 using the conversion result by the alignment unit 45 (block B46). For example, the notification processing unit 46 presents an indicator that indicates the proportion of the area in which the reflection is reduced by the preview image 52 in the reflection area 511 on the reference image 51.
  • the reference image generation unit 47 determines whether or not the amount of movement of the camera module (lens) 109 is less than the second threshold value (block B47). That is, the reference image generation unit 47 uses the motion data generated by the motion sensor 112 to determine whether the position of the camera module 109 is stable (for example, substantially stationary). When the amount of movement of the camera module 109 is equal to or greater than the second threshold value (NO in block B47), the process returns to block B42 and processing for a new preview image is performed.
  • the reference image generation unit 47 When the amount of movement of the camera module 109 is less than the second threshold value (YES in block B47), the reference image generation unit 47 generates a reference image using the preview image 52 (block B48). Then, the composite image generation unit 48 generates an image reduction image by combining the standard image 51 and the reference image (block B49). The composite image generation unit 48 aligns the reference image 51 and the reference image in cooperation with, for example, the reflection detection unit 41, the corresponding point detection unit 44, and the alignment unit 45, and the aligned reference image 51 and A reflection reduction image is generated by alpha blending with the reference image.
  • the composite image generation unit 48 determines whether or not the amount of reflection in the generated reflection reduction image is less than the third threshold value (block B50). When the amount of reflection is greater than or equal to the third threshold (NO in block B50), the composite image generation unit 48 sets the generated reflection reduction image as a new reference image (block B51). The processing using the new reference image and the new preview image is continued. If the amount of reflection is less than the third threshold value (YES in block B50), the process ends.
  • an image for reducing the reflection captured on the image can be efficiently acquired.
  • the reflection detection unit 41 detects the first reflection region 511 where the reflection has occurred from the reference image 51 in which the subject has been shot, and from the preview image 52 of the subject that has been shot using the camera module 109.
  • the second reflection area 521 where the reflection has occurred is detected.
  • the composite image generation unit 48 uses the reference image 51 and the preview image 52 when the amount of deviation between the first reflection area 511 and the second reflection area 521 on the subject is equal to or greater than the first threshold value.
  • a reflection reduced image in which the reflection of the first reflection area 511 is reduced is generated.
  • the various modules of the system described herein can be implemented as software applications, hardware and / or software modules, or components on one or more computers, such as a server. Although the various modules are shown separately, they can share some or all of the same underlying logic or code.

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Studio Devices (AREA)
  • Image Processing (AREA)

Abstract

 実施形態によれば、電子機器は、検出手段と生成手段とを具備する。検出手段は、被写体が撮影された第1画像から、写り込みが発生している第1領域を検出し、カメラモジュールを用いて撮影されている前記被写体の第2画像から、写り込みが発生している第2領域を検出する。生成手段は、前記被写体上での前記第1領域と前記第2領域とのずれの量が第1しきい値以上である場合、前記第1画像と前記第2画像とを用いて、前記第1領域の写り込みが低減された第3画像を生成する。

Description

電子機器及び画像処理方法
 本発明の実施形態は、写真を撮影可能な電子機器及び該機器に適用される画像処理方法に関する。
 近年、カメラ付きのパーソナルコンピュータ、PDA、携帯電話、スマートフォン等や、デジタルカメラのような画像を撮影できる様々な電子機器が普及している。
 このような電子機器は、人物や風景を撮影するだけでなく、雑誌やノート、掲示板等に記載された内容を撮影するために用いられることもある。撮影によって得られた画像は、例えば、個人の記録として保存することや、複数人で閲覧すること等に利用される。
特開2005-130326号公報
 ところで、ホワイトボード(whiteboard)のように表面が反射しやすい被写体では、被写体上に反射による写り込み(グレア:glare)が発生することがある。このような被写体を撮影した画像では、写り込みによって、被写体の情報(例えば、ホワイトボードに書き込まれた文字)が欠落する可能性がある。
 そのため、被写体を様々な位置から撮影した複数の画像を用いて、写り込みが軽減された画像を取得する方法が提案されている。
 しかし、例えば、撮影済みの画像上の写り込みを把握して、その写り込みを軽減できる位置から被写体をさらに撮影することは、ユーザにとって煩雑な作業である可能性が高い。したがって、画像上の写り込みを軽減できる複数の画像の効率的な取得が期待される場合がある。
 本発明は、画像上に捉えられた写り込みを軽減するための画像を効率的に取得できる電子機器及び画像処理方法を提供することを目的とする。
 実施形態によれば、電子機器は、検出手段と生成手段とを具備する。検出手段は、被写体が撮影された第1画像から、写り込みが発生している第1領域を検出し、カメラモジュールを用いて撮影されている前記被写体の第2画像から、写り込みが発生している第2領域を検出する。生成手段は、前記被写体上での前記第1領域と前記第2領域とのずれの量が第1しきい値以上である場合、前記第1画像と前記第2画像とを用いて、前記第1領域の写り込みが低減された第3画像を生成する。
図1は、実施形態に係る電子機器の外観を示す斜視図である。 図2は、同実施形態の電子機器のシステム構成を示すブロック図である。 図3は、同実施形態の電子機器によって写り込みが軽減された画像が生成される例を説明するための図である。 図4は、同実施形態の電子機器によって実行される画像処理プログラムの機能構成の例を示すブロック図である。 図5は、同実施形態の電子機器による、撮影済み画像(基準画像)上の写り込みとプレビュー画像上の写り込みとのずれの例を説明するための図である。 図6は、同実施形態の電子機器によって用いられる機能利用履歴データの一構成例を示す図である。 図7は、同実施形態の電子機器によって写り込み低減機能がオンに設定される場合の画面の例を示す図である。 図8は、同実施形態の電子機器によって表示される、写り込みが低減される度合いを示すインジケータを含む画面の例を示す図である。 図9は、同実施形態の電子機器によって、基準画像と参照画像とから写り込みが軽減された画像が生成される例を説明するための図である。 図10は、同実施形態の電子機器によって実行される機能制御処理の手順の例を示すフローチャートである。 図11は、同実施形態の電子機器によって実行される写り込み低減処理の手順の例を示すフローチャートである。 図12は、同実施形態の電子機器によって実行される写り込み低減処理の手順の別の例を示すフローチャートである。
 以下、実施の形態について図面を参照して説明する。 
 図1は、一実施形態に係る電子機器の外観を示す斜視図である。この電子機器は、タブレットコンピュータ、ノートブック型パーソナルコンピュータ、スマートフォン、PDA、又はデジタルカメラのような各種電子機器に内蔵される組み込みシステムとして実現され得る。以下では、この電子機器がタブレットコンピュータ10として実現されている場合を想定する。タブレットコンピュータ10は、タブレット又はスレートコンピュータとも称される携帯型電子機器であり、図1に示すように、本体11とタッチスクリーンディスプレイ17とを備える。タッチスクリーンディスプレイ17は、本体11の上面に重ね合わせるように取り付けられている。
 本体11は、薄い箱形の筐体を有している。タッチスクリーンディスプレイ17には、フラットパネルディスプレイと、フラットパネルディスプレイの画面上のペン又は指の接触位置を検出するように構成されたセンサとが組み込まれている。フラットパネルディスプレイは、例えば、液晶表示装置(LCD)であってもよい。センサとしては、例えば、静電容量方式のタッチパネル、電磁誘導方式のデジタイザなどを使用することができる。
 また、本体11には、本体11の下面(背面)側から画像を撮影するためのカメラモジュールが設けられている。
 図2は、タブレットコンピュータ10のシステム構成を示す図である。 
 タブレットコンピュータ10は、図2に示されるように、CPU101、システムコントローラ102、主メモリ103、グラフィクスコントローラ104、BIOS-ROM105、不揮発性メモリ106、無線通信デバイス107、エンベデッドコントローラ(EC)108、カメラモジュール109、サウンドコントローラ110、位置センサ111、動きセンサ112、等を備える。
 CPU101は、タブレットコンピュータ10内の各種コンポーネントの動作を制御するプロセッサである。CPU101は、ストレージデバイスである不揮発性メモリ106から主メモリ103にロードされる各種ソフトウェアを実行する。これらソフトウェアには、オペレーティングシステム(OS)201、及び各種アプリケーションプログラムが含まれている。アプリケーションプログラムには、画像処理プログラム202が含まれている。この画像処理プログラム202は、例えば、カメラモジュール109を用いて撮影された画像に含まれる、被写体上の写り込みを低減する機能等を有する。
 また、CPU101は、BIOS-ROM105に格納された基本入出力システム(BIOS)も実行する。BIOSは、ハードウェア制御のためのプログラムである。
 システムコントローラ102は、CPU101のローカルバスと各種コンポーネントとの間を接続するデバイスである。システムコントローラ102には、主メモリ103をアクセス制御するメモリコントローラも内蔵されている。また、システムコントローラ102は、PCI EXPRESS規格のシリアルバスなどを介してグラフィクスコントローラ104との通信を実行する機能も有している。
 グラフィクスコントローラ104は、本タブレットコンピュータ10のディスプレイモニタとして使用されるLCD17Aを制御する表示コントローラである。このグラフィクスコントローラ104によって生成される表示信号はLCD17Aに送られる。LCD17Aは、表示信号に基づいて画面イメージを表示する。このLCD17A上にはタッチパネル17Bが配置されている。
 さらに、システムコントローラ102は、サウンドコントローラ110との通信を実行する機能も有している。サウンドコントローラ110は音源デバイスであり、再生対象のオーディオデータをスピーカ18に出力する。
 無線通信デバイス107は、無線LAN又は3G移動通信などの無線通信を実行するように構成されたデバイスである。EC108は、電力管理のためのエンベデッドコントローラを含むワンチップマイクロコンピュータである。EC108は、ユーザによるパワーボタンの操作に応じて本タブレットコンピュータ10を電源オン又は電源オフする機能を有している。
 カメラモジュール109は、例えば、ユーザが、タッチスクリーンディスプレイ17の画面上に表示されたボタン(グラフィカルオブジェクト)をタッチ(タップ)したことに応じて、画像を撮影する。カメラモジュール109は、動画像のような、連続した複数の画像を撮影することもできる。
 位置センサ111は、タブレットコンピュータ10が使用されている位置(場所)を検出する。位置センサ111によって検出された位置データを用いて、例えば、タブレットコンピュータ10が使用されている部屋が識別される。また、動きセンサ112は、タブレットコンピュータ10の動きを検出する。動きセンサ112は、例えば、加速度センサ、ジャイロセンサ、等である。
 ところで、カメラモジュール109を用いて、ホワイトボードや光沢紙のような反射による写り込み(グレア)が生じやすい被写体を撮影した場合、撮影された画像上に、日光や室内の蛍光灯等に起因する、いわゆる白とび(flared highlights)が写り込むことがある。画像上で白とびが写り込んだ領域では、例えば、ホワイトボードに書き込まれた文字や図形が欠落してしまう可能性がある。
 そのため、本実施形態では、異なる位置や角度から被写体を撮影することによって得られた複数の画像、すなわち、画像上の異なる位置に白とび(写り込み)が生じた複数の画像を用いて、写り込みが軽減された画像を生成する。
 図3は、画像上の異なる位置に写り込みが生じた2枚の画像を用いて、写り込みが軽減された画像が生成される例を示す。 
 画像31,32は、被写体(例えば、ホワイトボード)を撮影することによって得られた画像である。画像(以下、基準画像とも称する)31には反射による写り込み(すなわち、白とび)311が生じている。また、画像(以下、参照画像とも称する)32には、例えば、基準画像31を撮影した位置とは異なる位置から被写体が撮影されることによって、基準画像31上の写り込み311とは異なる位置に写り込み321が生じている。
 本実施形態では、基準画像31に含まれる画素の内の写り込み311が生じていない画素と、参照画像32に含まれる画素の内の写り込み321が生じていない画素とを用いて、基準画像31と参照画像32とを合成することによって、写り込みが低減された画像34を生成することができる。
 ところで、基準画像31を撮影した後に参照画像32を撮影する場合に、基準画像31上の写り込み311を把握して、その写り込み311を軽減できる位置から被写体を撮影することは、ユーザにとって煩雑な作業である可能性が高い。例えば、カメラモジュール109を移動させたことによって被写体に対する角度が変わった場合、カメラモジュール109によって撮影される画像(プレビュー画像)上ではその被写体の見え方が変化する。これによって、基準画像31上の写り込み311が、プレビュー画像(参照画像32)上のどこに対応するかを把握することは、ユーザにとって困難である可能性がある。
 そのため本実施形態では、基準画像31上に捉えられた写り込み311を軽減するための画像を効率的に取得できるように、写り込み311を軽減できる参照画像32や、写り込み311を軽減できる度合いが高い参照画像32を自動的に取得したり、またそのような参照画像32であることをユーザに通知したりする。
 図4を参照して、タブレットコンピュータ10によって実行される画像処理プログラム202の機能構成について説明する。この画像処理プログラム202は、写り込みが低減された画像を生成する機能と、写り込みを低減するための画像の取得を支援する機能とを有する。以下では、図5に示すように、カメラモジュール109によって、被写体(例えば、ホワイトボード)が撮影された1枚の基準画像(第1画像)51が既に生成されている場合を想定する。この基準画像51は、例えば、ユーザによって撮影が指示されたことに応じて、カメラモジュール109によって生成された画像である。
 画像処理プログラム202は、例えば、写り込み検出部41、機能オン/オフ部42、プレビュー処理部43、対応点検出部44、位置合わせ部45、通知処理部46、参照画像生成部47、合成画像生成部48、等を備える。
 写り込み検出部41は、入力される画像から写り込み領域を検出する。例えば、写り込み検出部41は、基準画像51から第1写り込み領域511を検出する。写り込み検出部41は、例えば、画像内のある画素に、写り込みに起因する白とびが発生しているか否かを推定し、その推定結果に基づく評価値を算出する。この評価値には、例えば、白とび(写り込み)が発生している可能性が高いほど、小さな評価値が設定される。換言すると、この評価値には、写り込みが発生している可能性が低く、写り込みの軽減に適しているほど、大きな評価値が設定される。写り込み検出部41は、基準画像51内の画素に対応する第1評価値を算出し、しきい値未満の評価値を有する画素群を第1写り込み領域511として検出する。
 機能オン/オフ部42は、基準画像51から第1写り込み領域511が検出されたか否かに基づいて、写り込み低減機能を有効(オン)又は無効(オフ)に設定する。機能オン/オフ部42は、基準画像51から第1写り込み領域511が検出された場合、写り込み低減機能を有効に設定する。一方、機能オン/オフ部42は、基準画像51から第1写り込み領域511が検出されていない場合、写り込み低減機能を無効に設定する。
 なお、機能オン/オフ部42は、タブレットコンピュータ10が現在利用されている位置を示す位置データと機能利用履歴データ49とを用いて、写り込み低減機能の有効又は無効を設定してもよい。機能オン/オフ部42は、ある被写体の撮影時における写り込み低減機能の利用の履歴を保存しておき、写り込み低減機能が過去に利用された被写体が撮影される場合や、写り込み低減機能が過去に利用された環境(例えば、部屋)で撮影が行われる場合に、写り込み低減機能を有効に設定する。位置データは、例えば位置センサ111を用いて取得される。
 図6は、機能利用履歴データ49の一構成例を示す。機能利用履歴データ49は、複数の位置データに対応する複数のエントリを有する。各エントリは、例えば、ID、位置データ、写り込み低減機能オン/オフを含む。ある位置データに対応するエントリにおいて、「ID」は、その位置データに付与された識別情報を示す。「位置データ」は、写り込み低減機能のオン又はオフが決定された位置の位置データを示す。この位置データは、緯度・経度のような座標で示されるデータや、部屋の名称(例えば、会議室)のような場所の名称で示されるデータ等、位置(場所)を識別可能なデータであればよい。「写り込み低減機能オン/オフ」は、その位置データで示される位置で、写り込み低減機能が有効と無効のいずれに設定されたかを示す。
 機能オン/オフ部42は、機能利用履歴データ49から現在の位置データに対応するエントリを読み出し、当該エントリの「写り込み低減機能のオン/オフ」の値に基づいて写り込み低減機能の有効又は無効を設定する。そして、機能オン/オフ部42は、機能利用履歴データ49内に現在の位置データに対応するエントリがない場合に、上述したように、基準画像51内の第1写り込み領域511の有無に基づいて写り込み低減機能の有効又は無効を設定してもよい。
 なお、機能利用履歴データ49には、被写体を識別するための画像特徴量が含まれていてもよい。その場合、機能オン/オフ部42は、基準画像51の画像特徴量を算出する。そして、機能オン/オフ部42は、算出された画像特徴量と、機能利用履歴データ49内の各エントリに示される画像特徴量とを用いたマッチングを行う。機能オン/オフ部42は、機能利用履歴データ49内に、算出された画像特徴量に対応(類似)する画像特徴量を含むエントリがある場合、当該エントリの「写り込み低減機能のオン/オフ」の値に基づいて写り込み低減機能の有効又は無効を設定する。
 通知処理部46は、写り込み低減機能の有効又は無効の設定に応じて、写り込み低減機能が有効又は無効に設定されたことをユーザに通知してもよい。通知処理部46は、例えば、写り込み低減機能の有効又は無効を示すボタンを画面に表示する。
 プレビュー処理部43は、写り込み低減機能がオンに設定された場合、カメラモジュール109によって撮影されている画像(以下、プレビュー画像とも称する)52をプレビュー表示する。プレビュー処理部43は、例えば、カメラモジュール109によって連続的に生成されるプレビュー画像を画面に順次表示する。
 写り込み検出部41は、基準画像51から第1写り込み領域511を検出した場合と同様にして、カメラモジュール109を用いて撮影されている被写体のプレビュー画像52から第2写り込み領域521を検出する。
 次いで、対応点検出部44は基準画像51上の特徴点を検出する。この特徴点は、SIFT(scale-invariant feature transform)やSURF(speeded up robust features)等の、画像上での被写体の回転や変形にロバストな局所特徴量を用いて検出された画像内の角等を示し、一枚の画像から複数検出され得る。対応点検出部44は、基準画像51の場合と同様にしてプレビュー画像52上の特徴点を検出する。
 対応点検出部44は、基準画像51とプレビュー画像52との対応点を検出する。対応点検出部44は、基準画像51及びプレビュー画像52から検出された特徴点を用いて、基準画像51上の特徴点に対応する、プレビュー画像52上の特徴点を検出することによって、基準画像51とプレビュー画像52との対応点を検出する。
 位置合わせ部45は、検出された対応点に基づいて、基準画像51とプレビュー画像52とを位置合わせする。より具体的には、位置合わせ部45は、対応点を用いて、基準画像51上の特徴点の位置を、プレビュー画像52上の対応する特徴点の位置に一致させる変換係数(例えば、射影変換係数)を算出する。位置合わせ部45は、例えば、最小二乗法やRANSAC(random sample consensus)を用いて、対応点から変換係数を推定する。
 そして、位置合わせ部45は、基準画像51とプレビュー画像52との対応点に基づいて、基準画像51上の第1写り込み領域511を、プレビュー画像52上の対応する領域522に変換する。より具体的には、位置合わせ部45は、対応点を用いて算出された射影変換係数に基づいて、基準画像51上の第1写り込み領域511を、プレビュー画像52上の対応する領域(以下、変換写り込み領域とも称する)522に射影変換する。なお、この変換は、射影変換に限らず、アフィン変換、平行移動、等であってもよい。
 通知処理部46は、被写体(例えば、ホワイトボード)上での第1写り込み領域511と第2写り込み領域521とのずれの量をユーザに通知する。通知処理部46は、例えば、位置合わせ部45による変換結果を用いて、プレビュー画像52上の変換写り込み領域522と第2写り込み領域521とのずれの量をユーザに通知する。このずれの量は、例えば、変換写り込み領域522の内、第2写り込み領域521と重複していない領域に基づいて算出される。また、このずれの量は、変換写り込み領域522の大きさに対する、変換写り込み領域522の内の第2写り込み領域521と重複していない領域の大きさの割合によって表されてもよい。
 通知処理部46は、写り込み領域のずれの量を示す画像及びテキストの少なくとも一方を画面に表示する。ずれの量を示す画像には、例えば、レベルメータやアイコンが用いられる。また、通知処理部46は、タブレットコンピュータ10に設けられるランプ(LED等)の点灯又は点滅、当該ランプの色によって、ずれの量を通知してもよい。通知処理部46はさらに、ずれの量を示す音声をスピーカ18等から出力してもよい。
 また、参照画像生成部47及び合成画像生成部48は、被写体上での第1写り込み領域511(変換写り込み領域522)と第2写り込み領域521とのずれの量が第1しきい値以上である場合、基準画像51とプレビュー画像52とを用いて、第1写り込み領域511の写り込みが低減された写り込み低減画像を生成する。つまり、参照画像生成部47及び合成画像生成部48は、写り込み511,522のずれが十分に大きい場合に、写り込み低減画像を生成する。
 より具体的には、参照画像生成部47は、位置合わせ部45による変換結果を用いて、被写体上での第1写り込み領域511(変換写り込み領域522)と第2写り込み領域521とのずれの量が第1しきい値以上である場合、プレビュー表示中の画像52を用いて参照画像を生成する。つまり、参照画像生成部47は、基準画像51上の第1写り込み領域511とプレビュー画像52上の第2写り込み領域521とのずれに基づいて、ユーザによる指示なしに参照画像を自動的に生成することができる。これにより、写り込み低減画像を取得するための参照画像を効率的に取得することができる。なお、参照画像生成部47は、第1写り込み領域511(変換写り込み領域522)と第2写り込み領域521とが被写体上で全く重複していない場合に、プレビュー表示中の画像52を用いて参照画像を生成してもよい。
 合成画像生成部48は、基準画像51とプレビュー画像52とを用いて、第1写り込み領域511の写り込みが低減された写り込み低減画像を生成する。なお、合成画像生成部48は、新たな写り込み低減画像を生成するのではなく、プレビュー画像52内の画素を用いて、基準画像51の第1写り込み領域511内の画素を補完するようにしてもよい。写り込み低減画像を生成するための動作については、図9を参照して後述する。
 なお、参照画像生成部47及び合成画像生成部48は、被写体上での第1写り込み領域511(変換写り込み領域522)と第2写り込み領域521とのずれの量が第1しきい値以上であり、且つカメラモジュール109の動きの量が第2しきい値未満である場合に、基準画像51とプレビュー画像52とを用いて、第1写り込み領域511の写り込みが低減された写り込み低減画像を生成してもよい。つまり、参照画像生成部47及び合成画像生成部48は、写り込み511,521のずれの量が十分に大きく、カメラモジュール109の動きが安定した場合に、写り込み低減画像を生成する。これにより、カメラモジュール109の動きによるぶれなどが発生していないプレビュー画像52を用いて、写り込み低減画像を生成することができる。
 カメラモジュール109の動きの量は、例えば動きセンサ112によって検出される。参照画像生成部47及び合成画像生成部48は、写り込み511,521のずれの量が十分に大きく、カメラモジュール109の動きが安定したことを、動きセンサ112によって検出される動きデータに基づいて判定してもよい。
 また、表示中のプレビュー画像52は、例えば、カメラモジュール109による画像の更新レートに応じて更新される。画像処理プログラム202内の各部は、プレビュー画像52の更新に応じて、参照画像の取得を支援するための通知(例えば、基準画像51上の写り込み領域511とプレビュー画像52上の写り込み領域521とのずれを示す度合いの表示)も更新されるように構成される。なお、位置合わせ部45は、基準画像51とプレビュー画像52との位置合わせを行った後(すなわち、基準画像51とプレビュー画像52との間の変換係数を算出した後)、基準画像51上の写り込み領域511に対応する、プレビュー画像52上の領域522を、プレビュー画像52の更新毎に追跡してもよい。この追跡によって画像全体の位置合わせを行わずに済むので、処理量を削減することができる。
 さらに、参照画像生成部47及び合成画像生成部48は、連続して生成される複数のプレビュー画像52から、基準画像51内の第1写り込み領域511を効率的に低減できるプレビュー画像(例えば、第1写り込み領域511を低減する度合いが最大であるプレビュー画像)を選択し、そのプレビュー画像を参照画像として用いて、写り込み低減画像を生成してもよい。ここでは、説明を簡単にするために、2枚のプレビュー画像が撮影される場合、すなわち、カメラモジュール109を用いて被写体の第1プレビュー画像が撮影された後に、当該被写体の第2プレビュー画像がさらに撮影される場合を想定する。
 写り込み検出部41は、第1プレビュー画像が画面に表示されているとき、その第1プレビュー画像から、写り込みが発生している第2写り込み領域を検出し、また第2プレビュー画像が画面に表示されているとき、その第2プレビュー画像から、写り込みが発生している第3写り込み領域を検出する。そして、参照画像生成部47及び合成画像生成部48は、被写体上での第1写り込み領域511と第3写り込み領域とのずれの量が、被写体上での第1写り込み領域511と第2写り込み領域とのずれの量よりも大きい場合、基準画像51と第2プレビュー画像とを用いて写り込み低減画像を生成する。
 より具体的には、参照画像生成部47は、被写体上での第1写り込み領域511と第3写り込み領域とのずれの量が、被写体上での第1写り込み領域511と第2写り込み領域とのずれの量よりも大きい場合、第2プレビュー画像を用いて参照画像を生成する。つまり、参照画像生成部47は、基準画像51上の第1写り込み領域511と第1プレビュー画像上の第2写り込み領域とのずれと、基準画像51上の第1写り込み領域511と第2プレビュー画像上の第3写り込み領域とのずれとに基づいて、ユーザによる指示なしに参照画像を自動的に生成することができる。これにより、写り込み低減画像を取得するための参照画像を効率的に取得することができる。そして、合成画像生成部48は、基準画像51と第2プレビュー画像とを用いて、第1写り込み領域511の写り込みが低減された写り込み低減画像を生成する。
 参照画像生成部47及び合成画像生成部48は、カメラモジュール109の動きをさらに考慮して、参照画像を決定してもよい。すなわち、参照画像生成部47及び合成画像生成部48は、被写体上での第1写り込み領域511と第3写り込み領域とのずれの量が、被写体上での第1写り込み領域511と第2写り込み領域とのずれの量よりも大きく、且つカメラモジュール109の動きの量が第2しきい値未満である場合に、基準画像51と第2プレビュー画像とを用いて写り込み低減画像を生成する。
 以上の構成により、画像上に捉えられた写り込みを低減するための画像を効率的に取得し、写り込み低減画像を容易に生成することができる。
 次いで、図7は、写り込み低減機能がオンに設定される場合の画面の例を示す。この画面6には、カメラモジュール109を用いて撮影された基準画像61が表示されている。また、画面6には、写り込み低減機能のオン又はオフを示す「オン/オフ」ボタン62、既に保存されている画像ファイルをロードするための「ファイルを開く」ボタン63、撮影を指示するための「撮影」ボタン64、撮影される画像のズームイン/ズームアウトを調整するためのズームスライダ65、フラッシュのオン又はオフを設定するための「フラッシュ」ボタン66、等が設けられている。
 基準画像61には写り込み領域611が含まれている。そのため、機能オン/オフ部42は、この写り込み領域611を低減するために写り込み低減機能を自動的にオンに設定する。そして、通知処理部46は、写り込み低減機能がオンに設定された場合、画面6上の「オン/オフ」ボタン62が“オン(ON)”を示すように表示する。
 ユーザは、基準画像61に写り込み領域611が含まれている場合、この「オン/オフ」ボタン62を見ることによって、写り込み低減機能がオンになったことを確認することができる。
 また、図8に示すように、写り込み低減機能がオンに設定された場合、画面7にはカメラモジュール109によって撮影されるプレビュー画像71が、例えばリアルタイムで表示される。また、通知処理部46は、基準画像61内の写り込み領域611が、表示されているプレビュー画像71によって低減される度合いを示すインジケータ72を表示する。このプレビュー画像71によって写り込み領域611が低減される度合いは、例えば、基準画像61内の写り込み領域611に対応する、プレビュー画像71上の領域の内、プレビュー画像71内の写り込み領域711と重複していない領域に基づいて算出される。これによりユーザは、プレビュー画像71やインジケータ72を確認しながら、基準画像61内の写り込み領域611を低減するための参照画像の取得を、例えば「撮影」ボタン64を押し下げる操作によって指示することもできる。
 次いで、図9を参照して、基準画像31と参照画像32とを用いて写り込みが低減された画像が生成される例を説明する。図9に示す例では、基準画像31には反射による写り込み(白とび)311が生じ、また参照画像32には、基準画像31上の写り込み311とは異なる位置に写り込み321が生じている。
 合成画像生成部48は、基準画像31から、出力画像として取得する範囲に対応する切り出し範囲312を検出する。例えば、合成画像生成部48は、基準画像31に含まれる複数の画素の画素値(輝度値)を用いて、基準画像31内のエッジを検出する。そして、合成画像生成部48は、検出されたエッジによって構成される最大の四角形を切り出し範囲312として検出する。これにより、例えば、基準画像31内でホワイトボード(被写体)が写っている範囲を切り出し範囲312として検出することができる。
 対応点検出部44及び位置合わせ部45は、被写体(例えば、ホワイトボード)が撮影された基準画像31に対して、基準画像31とは異なる位置から当該被写体が撮影された参照画像32を位置合わせする。つまり、対応点検出部44及び位置合わせ部45は、参照画像32上の画素の位置が、基準画像31上の対応する画素の位置と一致するように、参照画像32を位置合わせする。
 まず、対応点検出部44は、基準画像31と参照画像32との対応点を検出する。より具体的には、対応点検出部44は、基準画像31と参照画像32の各々から特徴点を検出する。対応点検出部44は、基準画像31及び参照画像32から検出された特徴点を用いて、基準画像31上の特徴点に対応する、参照画像32上の特徴点を検出することによって、基準画像31と参照画像32との対応点を検出する。
 図9に示す例では、対応点検出部44は、基準画像31上の特徴点31Aに対応する、参照画像32上の特徴点32Aを検出している。つまり、対応点検出部44は、基準画像31上の特徴点31Aと参照画像32上の特徴点32Aとを対応点として検出する。同様に、対応点検出部44は、基準画像31上の特徴点31Bに対応する、参照画像32上の特徴点32Bを検出する。つまり、対応点検出部44は、基準画像31上の特徴点31Bと参照画像32上の特徴点32Bとを対応点として検出する。同様にして、対応点検出部44は、基準画像31と参照画像32との多数の対応点を検出する。
 位置合わせ部45は、検出された対応点に基づいて参照画像32を射影変換する。より具体的には、位置合わせ部45は、対応点を用いて、参照画像32上の画素を、対応する基準画像31上の画素と同じ位置に配置するための射影変換係数を算出する。そして、位置合わせ部45は、推定された射影変換係数に基づいて、参照画像32を射影変換した変換画像(以下、射影変換画像とも称する)33を生成する。つまり、位置合わせ部45は、この変換係数に基づいて、基準画像31内の画素と、参照画像32内の対応する画素とを決定する。この射影変換によって、図9に示すように、参照画像32上の写り込み321も、射影変換画像33上の写り込み331に変換されている。なお、射影変換画像33上の領域332は、射影変換画像33上の画素に対応する、参照画像32上の画素が存在しなかった領域を示している。
 写り込み検出部41は、基準画像31上の写り込み311と射影変換画像33上の写り込み331とを検出する。より具体的には、写り込み検出部41は、例えば、画像内のある画素に、写り込みに起因する白とびが発生しているか否かを推定し、その推定結果に基づく評価値を算出する。この評価値には、例えば、白とび(写り込み)が発生している可能性が高いほど、小さな評価値が設定される。したがって、写り込み検出部41は、基準画像31内の画素に対応する第1評価値を算出し、参照画像32が変換された射影変換画像33内の画素に対応する第2評価値を算出する。
 なお、上述したように、写り込み検出部41、対応点検出部44及び位置合わせ部45による処理は、プレビュー表示時に既に行われている場合がある。その場合には、既に得られている処理結果を用いることによって、参照画像32が取得された後に行われる同様の処理を省略することができる。
 次いで、合成画像生成部48は、基準画像31と射影変換画像33(すなわち、射影変換された参照画像32)とを合成することによって、写り込み低減画像34を生成する。
 より具体的には、合成画像生成部48は、算出された第1評価値と第2評価値とに基づいて、重みマップ(アルファマップ)を生成する。第1評価値は、基準画像31内の画素が、基準画像31と射影変換画像33との合成(すなわち、合成画像の算出)に適した画素である度合いを示す。第2評価値は、射影変換画像33内の画素が、基準画像31と射影変換画像33との合成に適した画素である度合いを示す。重みマップは、例えば、射影変換画像33と基準画像31とをアルファブレンディングするための重みαを含む。重みマップは、一方の画像上の画素に対する重みαを示す。重みαは、例えば、0から1までの値である。その場合、他方の画像上の画素に対する重みは(1-α)である。
 重みマップは、基準画像31上で白とびが検出された位置(例えば、第1評価値=0である位置)では、基準画像31の画素(画素値)に対する重みを小さくし、参照画像32の射影変換画像33の画素に対する重みを大きくするように構成される。また、重みマップは、射影変換画像33上で白とびが検出された位置(例えば、第2評価値=0である位置)では、基準画像31の画素に対する重みを大きくし、射影変換画像33の画素に対する重みを小さくするように構成される。
 つまり、重みマップは、第1評価値が、対応する第2評価値よりも大きい場合、基準画像31の画素(画素値)に対する重みを、射影変換画像33の画素に対する重みよりも大きくするように構成される。また、重みマップは、第1評価値が、対応する第2評価値よりも小さい場合、基準画像31の画素に対する重みを、射影変換画像33の画素に対する重みよりも小さくするように構成される。さらに、第1評価値が、対応する第2評価値と等しい場合、基準画像31の画素に対する重みと、射影変換画像33の画素に対する重みとが等しくなるように構成される。
 合成画像生成部48は、生成された重みマップに基づいて、基準画像31と参照画像32の射影変換画像33とを重み付け加算(アルファブレンディング)することによって、写り込み低減画像(合成画像)34を生成する。合成画像生成部48は、例えば、重みαで重み付けされた基準画像31内の画素の画素値と、重み(1-α)で重み付けされた射影変換画像33内の対応する画素の画素値との和を算出することによって、写り込み低減画像34を生成する。
 合成画像生成部48は、さらに、算出された写り込み低減画像34から、切り出し範囲312に対応する画像を切り出す。そして、合成画像生成部48は、切り出された画像に歪み補正(矩形補正)を施すことによって、写り込みが軽減され、且つ矩形に補正された画像35を生成する。これによりユーザは、写り込みが軽減され、且つ矩形に補正された画像35を閲覧することが可能になる。
 また、合成画像生成部48は、写り込み低減画像34(又は写り込みが軽減され、且つ矩形に補正された画像35)を新たな基準画像31に設定する。したがって、参照画像32を取得し、この参照画像32を用いて基準画像31上の写り込みを軽減する処理が繰り返されることによって、写り込み低減画像上の写り込み領域を小さくしていくことができる。合成画像生成部48は、任意の枚数の参照画像を用いて基準画像31上の写り込み311が低減される場合、例えば、写り込み低減画像34上の写り込み領域の大きさが第3しきい値未満になったことに応じて、撮影(すなわち、参照画像の取得)を終了する。通知処理部46は、この撮影の終了に応じて、撮影が終了したことを示すメッセージを画面に表示してもよい。
 次いで、図10のフローチャートを参照して、タブレットコンピュータ10によって実行される機能制御処理の手順の例を説明する。 
 まず、カメラモジュール109は基準画像51を検出する(ブロックB11)。写り込み検出部41は、基準画像51から写り込み領域511を検出する(ブロックB12)。
 次いで、基準画像51から写り込み領域511が検出された場合(ブロックB13のYES)、機能オン/オフ部42は写り込み低減機能をオンに設定する(ブロックB14)。基準画像51から写り込み領域511が検出されていない場合(ブロックB13のNO)、機能オン/オフ部42は写り込み低減機能をオフに設定する(ブロックB15)。
 また、図11のフローチャートは、タブレットコンピュータ10によって実行される写り込み低減処理の手順の例を示す。 
 プレビュー処理部43は、写り込み低減機能がオンに設定されているか否かを判定する(ブロックB21)。写り込み低減機能がオフに設定されている場合(ブロックB21のNO)、ブロックB21に戻り、写り込み低減機能がオンに設定されたか否かを再度判定される。
 写り込み低減機能がオンに設定されている場合(ブロックB21のYES)、プレビュー処理部43は、カメラモジュール109によって撮影されている画像(プレビュー画像)52を画面にプレビュー表示する(ブロックB22)。そして、写り込み検出部41は、表示中のプレビュー画像52から写り込み領域521を検出する(ブロックB23)。
 次いで、対応点検出部44は、基準画像51とプレビュー画像52との対応点を検出する(ブロックB24)。位置合わせ部45は、基準画像51上の写り込み領域511を、プレビュー画像52上の対応する領域(変換写り込み領域)522に変換する(ブロックB25)。
 参照画像生成部47は、位置合わせ部45による変換結果を用いて、基準画像51上の写り込み領域511(変換写り込み領域522)と、プレビュー画像52上の写り込み領域521との被写体上でのずれの量が第1しきい値以上であるか否かを判定する(ブロックB26)。参照画像生成部47は、例えば、基準画像51上の写り込み領域511の内、プレビュー画像52によって写り込みが低減される領域の割合が第1しきい値以上であるか否かに基づいて、写り込み領域511と写り込み領域521とが十分にずれているか否かを判定する。写り込み領域のずれが第1しきい値未満である場合(ブロックB26のNO)、ブロックB22に戻り、新たなプレビュー画像に対する処理が行われる。
 写り込み領域のずれが第1しきい値以上である場合(ブロックB26のYES)、参照画像生成部47は、プレビュー画像52を用いて参照画像を生成する(ブロックB27)。なお、参照画像生成部47はさらに、写り込み領域のずれの量が第1しきい値以上であって、カメラモジュール109の動きの量が第2しきい値未満である場合に、プレビュー画像52を用いて参照画像を生成してもよい。
 次いで、合成画像生成部48は、基準画像51と参照画像とを合成することによって、写り込み低減画像を生成する(ブロックB28)。合成画像生成部48は、例えば、写り込み検出部41、対応点検出部44及び位置合わせ部45と連携して、基準画像51と参照画像とを位置合わせし、位置合わせされた基準画像51と参照画像とをアルファブレンディングすることによって、写り込み低減画像を生成する。
 合成画像生成部48は、生成された写り込み低減画像内の写り込み量が第3しきい値未満であるか否かを判定する(ブロックB29)。写り込み量が第3しきい値以上である場合(ブロックB29のNO)、合成画像生成部48は、生成された写り込み低減画像を、新たな基準画像に設定し(ブロックB30)、この新たな基準画像と新たなプレビュー画像とを用いた処理を続行する。写り込み量が第3しきい値未満である場合(ブロックB29のYES)、処理を終了する。
 また、図12のフローチャートは、写り込み低減処理の手順の別の例を示す。 
 プレビュー処理部43は、写り込み低減機能がオンに設定されているか否かを判定する(ブロックB41)。写り込み低減機能がオフに設定されている場合(ブロックB41のNO)、ブロックB41に戻り、写り込み低減機能がオンに設定されたか否かを再度判定される。
 写り込み低減機能がオンに設定されている場合(ブロックB41のYES)、プレビュー処理部43は、カメラモジュール109によって撮影されている画像(プレビュー画像)52を画面にプレビュー表示する(ブロックB42)。そして、写り込み検出部41は、表示中のプレビュー画像52から写り込み領域521を検出する(ブロックB43)。
 次いで、対応点検出部44は、基準画像51とプレビュー画像52との対応点を検出する(ブロックB44)。位置合わせ部45は、基準画像51上の写り込み領域511を、プレビュー画像52上の対応する領域(変換写り込み領域)522に変換する(ブロックB45)。
 通知処理部46は、位置合わせ部45による変換結果を用いて、プレビュー画像52による写り込みの低減量を提示する(ブロックB46)。通知処理部46は、例えば、基準画像51上の写り込み領域511の内、プレビュー画像52によって写り込みが低減される領域の割合を示すインジケータを提示する。
 次いで、参照画像生成部47は、カメラモジュール(レンズ)109の動きの量が第2しきい値未満であるか否かを判定する(ブロックB47)。つまり、参照画像生成部47は、動きセンサ112によって生成される動きデータを用いて、カメラモジュール109の位置が安定(例えば、ほぼ静止)しているか否かを判定する。カメラモジュール109の動きの量が第2しきい値以上である場合(ブロックB47のNO)、ブロックB42に戻り、新たなプレビュー画像に対する処理が行われる。
 カメラモジュール109の動きの量が第2しきい値未満である場合(ブロックB47のYES)、参照画像生成部47は、プレビュー画像52を用いて参照画像を生成する(ブロックB48)。そして、合成画像生成部48は、基準画像51と参照画像とを合成することによって、写り込み低減画像を生成する(ブロックB49)。合成画像生成部48は、例えば、写り込み検出部41、対応点検出部44及び位置合わせ部45と連携して、基準画像51と参照画像とを位置合わせし、位置合わせされた基準画像51と参照画像とをアルファブレンディングすることによって、写り込み低減画像を生成する。
 また、合成画像生成部48は、生成された写り込み低減画像内の写り込み量が第3しきい値未満であるか否かを判定する(ブロックB50)。写り込み量が第3しきい値以上である場合(ブロックB50のNO)、合成画像生成部48は、生成された写り込み低減画像を、新たな基準画像に設定し(ブロックB51)、この新たな基準画像と新たなプレビュー画像とを用いた処理を続行する。写り込み量が第3しきい値未満である場合(ブロックB50のYES)、処理を終了する。
 以上説明したように、本実施形態によれば、画像上に捉えられた写り込みを軽減するための画像を効率的に取得することができる。写り込み検出部41は、被写体が撮影された基準画像51から、写り込みが発生している第1写り込み領域511を検出し、カメラモジュール109を用いて撮影されている被写体のプレビュー画像52から、写り込みが発生している第2写り込み領域521を検出する。合成画像生成部48は、被写体上での第1写り込み領域511と第2写り込み領域521とのずれの量が第1しきい値以上である場合、基準画像51とプレビュー画像52とを用いて、第1写り込み領域511の写り込みが低減された写り込み低減画像を生成する。これにより、写り込みが低減された画像を取得するための参照画像(プレビュー画像52)を効率的に取得し、写り込み低減画像を容易に生成することができる。
 なお、図10から図12のフローチャートで説明した本実施形態の処理手順は全てソフトウェアによって実行することができる。このため、この処理手順を実行するプログラムを格納したコンピュータ読み取り可能な記憶媒体を通じてこのプログラムを通常のコンピュータにインストールして実行するだけで、本実施形態と同様の効果を容易に実現することができる。
 ここで説明したシステムの様々なモジュールは、ソフトウェアアプリケーション、ハードウェア及び/又はソフトウェアのモジュール、あるいは、サーバのような1つ以上のコンピュータ上のコンポーネントとして実現することができる。様々なモジュールを別々に示したが、これらは、同一の根本的なロジック又はコードのいくつか又はすべてを共有することが可能である。
 本発明のいくつかの実施形態を説明したが、これらの実施形態は、例として提示したものであり、発明の範囲を限定することは意図していない。これら新規な実施形態は、その他の様々な形態で実施されることが可能であり、発明の要旨を逸脱しない範囲で、種々の省略、置き換え、変更を行うことができる。これら実施形態やその変形は、発明の範囲や要旨に含まれるとともに、特許請求の範囲に記載された発明とその均等の範囲に含まれる。

Claims (14)

  1.  被写体が撮影された第1画像から、写り込みが発生している第1領域を検出し、カメラモジュールを用いて撮影されている前記被写体の第2画像から、写り込みが発生している第2領域を検出する検出手段と、
     前記被写体上での前記第1領域と前記第2領域とのずれの量が第1しきい値以上である場合、前記第1画像と前記第2画像とを用いて、前記第1領域の写り込みが低減された第3画像を生成する生成手段とを具備する電子機器。
  2.  前記カメラモジュールの動きを検出するセンサをさらに具備し、
     前記生成手段は、前記ずれの量が前記第1しきい値以上であり、且つ前記動きの量が第2しきい値未満である場合に、前記第3画像を生成する請求項1記載の電子機器。
  3.  前記第2画像を画面にプレビュー表示する表示処理手段をさらに具備し、
     前記検出手段は、前記第2画像が前記画面に表示されているとき、前記第2領域を検出する請求項1記載の電子機器。
  4.  前記ずれの量をユーザに通知する通知手段をさらに具備する請求項1記載の電子機器。
  5.  前記通知手段は、前記ずれの量を示す画像及びテキストの少なくとも一方を画面に表示する請求項4記載の電子機器。
  6.  前記通知手段は、前記ずれの量を示す音声を出力する請求項4記載の電子機器。
  7.  前記第1画像と前記第2画像との対応点を検出する対応点検出手段をさらに具備し、
     前記通知手段は、前記対応点に基づいて、前記第1領域を、前記第2画像上の対応する第3領域に変換し、前記第3領域の内、前記第2領域と重複していない領域に基づいて前記ずれの量を通知する請求項4記載の電子機器。
  8.  前記検出手段は、さらに、前記カメラモジュールを用いて撮影されている前記被写体の第4画像から、写り込みが発生している第3領域を検出し、
     前記生成手段は、前記被写体上での前記第1領域と前記第3領域とのずれの量が、前記被写体上での前記第1領域と前記第2領域とのずれの量よりも大きい場合、前記第1画像と前記第4画像とを用いて、前記第3画像を生成する請求項1記載の電子機器。
  9.  前記カメラモジュールの動きを検出するセンサをさらに具備し、
     前記検出手段は、さらに、前記カメラモジュールを用いて撮影されている前記被写体の第4画像から、写り込みが発生している第3領域を検出し、
     前記生成手段は、前記被写体上での前記第1領域と前記第3領域とのずれの量が、前記被写体上での前記第1領域と前記第2領域とのずれの量よりも大きく、且つ前記動きの量が第2しきい値未満である場合に、前記第1画像と前記第4画像とを用いて、前記第3画像を生成する請求項1記載の電子機器。
  10.  前記第1画像と前記第2画像との対応点を検出する対応点検出手段をさらに具備し、
     前記生成手段は、前記対応点に基づいて、前記第1画像内の画素と前記第2画像内の対応する画素とを用いて前記第3画像を生成する請求項1記載の電子機器。
  11.  前記生成手段は、前記第1画像内の画素に対応する第1評価値を算出し、前記第2画像内の画素に対応する第2評価値を算出し、前記第1評価値と前記第2評価値とに基づいて重みを算出し、前記重みに基づいて、前記第1画像内の画素と前記第2画像内の対応する画素とを重み付け加算することによって、前記第3画像を生成する請求項10記載の電子機器。
  12.  前記生成手段は、前記対応点に基づく変換係数を算出し、前記変換係数に基づいて、前記第1画像内の画素と前記第2画像内の対応する画素とを決定する請求項11記載の電子機器。
  13.  被写体が撮影された第1画像から、写り込みが発生している第1領域を検出し、カメラモジュールを用いて撮影されている前記被写体の第2画像から、写り込みが発生している第2領域を検出し、
     前記被写体上での前記第1領域と前記第2領域とのずれの量が第1しきい値以上である場合、前記第1画像と前記第2画像とを用いて、前記第1領域の写り込みが低減された第3画像を生成する画像処理方法。
  14.  コンピュータにより実行されるプログラムであって、前記プログラムは、
     被写体が撮影された第1画像から、写り込みが発生している第1領域を検出し、カメラモジュールを用いて撮影されている前記被写体の第2画像から、写り込みが発生している第2領域を検出する手順と、
     前記被写体上での前記第1領域と前記第2領域とのずれの量が第1しきい値以上である場合、前記第1画像と前記第2画像とを用いて、前記第1領域の写り込みが低減された第3画像を生成する手順とを前記コンピュータに実行させるプログラム。
PCT/JP2014/056951 2014-03-14 2014-03-14 電子機器及び画像処理方法 WO2015136698A1 (ja)

Priority Applications (1)

Application Number Priority Date Filing Date Title
PCT/JP2014/056951 WO2015136698A1 (ja) 2014-03-14 2014-03-14 電子機器及び画像処理方法

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/JP2014/056951 WO2015136698A1 (ja) 2014-03-14 2014-03-14 電子機器及び画像処理方法

Publications (1)

Publication Number Publication Date
WO2015136698A1 true WO2015136698A1 (ja) 2015-09-17

Family

ID=54071175

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2014/056951 WO2015136698A1 (ja) 2014-03-14 2014-03-14 電子機器及び画像処理方法

Country Status (1)

Country Link
WO (1) WO2015136698A1 (ja)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH08307761A (ja) * 1995-05-12 1996-11-22 Minolta Co Ltd ディジタル式カメラ
JP2013229698A (ja) * 2012-04-25 2013-11-07 Casio Comput Co Ltd 撮像装置、画像処理装置、及び撮像処理方法並びにプログラム
WO2013190645A1 (ja) * 2012-06-20 2013-12-27 株式会社日立製作所 自動画像合成装置

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH08307761A (ja) * 1995-05-12 1996-11-22 Minolta Co Ltd ディジタル式カメラ
JP2013229698A (ja) * 2012-04-25 2013-11-07 Casio Comput Co Ltd 撮像装置、画像処理装置、及び撮像処理方法並びにプログラム
WO2013190645A1 (ja) * 2012-06-20 2013-12-27 株式会社日立製作所 自動画像合成装置

Similar Documents

Publication Publication Date Title
US10530998B2 (en) Image processing device, imaging device, image processing method, and program
US20220321775A1 (en) Method and terminal for acquiring panoramic image
US10585473B2 (en) Visual gestures
US10354162B2 (en) Information processing apparatus, information processing method, and storage medium
US20160073035A1 (en) Electronic apparatus and notification control method
KR20160016068A (ko) 이미지 생성 방법 및 그 전자 장치
JP2013182483A (ja) 画像処理装置及び画像処理方法並びにプログラム
WO2018184260A1 (zh) 文档图像的校正方法及装置
US9628706B2 (en) Method for capturing and displaying preview image and electronic device thereof
EP3163423A1 (en) Method and device for setting background of ui control and terminal
JP6260241B2 (ja) ユーザの入力を受け付けるシステム、プログラムおよび方法
JP2017130735A (ja) 表示制御装置、表示制御方法及びコンピュータプログラム
JP2019012361A (ja) 情報処理装置、プログラム及び情報処理方法
US20150348324A1 (en) Projecting a virtual image at a physical surface
JP5811495B2 (ja) 画像表示装置、画像表示方法、及びプログラム
JP2015126326A (ja) 電子機器及び画像処理方法
WO2020244592A1 (zh) 物品取放检测系统、方法及装置
WO2018171363A1 (zh) 一种位置信息确定方法、投影设备和计算机存储介质
JP6092371B2 (ja) 電子機器および画像処理方法
CN112351271A (zh) 一种摄像头的遮挡检测方法、装置、存储介质和电子设备
US20160309086A1 (en) Electronic device and method
WO2015136698A1 (ja) 電子機器及び画像処理方法
JP2017162179A (ja) 情報処理装置、情報処理方法、及びプログラム
US9524702B2 (en) Display control device, display control method, and recording medium
WO2015136697A1 (ja) 電子機器及び画像処理方法

Legal Events

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

Ref document number: 14885743

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

NENP Non-entry into the national phase

Ref country code: JP

122 Ep: pct application non-entry in european phase

Ref document number: 14885743

Country of ref document: EP

Kind code of ref document: A1