JP2017228904A - Image processing method and image processing system - Google Patents

Image processing method and image processing system Download PDF

Info

Publication number
JP2017228904A
JP2017228904A JP2016122981A JP2016122981A JP2017228904A JP 2017228904 A JP2017228904 A JP 2017228904A JP 2016122981 A JP2016122981 A JP 2016122981A JP 2016122981 A JP2016122981 A JP 2016122981A JP 2017228904 A JP2017228904 A JP 2017228904A
Authority
JP
Japan
Prior art keywords
image
zoom magnification
images
image processing
imaging
Prior art date
Legal status (The legal status 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 status listed.)
Granted
Application number
JP2016122981A
Other languages
Japanese (ja)
Other versions
JP6708490B2 (en
Inventor
宏典 海田
Hironori Kaida
宏典 海田
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Canon Inc
Original Assignee
Canon Inc
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 Canon Inc filed Critical Canon Inc
Priority to JP2016122981A priority Critical patent/JP6708490B2/en
Publication of JP2017228904A publication Critical patent/JP2017228904A/en
Application granted granted Critical
Publication of JP6708490B2 publication Critical patent/JP6708490B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Image Processing (AREA)
  • Studio Devices (AREA)

Abstract

PROBLEM TO BE SOLVED: To eliminate the problem in that if manual zooming speed varies, a moving image or the like captured by manual zooming operation performed by a user may impart discomfort to a viewer.SOLUTION: An image processing method comprises an image processing step of performing at least a magnification varying process or a replacement process, the magnification varying process being such that each of at least some images of a plurality of images captured while a zooming operation is performed is enlarged or reduced so as to smooth a change in zooming magnification when the plurality of images are reproduced after processed, and the replacement process being such that replacement is carried out using some of the plurality of images thus captured. In the image processing step, the magnification varying process is performed for each of the plurality of images when a first condition is satisfied, and the replacement process is performed when a second condition different from the first condition is satisfied.SELECTED DRAWING: Figure 2

Description

本発明は、画像処理方法関し、特に、画像のズーム倍率を補正するための方法に関する。   The present invention relates to an image processing method, and more particularly to a method for correcting a zoom magnification of an image.

レンズユニットを有するデジタルカメラなどでは、ズームリングを手動で回転させるとズームインやズームアウトをしながら動画を撮像することができる。更に、スマートフォンなどのカメラ機能付き携帯電話では、タッチパネル上で2本の指を押し広げるように動かすピンチアウト操作をすることで、ユーザの指に合わせて画像を拡大または縮小する電子ズームをしながら動画を撮影することができる。しかしながら、これらの操作を行う際に、ズーム速度が不均一となってしまうことがある。たとえば、ズームリングを手動で回転させる際は、回転速度が安定せず、ズーム速度が不均一な動画となってしまう場合がある。または、ピンチアウトを均一の速度でゆっくりと行うことは容易ではなく、やはりズーム速度が不均一な動画となってしまう場合がある。   In a digital camera or the like having a lens unit, a moving image can be captured while zooming in and out by manually rotating the zoom ring. Furthermore, in a mobile phone with a camera function such as a smartphone, by performing a pinch-out operation that moves two fingers on the touch panel so as to spread, an electronic zoom is performed to enlarge or reduce the image according to the user's finger. You can shoot movies. However, when performing these operations, the zoom speed may become non-uniform. For example, when the zoom ring is manually rotated, the rotation speed may not be stable, and the zoom speed may be uneven. Alternatively, it is not easy to perform pinch out slowly at a uniform speed, and there may be a moving image with a nonuniform zoom speed.

上記の課題に対して、特許文献1では、ズーム速度が不均一な動画に対して、各フレームの画像を拡大又は縮小することにより、ズーム速度が安定した滑らかな動画を生成する技術が開示されている。   With respect to the above problem, Patent Document 1 discloses a technique for generating a smooth moving image with a stable zoom speed by enlarging or reducing an image of each frame with respect to a moving image with a non-uniform zoom speed. ing.

特開2011−40945号公報JP 2011-40945 A

しかし、ズーム速度が不均一な動画に対し、各フレームの画像を拡大または縮小することにより、ズーム速度が安定した滑らかな動画を生成する際に、各フレームの画像を拡大する拡大率が高過ぎると画像がぼけてしまうといった課題がある。また、各フレーム画像を縮小する縮小率が高過ぎると、生成したい出力画像サイズよりも小さくなってしまい、画像情報が欠落する領域が発生してしまうといった課題がある。   However, when generating a smooth video with a stable zoom speed by enlarging or reducing the image of each frame for a video with a non-uniform zoom speed, the enlargement ratio for enlarging the image of each frame is too high. There is a problem that the image is blurred. Further, if the reduction ratio for reducing each frame image is too high, there is a problem that an output image size to be generated becomes smaller and an area where image information is missing occurs.

前述の特許文献1では、各フレーム画像を拡大又は縮小し滑らかな動画を生成する例について記載されているが、拡大する際の画像のぼけや縮小する際の画像情報の欠落領域を考慮した滑らかな動画の生成については言及がない。   In the above-described Patent Document 1, an example in which each frame image is enlarged or reduced to generate a smooth moving image is described. However, smoothness in consideration of a blurred area of an image at the time of enlargement or a missing area of image information at the time of reduction. There is no mention of the creation of a simple video.

本発明は、上記の問題点を鑑みてなされたものであり、画質の悪化を抑制しつつ、ズーム速度の安定性を改善した動画を生成することを目的とする。   The present invention has been made in view of the above-described problems, and an object of the present invention is to generate a moving image with improved zoom speed stability while suppressing deterioration in image quality.

本発明は、ズーム動作を行いながら撮像した複数の画像の少なくとも一部の画像の各々に対して、前記複数の画像を処理後に再生するときのズーム倍率の変化が滑らかになるように、拡大または縮小を行う変倍処理、および、前記撮像した複数の画像の一部を用いて置き換える置換処理の、少なくともいずれかを行う画像処理工程を有し、前記画像処理工程において、前記複数の画像の各々に対して、第1の条件を満たす場合に前記変倍処理を行い、前記第1の条件とは異なる第2の条件を満たす場合に前記置換処理を行うことを特徴とする画像処理方法を提供するものである。   In the present invention, for each of at least a part of a plurality of images captured while performing a zoom operation, the zoom magnification or the change when reproducing the plurality of images after processing is smoothed. An image processing step for performing at least one of a scaling process for performing reduction and a replacement process for replacing part of the plurality of captured images, and each of the plurality of images in the image processing step On the other hand, an image processing method is provided in which the scaling process is performed when a first condition is satisfied, and the replacement process is performed when a second condition different from the first condition is satisfied. To do.

本発明によれば、ズーム動作しながら撮像した動画を、画像の画質の悪化が少なく、かつ、画像のズーム倍率の変化を滑らかにすることができる。   According to the present invention, it is possible to reduce a deterioration in image quality of a moving image captured while performing a zoom operation, and to smoothly change the zoom magnification of the image.

本発明におけるデジタルカメラの構造を示すための図である。It is a figure for showing the structure of the digital camera in the present invention. 第1の実施形態における動画のズームの安定性を改善するための処理を示すフローチャートである。It is a flowchart which shows the process for improving the stability of the zoom of the moving image in 1st Embodiment. 第1の実施形態におけるズーム倍率と時間との関係を説明するための図である。It is a figure for demonstrating the relationship between the zoom magnification and time in 1st Embodiment. 本発明における縮小処理を説明するための図である。It is a figure for demonstrating the reduction process in this invention. 本発明における拡大処理およびトリミング処理を説明するための図である。It is a figure for demonstrating the expansion process and trimming process in this invention. 第1の実施形態における置き換える処理を説明するための図である。It is a figure for demonstrating the replacement process in 1st Embodiment. 第2の実施形態における動画のズームの安定性を改善するための処理を示すフローチャートである。It is a flowchart which shows the process for improving the stability of the zoom of the moving image in 2nd Embodiment. 第2の実施形態における算出したデジタルカメラ100の位置を説明するための図である。It is a figure for demonstrating the position of the digital camera 100 calculated in 2nd Embodiment. 第3の実施形態における動画のズームの安定性を改善するための処理を示すフローチャートである。It is a flowchart which shows the process for improving the stability of the zoom of the moving image in 3rd Embodiment. 第3の実施形態における第1の画像と第2の画像との信号値の比較を説明するための図である。It is a figure for demonstrating the comparison of the signal value of the 1st image and 2nd image in 3rd Embodiment. 第3の実施形態における非動体領域と動体領域とを示す図である。It is a figure which shows the non-moving body area | region and moving body area | region in 3rd Embodiment.

以下では、添付の図面を参照しながら、本発明の好適な実施形態について詳細に説明する。なお、以下の説明では、デジタルカメラを例にあげて説明を行うが、デジタルカメラに限定されるわけでなく、ズーム動作を行って撮像された動画を取得可能で、画像に対して拡大および縮小処理を行うことができる画像処理装置であれば、本発明を適用できる。また、以下では、ズームイン(望遠側へのズーム動作)の場合について説明するが、ズームアウト(広角側へのズーム動作)の場合にも適用することができる。また、ここでは、動画撮像時にユーザがズームリングを操作することによってズームレンズが駆動された場合の例について説明を行うが、これに限定されるわけではない。ズームレバーの操作によってズームレンズの駆動を行う場合や、ピンチアウトの操作によって画像を拡大または縮小処理する電子ズームを行う場合にも、本発明を適用することができる。   Hereinafter, preferred embodiments of the present invention will be described in detail with reference to the accompanying drawings. In the following description, a digital camera will be described as an example. However, the present invention is not limited to a digital camera, and a moving image captured by performing a zoom operation can be acquired. The present invention can be applied to any image processing apparatus that can perform processing. In the following, the case of zooming in (zooming to the telephoto side) will be described, but the present invention can also be applied to the case of zooming out (zooming to the wide angle side). Here, an example in which the zoom lens is driven by the user operating the zoom ring during moving image capturing will be described, but the present invention is not limited to this. The present invention can also be applied to the case where the zoom lens is driven by the operation of the zoom lever or the case where the electronic zoom is performed to enlarge or reduce the image by the operation of pinch out.

(第1の実施形態)
デジタルカメラ100は、静止画および動画を撮像することができ、かつ、撮像中、ズーム動作が可能なものである。さらに、デジタルカメラ100は、撮像して保存した画像、または、外部から入力した画像に対して、拡大処理または縮小処理を行う変倍処理を行うことができる。図1は本実施形態に係るデジタルカメラ100の構造を示すブロック図である。
(First embodiment)
The digital camera 100 can capture still images and moving images, and can perform a zoom operation during imaging. Furthermore, the digital camera 100 can perform a scaling process for performing an enlargement process or a reduction process on an image captured and stored or an image input from the outside. FIG. 1 is a block diagram showing the structure of a digital camera 100 according to this embodiment.

制御部101は、例えばCPUやMPUなどのシグナルプロセッサであり、予め後述するROM105に内蔵されたプログラムを読み出しながら、デジタルカメラ100の各部分を制御する。ユーザによる指令も、後述する操作部110によってデジタルカメラ100に入力され、制御部101を通して、デジタルカメラ100の各部分に達する。たとえば、後述するように、制御部101が、後述する撮像部104に対して撮像の開始と終了について指令を出す。または、後述する画像処理部107に対して、予めの設定に基づいて、画像処理の指令を出す。   The control unit 101 is a signal processor such as a CPU or an MPU, for example, and controls each part of the digital camera 100 while reading a program built in the ROM 105 described later. A command from the user is also input to the digital camera 100 by an operation unit 110 described later, and reaches each part of the digital camera 100 through the control unit 101. For example, as will be described later, the control unit 101 instructs the imaging unit 104 described later to start and end imaging. Alternatively, an image processing command is issued to an image processing unit 107 to be described later based on a preset setting.

駆動部102は、モーターなどによって構成され、制御部101の指令の下で、後述する光学系103を機械的に動作させる。たとえば、制御部101の指令に基づいて、駆動部102が光学系103に含まれるフォーカスレンズの位置を移動させ、光学系103の合焦位置を調整する。   The drive unit 102 is configured by a motor or the like, and mechanically operates an optical system 103 to be described later under a command from the control unit 101. For example, based on a command from the control unit 101, the driving unit 102 moves the position of the focus lens included in the optical system 103 and adjusts the focus position of the optical system 103.

光学系103は、ズームレンズ、フォーカスレンズ、および絞りなどにより構成される。絞りは、透過する光量を調整する機構である。本実施形態では、光学系103によるズーム動作は、前述したように、操作部110に含まれるズームリングをユーザが操作することによって行われる。光学系103には、ズームレンズの位置を検知するセンサーが設けられており、このセンサーの出力が制御部101に送信される。そのため、ユーザがズームリングを操作することでズーム動作を行った場合であっても、このセンサーの出力に基づいて、制御部101は光学系103のズーム倍率を把握することができる。   The optical system 103 includes a zoom lens, a focus lens, a diaphragm, and the like. The diaphragm is a mechanism that adjusts the amount of transmitted light. In the present embodiment, the zoom operation by the optical system 103 is performed by the user operating the zoom ring included in the operation unit 110 as described above. The optical system 103 is provided with a sensor that detects the position of the zoom lens, and the output of this sensor is transmitted to the control unit 101. Therefore, even when the user performs a zoom operation by operating the zoom ring, the control unit 101 can grasp the zoom magnification of the optical system 103 based on the output of the sensor.

撮像部104は、光電変換素子であり、入射された光信号を電気信号に変換する光電変換を行うものである。たとえば、撮像部104に、CCDセンサーやCMOSセンサーなどを適用することができる。撮像部104は、動画撮像モードを設け、時間的に連続する複数の画像を動画の各々のフレームとして、動画を撮像することができる。   The imaging unit 104 is a photoelectric conversion element, and performs photoelectric conversion that converts an incident optical signal into an electrical signal. For example, a CCD sensor, a CMOS sensor, or the like can be applied to the imaging unit 104. The imaging unit 104 is provided with a moving image capturing mode, and can capture a moving image using a plurality of temporally continuous images as respective frames of the moving image.

ROM105は、読み出し専用の不揮発性メモリであり、デジタルカメラ100が備える各ブロックの動作プログラムに加え、各ブロックの動作に必要なパラメータ等を記憶している。RAM106は、書き換え可能な揮発性メモリであり、デジタルカメラ100が備える各ブロックの動作において出力されたデータの一時的な記憶領域として用いられる。   The ROM 105 is a read-only nonvolatile memory, and stores parameters necessary for the operation of each block, in addition to the operation program for each block provided in the digital camera 100. The RAM 106 is a rewritable volatile memory, and is used as a temporary storage area for data output in the operation of each block included in the digital camera 100.

画像処理部107は、撮像部104から出力された画像、あるいは後述する内蔵メモリ109に記録されている画像信号のデータに対して、ホワイトバランス調整、色補間、フィルタリングなど、様々な画像処理を行う。また、撮像部104が撮像した画像信号のデータに対して、JPEGなどの規格で、圧縮処理を行う。特に、画像処理部107が、撮像部104または後述する内蔵メモリ109に保存されている画像に対して、電子ズームで拡大処理または縮小処理を行う変倍処理をすることができる。   The image processing unit 107 performs various image processing, such as white balance adjustment, color interpolation, and filtering, on the image output from the imaging unit 104 or image signal data recorded in the internal memory 109 described later. . Further, compression processing is performed on the data of the image signal captured by the imaging unit 104 in accordance with a standard such as JPEG. In particular, the image processing unit 107 can perform a scaling process for performing an enlargement process or a reduction process with an electronic zoom on an image stored in the imaging unit 104 or a built-in memory 109 described later.

画像処理部107は、特定の処理を行う回路を集めた集積回路(ASIC)で構成される。あるいは、制御部101がROM105から読み出したプログラムに従って処理することで、制御部101が画像処理部107の機能の一部または全部を兼用するようにしてもよい。制御部101が画像処理部107の全ての機能を兼用する場合には、画像処理部107をハードウェアとして有する必要はなくなる。   The image processing unit 107 includes an integrated circuit (ASIC) that collects circuits for performing specific processing. Alternatively, the control unit 101 may perform some or all of the functions of the image processing unit 107 by performing processing according to a program read from the ROM 105. When the control unit 101 has all the functions of the image processing unit 107, it is not necessary to have the image processing unit 107 as hardware.

表示部108は、RAM106に一時保存されている画像、または、後述する内蔵メモリ109に保存されている画像、デジタルカメラ100の設定画面などを表示するための液晶ディスプレイや有機ELディスプレイなどである。   The display unit 108 is a liquid crystal display, an organic EL display, or the like for displaying an image temporarily stored in the RAM 106, an image stored in an internal memory 109 described later, a setting screen of the digital camera 100, or the like.

内蔵メモリ109は、撮像部104が撮像した画像や画像処理部107の処理を得た画像などを記録する場所である。内蔵メモリの代わりに、メモリカードなどを用いてもよい。   The built-in memory 109 is a place for recording an image captured by the imaging unit 104, an image obtained by the processing of the image processing unit 107, and the like. A memory card or the like may be used instead of the built-in memory.

操作部110は、たとえば、デジタルカメラ100につけるボタンやスイッチ、キー、モードダイアルなど、あるいは、表示部108に兼用されるタッチパネルなどである。ユーザによる指令は、操作部110を経由して、制御部101に達する。また、操作部110は、光学系103に付属しているズームリングなども含む。ユーザによってズームリングの操作が行われると、このズームリングに連結された機構によって、制御部101を介さずに、光学系103に含まれるズームレンズの位置が変更される。   The operation unit 110 is, for example, a button, switch, key, or mode dial attached to the digital camera 100, or a touch panel that is also used as the display unit 108. A command from the user reaches the control unit 101 via the operation unit 110. The operation unit 110 also includes a zoom ring attached to the optical system 103. When the user operates the zoom ring, the position of the zoom lens included in the optical system 103 is changed by the mechanism connected to the zoom ring without using the control unit 101.

装置動き検出部111が、ジャイロセンサーによって構成され、デジタルカメラ100の動きを検出するデバイスであり、デジタルカメラ100の単位時間当たりの角度変化、すなわち角速度に基づいてヨー方向とピッチ方向との動きを検出する。   The apparatus motion detection unit 111 is a device configured by a gyro sensor to detect the motion of the digital camera 100. The device motion detection unit 111 detects the motion of the digital camera 100 in the yaw direction and the pitch direction based on the angular change per unit time, that is, the angular velocity. To detect.

図2は本実施形態における動画のズームの安定性を改善するための処理を示すフローチャートである。   FIG. 2 is a flowchart showing a process for improving the zoom stability of a moving image in the present embodiment.

ユーザがズームリングを動かしてズーム動作を行った動画を撮影、あるいは、このように撮影された動画を内蔵メモリ109から読み出すと、制御部101は、図2のフローチャートに示す処理を始める。動画の撮影時には、動画のフレームごとに制御部101が検知したズーム倍率の情報が、動画ともに内蔵メモリ109に格納されるものとする。なお、図2に示す処理は、撮像の直後に行ってもよいし、撮像した動画の再生時に行ってもよい。   When a user moves a zoom ring and takes a moving image that has been zoomed, or reads a moving image shot in this way from the built-in memory 109, the control unit 101 starts the process shown in the flowchart of FIG. At the time of shooting a moving image, information on the zoom magnification detected by the control unit 101 for each frame of the moving image is stored in the built-in memory 109 together with the moving image. Note that the process shown in FIG. 2 may be performed immediately after imaging, or may be performed when a captured moving image is played back.

ステップS201では、撮像した画像のそれぞれにおいて、制御部101が、撮像ズーム倍率を取得する。なお、撮像時に光学系103による光学ズームのみならず、画像処理部107において電子ズームが行われた場合は、光学ズームによるズーム倍率と電子ズームによるズーム倍率を掛け合わせたズーム倍率を撮像ズーム倍率としてフレームごとに取得する。   In step S201, the control unit 101 acquires the imaging zoom magnification in each captured image. When not only the optical zoom by the optical system 103 during imaging but also the electronic zoom is performed in the image processing unit 107, the zoom magnification obtained by multiplying the zoom magnification by the optical zoom and the zoom magnification by the electronic zoom is set as the imaging zoom magnification. Get every frame.

ステップS202において、制御部101が、ズーム倍率の変化を滑らかにするための補正ズーム倍率を算出する。補正ズーム倍率の算出、公知の方法を用いてよく、以下でその一例を簡単に説明する。   In step S202, the control unit 101 calculates a corrected zoom magnification for smoothing the change in the zoom magnification. The calculation of the correction zoom magnification, a known method may be used, and an example thereof will be briefly described below.

図3は、ズーム倍率と時間との関係を示す図である。折線301は、撮像ズーム倍率の変化を表す。時刻t0から時刻t1までの間に、ユーザが被写体の像を拡大させるようにズーム動作を行い、撮像ズーム倍率が大きくなる。時刻t1から時刻t3までの間に、ユーザがズーム動作を行わず、撮像ズーム倍率が一定に保っている。時刻t3から時刻t4までの間に、ユーザが再び、ユーザが被写体の像を拡大させるようにズーム動作を行い、撮像ズーム倍率が大きくなる。   FIG. 3 is a diagram illustrating a relationship between the zoom magnification and time. A broken line 301 represents a change in imaging zoom magnification. Between time t0 and time t1, the user performs a zoom operation so as to enlarge the subject image, and the imaging zoom magnification increases. Between time t1 and time t3, the user does not perform a zoom operation, and the imaging zoom magnification is kept constant. Between time t3 and time t4, the user again performs a zoom operation so that the user enlarges the image of the subject, and the imaging zoom magnification increases.

ユーザがズーム動作をするとき、一回の操作で、レンズリングを回しきれないことなどで、複数回に分けて操作しなければならない場合がある。上述のように、ユーザがズーム動作をするとき、一時止まるようなことがしばしば起きる。このような一時停止は、撮像した動画で不自然さを生じる原因になるので、ズーム動作を滑らかにする必要がある。その一例として、以下のように処理を行う。時刻t0から時刻t4までの間、ズーム倍率が一定の変化率で変化するように、補正ズーム倍率を算出し、ズーム倍率の調整を行う。直線302は、補正ズーム倍率を表す。各々の時刻で撮像した画像のズーム倍率を、補正ズーム倍率になるように、制御部101が、拡大または縮小の処理を行う。時刻t2のように、撮像ズーム倍率と補正ズーム倍率とが等しいとき、制御部101が、拡大または縮小の処理を行わない。   When the user performs a zoom operation, the lens ring may not be rotated by a single operation, and thus the user may have to perform the operation in multiple steps. As described above, when the user performs a zoom operation, it often happens that the user pauses. Since such a pause causes unnaturalness in the captured moving image, it is necessary to smooth the zoom operation. As an example, processing is performed as follows. From time t0 to time t4, the correction zoom magnification is calculated and the zoom magnification is adjusted so that the zoom magnification changes at a constant change rate. A straight line 302 represents the corrected zoom magnification. The control unit 101 performs enlargement or reduction processing so that the zoom magnification of the image captured at each time becomes the correction zoom magnification. At time t2, when the imaging zoom magnification and the correction zoom magnification are equal, the control unit 101 does not perform enlargement or reduction processing.

なお、以上の補正ズーム倍率は、時間に比例しているが、これは一例にすぎず、必ずしも時間に比例するようになるように補正ズーム倍率を算出するわけではない。補正ズーム倍率は、撮像ズーム倍率の変化にある程度沿うような平滑化曲線でも良い。   The above correction zoom magnification is proportional to time, but this is only an example, and the correction zoom magnification is not necessarily calculated so as to be proportional to time. The correction zoom magnification may be a smoothing curve that follows a change in the imaging zoom magnification to some extent.

次に、ステップS203に進み、撮像ズーム倍率と補正ズーム倍率とを比較する。撮像ズーム倍率と補正ズーム倍率との違いが大きすぎる場合、画像に対して拡大縮小処理をすると、画質が悪化するおそれがある。一例として、撮像ズーム倍率と補正ズーム倍率との比を算出し、予め定められた閾値と比較し、閾値未満の場合は、ステップS204に進み、閾値以上の場合、ステップS205に進む。ここで、計算上の便宜のため、撮像ズーム倍率と補正ズーム倍率との比の算出において、常に大きいほうを被除数とし、小さいほうを除数としてよい。   In step S203, the imaging zoom magnification is compared with the correction zoom magnification. If the difference between the imaging zoom magnification and the correction zoom magnification is too large, the image quality may deteriorate if the image is enlarged or reduced. As an example, the ratio between the imaging zoom magnification and the correction zoom magnification is calculated and compared with a predetermined threshold value. If the ratio is less than the threshold value, the process proceeds to step S204. If the ratio is greater than the threshold value, the process proceeds to step S205. Here, for convenience of calculation, in calculating the ratio between the imaging zoom magnification and the correction zoom magnification, the larger one may be always used as the dividend and the smaller one may be used as the divisor.

上述する閾値の決め方について、次に、例をあげて説明する。   Next, how to determine the threshold value will be described with an example.

補正ズーム倍率が撮像ズーム倍率よりも大きい場合、画像のズーム倍率を補正ズーム倍率にするために、撮像した画像を拡大する処理が必要である。閾値を決めるために、画像を拡大する際に生じる画像のぼけが許容できる限界を算出する必要がある。たとえば、撮像した画像において、微分フィルタやソーベルフィルタに代表されるエッジ検出フィルタ処理により、エッジ強度を算出する。こうしたエッジ強度を用いて、下記の(式1)に従い、拡大処理をする際の閾値を決める。なお、aおよびbは定数である。
拡大処理時の閾値=(a÷エッジ強度+b) ・・・(式1)
When the corrected zoom magnification is larger than the imaging zoom magnification, a process for enlarging the captured image is necessary to set the zoom magnification of the image to the corrected zoom magnification. In order to determine the threshold value, it is necessary to calculate a limit that allows image blurring when the image is enlarged. For example, in the captured image, the edge strength is calculated by edge detection filter processing represented by a differential filter and a Sobel filter. Using such edge strength, a threshold value for enlarging processing is determined according to (Equation 1) below. Note that a and b are constants.
Threshold value during enlargement processing = (a ÷ edge strength + b) (Expression 1)

エッジ強度が小さい場合は、平坦部から構成されている画像であるため、拡大してもぼけが目立ちにくい。そのため、閾値が高くなるようする。逆に、逆にエッジ強度が大きい場合は、テクスチャ部から構成されている画像であるため、拡大するとぼけが目立ちやすい。これを解消するために、閾値を小さくする。   When the edge strength is low, the image is composed of a flat portion, so that blurring is not noticeable even when enlarged. For this reason, the threshold value is increased. On the other hand, when the edge strength is high, the image is composed of a texture portion, and blurring tends to be noticeable when enlarged. In order to solve this, the threshold value is reduced.

補正ズーム倍率が撮像ズーム倍率よりも小さい場合、画像のズーム倍率を補正ズーム倍率にするために、撮像した画像を縮小する処理が必要である。図4は、縮小する際の閾値の決め方を説明するための図である。図4の領域400は、各々の画像を撮像する際に、撮像部104が撮像し、制御部101などに入力した画像であり、元画像と呼ぶ。領域401は、撮像した画像を表示部108に表示するとき、表示する範囲に相当する。ここで、領域401を表示領域と呼ぶ。本実施形態では、ズーム倍率の変化を滑らかにするために画像を縮小することを想定しているため、画像全体よりも小さな領域401に相当する画素数からなる画像データを表示領域に設定している。画像処理部107が、画像を縮小するとき、表示領域のサイズよりも画像が小さくなるように縮小してしまうと、画像の周囲に空白領域が出る。これを防ぐために、縮小処理をする際の閾値を、(式2)のように設定する必要がある。
縮小処理時の閾値=(元画像のサイズ)÷(表示領域のサイズ) ・・・(式2)
When the corrected zoom magnification is smaller than the imaging zoom magnification, a process of reducing the captured image is necessary to set the image zoom magnification to the corrected zoom magnification. FIG. 4 is a diagram for explaining how to determine a threshold value for reduction. A region 400 in FIG. 4 is an image captured by the imaging unit 104 and input to the control unit 101 or the like when each image is captured, and is referred to as an original image. An area 401 corresponds to a display range when a captured image is displayed on the display unit 108. Here, the area 401 is referred to as a display area. In this embodiment, since it is assumed that the image is reduced in order to smooth the change in zoom magnification, image data having the number of pixels corresponding to the area 401 smaller than the entire image is set in the display area. Yes. When the image processing unit 107 reduces the image so that the image becomes smaller than the size of the display area, a blank area appears around the image. In order to prevent this, it is necessary to set a threshold value for the reduction process as in (Equation 2).
Threshold during reduction processing = (size of original image) ÷ (size of display area) (Expression 2)

上記画像の水平のサイズと垂直のサイズの両方において、異なる計算結果が出る場合、どちらか計算結果が小さいほうを上記の閾値とする。   When different calculation results are obtained in both the horizontal size and the vertical size of the image, the smaller one of the calculation results is set as the threshold value.

上述のように、制御部101は、各々の画像が、拡大の処理と縮小の処理とどちらをされるかに応じて、異なる閾値の決め方を使い、閾値を設定する。   As described above, the control unit 101 sets a threshold value using a different threshold value determination method depending on whether each image is subjected to enlargement processing or reduction processing.

ステップS203で、撮像ズーム倍率と補正ズーム倍率との違いが閾値未満の場合、ステップS204に進む。ステップS204で、制御部101は、撮像した画像のズーム倍率を、補正ズーム倍率になるように、拡大処理または縮小処理を行い、新しい画像を生成する。以下では、ステップS204で生成した画像を、第1の画像と呼ぶ。   If the difference between the imaging zoom magnification and the correction zoom magnification is less than the threshold value in step S203, the process proceeds to step S204. In step S204, the control unit 101 performs enlargement processing or reduction processing so that the zoom magnification of the captured image becomes the correction zoom magnification, and generates a new image. Hereinafter, the image generated in step S204 is referred to as a first image.

図5は、本実施形態における拡大処理を示す図である。図5(a)は、撮像ズーム倍率で撮像した画像データであり、この画像に対して拡大処理を行う。まず、補正ズーム倍率に応じ、拡大処理を行う。このときの出力が図5(b)の拡大後の画像データとなる。しかしながらこの画像データはサイズが大きくなったので、制御部101がサイズを図5(a)と変わらないようにトリミング処理を行う。制御部101がトリミング処理を行った後の出力が図5(c)となり、トリミングを行う領域は、図5の領域501である。領域501の位置の決め方は、主被写体や、追尾被写体を検出し、トリミング位置の中心にする方法や、前後フレームの中心位置など様々な決め方が存在する。縮小処理を行う場合、同様に、主被写体や追尾被写体などの位置に応じて、トリミング処理を行う領域を調整することができる。以上の処理で第1の画像が生成できる。   FIG. 5 is a diagram showing an enlargement process in the present embodiment. FIG. 5A shows image data captured at the imaging zoom magnification, and enlargement processing is performed on this image. First, enlargement processing is performed according to the correction zoom magnification. The output at this time becomes the image data after enlargement in FIG. However, since the size of the image data has increased, the control unit 101 performs trimming processing so that the size does not change from that in FIG. The output after the control unit 101 performs the trimming process is shown in FIG. 5C, and the region to be trimmed is a region 501 in FIG. There are various methods for determining the position of the area 501 such as a method of detecting the main subject and the tracking subject and setting the center of the trimming position, and the center position of the front and rear frames. When performing the reduction process, similarly, the area to be trimmed can be adjusted according to the positions of the main subject and the tracking subject. The first image can be generated by the above processing.

なお、第1の画像の生成において、拡大縮小処理を行うため、ノイズの大きさが変わることがある。動画の複数のフレームの画像のノイズレベルが異なると、視聴者に違和感を与えるおそれがある。複数の画像にわたりノイズレベルが同じように保つために、必要に応じて、ノイズに対して補正処理を行ってよい。例えば、第1の画像に対してローパスフィルタ処理を行い、処理前後の画像の差分情報からノイズ成分を検出する。検出したノイズ成分に対して、拡大処理を行い、第1の画像を生成した場合には拡大処理前の画像に戻す縮小率で縮小処理をノイズ成分に対して行う。そして、検出した第1の画像のノイズ成分に対して縮小処理を施したノイズ成分に置き換える。あるいは、ノイズレベルの低い第1の画像に対して、ランダムノイズを付加する操作を行う。あるいは、第1の画像のノイズ成分に対して、第1の画像のフィルタ処理後の画像データで置き換えるようなノイズ低減処理を施してもよい。   Note that the magnitude of noise may change because the enlargement / reduction processing is performed in the generation of the first image. If the noise levels of the images of a plurality of frames of a moving image are different, the viewer may feel uncomfortable. In order to keep the noise level the same over a plurality of images, correction processing may be performed on noise as necessary. For example, low-pass filter processing is performed on the first image, and a noise component is detected from difference information between the images before and after the processing. Enlargement processing is performed on the detected noise component, and when the first image is generated, the reduction processing is performed on the noise component at a reduction ratio for returning to the image before the enlargement processing. Then, the detected noise component of the first image is replaced with a noise component that has been subjected to reduction processing. Alternatively, an operation of adding random noise is performed on the first image having a low noise level. Or you may perform the noise reduction process which replaces with the image data after the filter process of a 1st image with respect to the noise component of a 1st image.

ステップS203で、撮像ズーム倍率と補正ズーム倍率との違いが閾値よりも大きい場合、ステップS205に進む。ステップS205で、制御部101は、別の時刻で撮像した画像を用いて、撮像した画像に対して置き換える置換処理を行う。ステップS205で置き換えに用いた画像を、以下では第2の画像と呼ぶ。ステップS205での処理について、図3と図6とを用いて説明する。   If the difference between the imaging zoom magnification and the correction zoom magnification is greater than the threshold value in step S203, the process proceeds to step S205. In step S <b> 205, the control unit 101 performs replacement processing for replacing the captured image using an image captured at another time. The image used for replacement in step S205 is hereinafter referred to as a second image. The process in step S205 will be described with reference to FIGS.

たとえば、制御部101が、撮像部104が時刻t3で撮像した画像に対して、撮像ズーム倍率と補正ズーム倍率との比較を行い、閾値以上と判断したとする。補正ズーム倍率のまま拡大処理を行うと、ぼけなどで欠陥のある画像がでるおそれがある。かわりに、時刻t3の画像の補正ズーム倍率と等しい撮像ズーム倍率を有する画像(図3の点305が示す)を用いて置き換える。   For example, it is assumed that the control unit 101 compares the imaging zoom magnification and the correction zoom magnification with respect to the image captured by the imaging unit 104 at time t3 and determines that the image is equal to or greater than the threshold value. If the enlargement process is performed with the corrected zoom magnification, a defective image may be generated due to blur or the like. Instead, an image having an imaging zoom magnification equal to the correction zoom magnification of the image at time t3 (represented by a point 305 in FIG. 3) is used for replacement.

上述した処理で、異なる時刻で撮像した第2の画像で置き換えることで、画像のぼけや空白などの欠陥を防ぐことができる。   By replacing the second image captured at a different time with the above-described processing, it is possible to prevent defects such as blurring and blanking of the image.

図6では、複数の画像にわたって置き換えの様子を示す図である。図6(a)は、ズーム動作中、撮像部104が時間的に連続して撮像した画像からなる画像群を示し、図6(b)は、前述したステップS204またはステップS205の処理で生成した第1の画像または第2の画像からなる画像群を示す。画像601乃至608の上に書いてある数字は、撮像ズーム倍率を示す。画像611乃至618の上に書いてある数字は、補正ズーム倍率を意味する。画像601乃至603はズーム倍率が変わっていないため、ズーム動作を滑らかにするには、前述したようなズーム倍率の調整をする必要がある。ここでは、画像601乃至608のズーム倍率を、公差が1で初項が9の等差数列になるように調整することを例とする。そうすると、各々の画像の倍率は、図6(b)の画像611乃至618の上に書いてある数字の倍率になる。   FIG. 6 is a diagram showing a state of replacement over a plurality of images. FIG. 6A shows an image group made up of images taken continuously in time by the imaging unit 104 during the zoom operation, and FIG. 6B is generated by the processing in step S204 or step S205 described above. The image group which consists of a 1st image or a 2nd image is shown. The numbers written on the images 601 to 608 indicate the imaging zoom magnification. The numbers written on the images 611 to 618 mean the correction zoom magnification. Since the zoom magnifications of the images 601 to 603 have not changed, it is necessary to adjust the zoom magnification as described above in order to smooth the zoom operation. Here, as an example, the zoom magnifications of the images 601 to 608 are adjusted so as to be an equidistant sequence having a tolerance of 1 and an initial term of 9. Then, the magnification of each image becomes the magnification of the numbers written on the images 611 to 618 in FIG.

ここで、まず、画像601乃至608のそれぞれを、第1の画像を生成する場合の拡大率(ステップS203における撮像ズーム倍率と補正ズーム倍率との比)を算出する。この拡大率を、制御部101が、前述した予め定められた閾値と比較し、第1の画像を生成するか、第2の画像を生成するかを決める。ここで、閾値を1.3と仮定する。   Here, first, for each of the images 601 to 608, an enlargement ratio (ratio between the imaging zoom magnification and the correction zoom magnification in step S203) when the first image is generated is calculated. The control unit 101 compares the enlargement ratio with the above-described predetermined threshold value, and determines whether to generate the first image or the second image. Here, the threshold is assumed to be 1.3.

画像601の撮像ズーム倍率と補正ズーム倍率との比は9÷8=1.125<1.3なので、制御部101は、画像601の処理において、第1の画像を生成することを決める。つまり、制御部101は、画像601を、補正ズーム倍率まで拡大処理を行い、画像611を生成する。同様な処理は、撮像ズーム倍率と補正ズーム倍率との比が閾値未満な画像602、606、607および608にも適用する。   Since the ratio between the imaging zoom magnification and the correction zoom magnification of the image 601 is 9 ÷ 8 = 1.125 <1.3, the control unit 101 determines to generate the first image in the processing of the image 601. That is, the control unit 101 enlarges the image 601 to the correction zoom magnification, and generates the image 611. Similar processing is also applied to images 602, 606, 607, and 608 in which the ratio between the imaging zoom magnification and the correction zoom magnification is less than the threshold.

一方、画像603の撮像ズーム倍率と補正ズーム倍率との比は11÷8=1.373≧1.3なので、制御部101は、画像603の処理において、第1の画像を生成することを決める。つまり、制御部101は、画像603の補正ズーム倍率と等しい撮像ズーム倍率を持つ画像606を、画像603の処理における第2の画像613として置き換える。同様な処理は、撮像ズーム倍率と補正ズーム倍率との比が閾値以上の画像604、605および606にも適用する。   On the other hand, since the ratio between the imaging zoom magnification and the correction zoom magnification of the image 603 is 11 ÷ 8 = 1.373 ≧ 1.3, the control unit 101 determines to generate the first image in the processing of the image 603. . In other words, the control unit 101 replaces the image 606 having the imaging zoom magnification equal to the correction zoom magnification of the image 603 as the second image 613 in the processing of the image 603. Similar processing is also applied to images 604, 605, and 606 in which the ratio between the imaging zoom magnification and the correction zoom magnification is greater than or equal to a threshold value.

上述した処理によれば、撮像ズーム倍率と補正ズーム倍率との比較を行い、比較の結果に応じて、第1の画像と第2の画像とを選択的に生成し、滑らかなズーム動作を実現できる。ただし、連続しない時間で第1の画像と第2の画像とを撮像したため、第1の画像と第2の画像とは画質に差が出ることがある。これを解決するために、一部の画像に対して、各種画像処理を行う必要な場合がある。たとえば、公知技術である歪曲収差補正、周辺光量補正、明るさ補正、ホワイトバランス補正や幾何変換処理などがあげられる。制御部101が、時間的に連続するステップS204またはステップS205で処理後の画像を比較し、適宜必要な画像処理を行う。   According to the above-described processing, the imaging zoom magnification and the correction zoom magnification are compared, and the first image and the second image are selectively generated according to the comparison result, thereby realizing a smooth zoom operation. it can. However, since the first image and the second image are captured in a non-continuous time, there may be a difference in image quality between the first image and the second image. In order to solve this, it may be necessary to perform various types of image processing on some images. For example, there are known distortion aberration correction, peripheral light amount correction, brightness correction, white balance correction, geometric conversion processing, and the like. The control unit 101 compares the images processed in step S204 or step S205 that are temporally continuous, and performs necessary image processing as appropriate.

なお、上記の例では、補正ズーム倍率と等しい撮像ズーム倍率を有する画像を、そのまま第2の画像として用いるが、これに限られるわけではない。たとえば、図6で示した例では、処理の対象となる画像605に対して、補正ズーム倍率と等しい撮像ズーム倍率を持つ画像608でなく、画像607を用いて置き換えを行う。その場合、画像607の撮像ズーム倍率は画像605の補正ズーム倍率と異なるため、直接置き換えを行わず、画像607を画像605の補正ズーム倍率まで拡大処理をしてから置き換えを行う。このような方法は、撮像時のブレなどで、画像608に欠陥などがあり、直接使わないほうが好ましいときは有用である。また、画像608を用いて置き換えと、画像607を拡大してから置き換えと、両方の置き換えの方法を用意し、ユーザに選択させてもよい。   In the above example, an image having an imaging zoom magnification equal to the correction zoom magnification is used as it is as the second image, but the present invention is not limited to this. For example, in the example shown in FIG. 6, the image 605 to be processed is replaced using the image 607 instead of the image 608 having the imaging zoom magnification equal to the correction zoom magnification. In this case, since the imaging zoom magnification of the image 607 is different from the corrected zoom magnification of the image 605, the image 607 is not replaced directly, but is replaced after the image 607 is enlarged to the corrected zoom magnification of the image 605. Such a method is useful when there is a defect in the image 608 due to blurring at the time of imaging, and it is preferable not to use it directly. Alternatively, a replacement method using the image 608, a replacement after enlarging the image 607, or both replacement methods may be prepared and the user may select them.

第1の実施形態によれば、ズーム動作しながら撮像した複数の画像に対して、ズーム倍率の調整し、一部の画像に異なる時刻で撮像した画像を使って置換処理を行うことで、滑らかなズーム動作を実現し、ズーム倍率の調整による画質の悪化を防ぐことができる。   According to the first embodiment, the zoom magnification is adjusted for a plurality of images captured while performing a zoom operation, and a replacement process is performed by using images captured at different times for some images. Zoom operation can be realized, and deterioration of image quality due to adjustment of zoom magnification can be prevented.

(第2の実施形態)
第2の実施形態では、第1の実施形態と異なり、撮像ズーム倍率と補正ズーム倍率との違いが閾値未満のとき、直接第1の画像を生成するのではく、制御部101は、どちらの画像を生成するのかを選択させる。図7は、第2の実施形態における動画のズームの安定性を改善するための処理を示すフローチャートである。以下では、第2の実施形態を説明する。なお、第1の実施形態と同様なところは、省略する。
(Second Embodiment)
In the second embodiment, unlike the first embodiment, when the difference between the imaging zoom magnification and the correction zoom magnification is less than the threshold, the control unit 101 does not directly generate the first image. Select whether to generate an image. FIG. 7 is a flowchart showing a process for improving the zoom stability of a moving image in the second embodiment. Hereinafter, the second embodiment will be described. Note that the same parts as those in the first embodiment are omitted.

ステップS701では、制御部101は、第1の実施形態のステップS201と同じように、撮像ズーム倍率を取得する。ステップS702では、制御部101は、第1の実施形態のステップS202と同じように、補正ズーム倍率を算出する。ステップS703では、制御部101は、第1の実施形態のステップS203と同じように、撮像ズーム倍率と補正ズーム倍率との違いを算出し、予め定められた閾値と比較する。   In step S701, the control unit 101 acquires the imaging zoom magnification in the same manner as in step S201 of the first embodiment. In step S702, the control unit 101 calculates a corrected zoom magnification in the same manner as in step S202 of the first embodiment. In step S703, as in step S203 of the first embodiment, the control unit 101 calculates the difference between the imaging zoom magnification and the correction zoom magnification and compares it with a predetermined threshold value.

ステップS703で、制御部101は、撮像ズーム倍率と補正ズーム倍率との違いが閾値以上だと判断した場合、ステップS705に移り、第2の画像を生成する。   In step S703, when the control unit 101 determines that the difference between the imaging zoom magnification and the correction zoom magnification is equal to or greater than the threshold value, the control unit 101 proceeds to step S705 and generates a second image.

ステップS703で、制御部101は、撮像ズーム倍率と補正ズーム倍率との違いが閾値未満だと判断した場合、ステップS704に移る。ここで、制御部101は、第1の画像を生成すると判断した場合、ステップS706に進み、第1の画像を生成する。制御部101は、第1の画像を生成しないと判断した場合、ステップS705に進み、第2の画像を生成する。   In step S703, when the control unit 101 determines that the difference between the imaging zoom magnification and the correction zoom magnification is less than the threshold value, the control unit 101 proceeds to step S704. Here, when the control unit 101 determines to generate the first image, the control unit 101 proceeds to step S706 and generates the first image. When determining that the first image is not generated, the control unit 101 proceeds to step S705 and generates the second image.

ステップS704で、画像を選択する方法として、ユーザに1枚1枚を提示し選ばせる方法があげられる。ただし、このような方法はユーザにとって煩わしい。   As a method for selecting an image in step S704, there is a method in which the user is presented and selected one by one. However, such a method is troublesome for the user.

以下では、制御部101がどちらの画像を生成するのか、自動判断する例を説明する。デジタルカメラ100が、複数の画像を撮像している中で、ブレなどにより、大きく動いて、その後、ユーザの操作により元の場所に戻すことを想定する。このような場合、デジタルカメラ100の装置動き検出部111が、速度情報を検出する。制御部101が、検出した速度情報に基づいて、演算を行い、位置情報を算出する。図8は、算出した位置情報と時間との関係の一例を示す。期間801では、ユーザがデジタルカメラ100の移動が小さくほぼ位置に収まった状態でズーム撮像している。期間802では、手振れもしくは、なんらかの要因でデジタルカメラ100が大きく動いて、それにデジタルカメラ100の位置を戻す操作を行っている期間である。期間803のでは元の位置に戻ってカメラを動かさないように撮像している。この場合、期間802で、ユーザが意図した被写体が写っていない可能性がある。そのため、期間802もしくは、所定の閾値よりも算出した距離情報が大きくなった(横線811を超えた)区間で、制御部101が第2画像を生成することを選択する。   Hereinafter, an example in which the control unit 101 automatically determines which image to generate will be described. It is assumed that the digital camera 100 moves greatly due to blurring while capturing a plurality of images, and then returns to the original location by a user operation. In such a case, the device motion detection unit 111 of the digital camera 100 detects speed information. The control unit 101 calculates based on the detected speed information and calculates position information. FIG. 8 shows an example of the relationship between the calculated position information and time. In the period 801, the user performs zoom imaging in a state where the movement of the digital camera 100 is small and is almost within the position. The period 802 is a period in which the digital camera 100 moves greatly due to camera shake or some cause and an operation for returning the position of the digital camera 100 is performed. In the period 803, the image is taken so as not to move back to the original position. In this case, the subject intended by the user may not be captured in the period 802. Therefore, the control unit 101 selects to generate the second image in the period 802 or a section in which the calculated distance information is larger than the predetermined threshold (exceeds the horizontal line 811).

前述した自動判断の方法では、撮像ズーム倍率と補正ズーム倍率との違いが閾値以上と判断した場合、さらに、撮像時、制御部101は、装置動き検出部111が検出した速度情報を通じて、ブレがあるかどうかを判断する。ブレがある場合は、ステップS705に進み、第2の画像を生成する。   In the above-described automatic determination method, when it is determined that the difference between the imaging zoom magnification and the correction zoom magnification is equal to or greater than the threshold value, the control unit 101 further performs blurring through the speed information detected by the apparatus motion detection unit 111 during imaging. Determine if there is. If there is blurring, the process proceeds to step S705 to generate a second image.

第2の実施形態によれば、撮像ズーム倍率と補正ズーム倍率との違いが閾値以上と判断した場合、第1の画像の生成に至るまで、さらに1回判断条件を設けることができる。このような設定で、ブレなどの影響を防ぐことができ、ズーム倍率調整後の画像の画質をさらによくすることができる。   According to the second embodiment, when it is determined that the difference between the imaging zoom magnification and the correction zoom magnification is equal to or greater than the threshold value, the determination condition can be further set once until the first image is generated. With such a setting, it is possible to prevent the influence of blur and the like, and it is possible to further improve the image quality of the image after adjusting the zoom magnification.

(第3の実施形態)
第3の実施形態は、第1の実施形態と異なり、動体があるかどうかを判断し、動体がある場合、第2の画像を生成しない。図9は、第3の実施形態における動画のズームの安定性を改善するための処理を示すフローチャートである。以下では、第3の実施形態を説明する。なお、第1の実施形態または第2の実施形態と同様なところは、省略する。
(Third embodiment)
Unlike the first embodiment, the third embodiment determines whether there is a moving object, and does not generate the second image when there is a moving object. FIG. 9 is a flowchart illustrating a process for improving the zoom stability of a moving image according to the third embodiment. Hereinafter, a third embodiment will be described. Note that the same portions as those in the first embodiment or the second embodiment are omitted.

ステップS901では、制御部101は、第1の実施形態のステップS201と同じように、撮像ズーム倍率を取得する。ステップS902では、制御部101は、第1の実施形態のステップS202と同じように、補正ズーム倍率を算出する。ステップS903では、制御部101は、第1の実施形態のステップS203と同じように、撮像ズーム倍率と補正ズーム倍率との違いを算出し、予め定められた閾値と比較する。   In step S901, the control unit 101 acquires the imaging zoom magnification in the same manner as in step S201 of the first embodiment. In step S902, the control unit 101 calculates a corrected zoom magnification in the same manner as in step S202 of the first embodiment. In step S903, as in step S203 of the first embodiment, the control unit 101 calculates the difference between the imaging zoom magnification and the correction zoom magnification and compares it with a predetermined threshold value.

ステップS903で、撮像ズーム倍率と補正ズーム倍率との違いが予め定められた閾値未満の場合、ステップS906に進み、制御部101は、第1の画像を生成する。   If the difference between the imaging zoom magnification and the correction zoom magnification is less than a predetermined threshold value in step S903, the process proceeds to step S906, and the control unit 101 generates a first image.

ステップS903で、撮像ズーム倍率と補正ズーム倍率との違いが予め定められた閾値以上の場合、ステップS904に進む。ステップS904で、第1の実施形態でのステップS204とステップS205と同じ方法で、第1の画像と第2の画像とを両方生成する。   If the difference between the imaging zoom magnification and the correction zoom magnification is greater than or equal to a predetermined threshold value in step S903, the process proceeds to step S904. In step S904, both the first image and the second image are generated by the same method as in step S204 and step S205 in the first embodiment.

次に、ステップS905に進み、画像に動体があるかどうかを判断する。動体がある場合、異なる時刻の画像で置き換えると、動画のフレームの時系列が入れ替わる可能性があり、不自然な動画になるおそれがある。これを理由に、動体があるとき、第2の画像を選択しなく第1の画像を選択する必要がある。   In step S905, it is determined whether there is a moving object in the image. If there is a moving object and it is replaced with an image at a different time, there is a possibility that the time series of the frames of the moving image may be switched, resulting in an unnatural moving image. For this reason, when there is a moving object, it is necessary to select the first image without selecting the second image.

上述したように、ステップS905で、制御部101は、動体がないと判断したとき、ステップS907に進み、第2の画像を選択する。ステップS905で、制御部101は、動体があると判断したとき、ステップS908に進み、第1の画像を選択する。以下では、ステップS905での制御部101における動体の判断について、例をあげながら説明する。   As described above, when determining in step S905 that there is no moving object, the control unit 101 proceeds to step S907 and selects the second image. In step S905, when the control unit 101 determines that there is a moving object, the control unit 101 proceeds to step S908 and selects the first image. Hereinafter, the determination of the moving object in the control unit 101 in step S905 will be described with an example.

図10は、動体の判断を説明するための図である。   FIG. 10 is a diagram for explaining determination of a moving object.

ステップS905では、ステップS904で取得した第1の画像と第2の画像とを比較し、制御部101は、動体があるかどうかを判断する。判断の方法の一例としては第1の画像と第2の画像のフレーム間の信号値の差を算出する。   In step S905, the first image acquired in step S904 is compared with the second image, and the control unit 101 determines whether there is a moving object. As an example of the determination method, a signal value difference between frames of the first image and the second image is calculated.

例えば図10(a)は、動体が含まれている時の画像データの信号値の例を示している。第1の画像の信号値1001は、実線に示し、第2の画像の信号値1002は破線に示す。横軸は水平または垂直の画像データの座標を表し、縦軸は画像データの信号値を表す。   For example, FIG. 10A shows an example of signal values of image data when a moving object is included. The signal value 1001 of the first image is indicated by a solid line, and the signal value 1002 of the second image is indicated by a broken line. The horizontal axis represents the coordinates of the horizontal or vertical image data, and the vertical axis represents the signal value of the image data.

図10(a)で示したグラフでは、範囲1011において、第1の画像の信号値1001と第2の画像の信号値1002との差が著しいので、範囲1011において、動体が存在すると予想できる。制御部101に、予め信号値の違いの閾値を設け、閾値以上となる領域が検出された場合、動体が存在すると判断する。   In the graph shown in FIG. 10A, since the difference between the signal value 1001 of the first image and the signal value 1002 of the second image is significant in the range 1011, it can be predicted that a moving object exists in the range 1011. A threshold value for the difference in signal value is provided in the control unit 101 in advance, and when a region that is equal to or greater than the threshold value is detected, it is determined that a moving object exists.

ただし、たとえば、図10(b)で示したグラフでは、全範囲にわたって、第1の画像の信号値1003と第2の画像の信号値1004との差が一定に保つ場合、AEや天候の変化など動体以外が起因とする可能性が高い。このような場合、制御部101が、動体が存在しないと判断する。   However, for example, in the graph shown in FIG. 10B, when the difference between the signal value 1003 of the first image and the signal value 1004 of the second image is kept constant over the entire range, changes in AE and weather There is a high possibility that it is caused by something other than a moving object. In such a case, the control unit 101 determines that there is no moving object.

第1の画像と第2の画像との信号値を比較する際に、第1画像と第2画像とのどちらか一方または両方に対して。ローパスフィルタ処理やハイパスフィルタ処理を施してから差を取ることも行っても良い。これにより、第1の画像と第2の画像との保持している周波数帯域の違いを除外した信号値の差を取得することができる。   For comparing one or both of the first image and the second image when comparing the signal values of the first image and the second image. The difference may be taken after low-pass filter processing or high-pass filter processing is performed. Thereby, it is possible to acquire a difference between signal values excluding a difference in frequency bands held between the first image and the second image.

このように第1の画像と第2の画像の信号値を比較することによって、動体を検出することができる。検出の結果に応じて、制御部101は、第1の画像か第2の画像かを選択する。   Thus, a moving body can be detected by comparing the signal values of the first image and the second image. In accordance with the detection result, the control unit 101 selects the first image or the second image.

なお、本発明は、以上の記述により限定されず、その要旨の範囲内でさまざまな変形および変更が可能である。以下では、動体が画像の一部のみに存在し、その一部に対応する第2の画像の部分と、その一部以外に対応する第1の画像の部分とを用いて画像を合成する方法について説明する。   In addition, this invention is not limited by the above description, A various deformation | transformation and change are possible within the range of the summary. In the following, a method in which a moving object exists only in a part of an image, and an image is synthesized using a second image part corresponding to the part and a first image part corresponding to the part other than the part. Will be described.

たとえば、第1の画像と第2の画像で信号値の差があると判定された場合に、信号値の差が発生した領域に対して第2の画像を用いて、その領域以外の領域に対して第1の画像を用いて合成するような操作を行っても良い。図11は、第1の画像と第2の画像とを用いる合成を示す。信号値の差が検出された領域1102(非動体領域)は、第1の画像を用いて合成し、信号値の差が検出されていない領域1101(動体領域)は、第2画像を用いて合成した画像を生成することもできる。これにより、動体が検出されなかった領域に対しては画像の解像感が失われないシャープな画像を出力することができる。   For example, when it is determined that there is a difference in signal value between the first image and the second image, the second image is used for the region where the difference in signal value occurs, and the region other than that region is used. On the other hand, an operation of combining using the first image may be performed. FIG. 11 shows the composition using the first image and the second image. An area 1102 (non-moving object area) where a signal value difference is detected is synthesized using the first image, and an area 1101 (moving object area) where no signal value difference is detected is used using the second image. A composite image can also be generated. Thereby, it is possible to output a sharp image in which the sense of resolution of the image is not lost in a region where no moving object is detected.

第3の実施形態によれば、第1の画像と第2の画像とを両方生成し、信号値を比較することにより動体を検出することができる。さらに、動体を検出した場合、第1の画像を選択し、不自然な動画を生成することを防ぐことができる。   According to the third embodiment, a moving object can be detected by generating both the first image and the second image and comparing the signal values. Further, when a moving object is detected, it is possible to prevent the selection of the first image and generation of an unnatural moving image.

(その他の実施形態)
以上の実施形態は、デジタルカメラでの実施をもとに説明したが、デジタルカメラに限定するものではない。たとえば、撮像素子が内蔵した携帯機器などで実施してもよく、画像を撮像することができるネットワークカメラなどでもよい。
(Other embodiments)
The above embodiment has been described based on the implementation with a digital camera, but is not limited to a digital camera. For example, it may be implemented by a portable device with a built-in image sensor or a network camera capable of capturing an image.

また、以上の説明では、ズーム動作が光学ズーム動作であるということをもとに説明するが、これに限定するわけでない。たとえば、ユーザが手動で、動画の撮像中、タッチパネルを操作することで、電子ズームを行うことができる。こうした電子ズームでの動作のムラを調整しようとするとき、本発明を用いることもできる。   In the above description, the zoom operation is based on the optical zoom operation. However, the present invention is not limited to this. For example, the electronic zoom can be performed by the user manually operating the touch panel during moving image capturing. The present invention can also be used when trying to adjust the unevenness of the operation in the electronic zoom.

なお、本発明は、上述の実施形態の1つ以上の機能を実現するプログラムを、ネットワークまたは記憶媒体を介してシステムまたは装置に供給し、そのシステムまたは装置のコンピュータにおける1つ以上のプロセッサーがプログラムを読み出し作動させる処理でも実現可能である。また、1以上の機能を実現する回路(例えば、ASIC)によっても実現可能である。   Note that the present invention supplies a program that realizes one or more functions of the above-described embodiments to a system or apparatus via a network or a storage medium, and one or more processors in a computer of the system or apparatus execute the program. It can also be realized by a process of reading and operating. It can also be realized by a circuit (for example, ASIC) that realizes one or more functions.

100 デジタルカメラ
101 制御部
102 駆動部
103 光学系
104 撮像部
105 ROM
106 RAM
107 画像処理部
108 表示部
109 内蔵メモリ
110 操作部
111 装置動き検出部
DESCRIPTION OF SYMBOLS 100 Digital camera 101 Control part 102 Drive part 103 Optical system 104 Imaging part 105 ROM
106 RAM
107 Image processing unit 108 Display unit 109 Built-in memory 110 Operation unit 111 Device motion detection unit

Claims (12)

ズーム動作を行いながら撮像した複数の画像の少なくとも一部の画像の各々に対して、前記複数の画像を処理後に再生するときのズーム倍率の変化が滑らかになるように、拡大または縮小を行う変倍処理、および、前記撮像した複数の画像の一部を用いて置き換える置換処理の、少なくともいずれかを行う画像処理工程を有し、
前記画像処理工程において、前記複数の画像の各々に対して、第1の条件を満たす場合に前記変倍処理を行い、前記第1の条件とは異なる第2の条件を満たす場合に前記置換処理を行うことを特徴とする画像処理方法。
A variable for enlarging or reducing each of at least some of the plurality of images captured while performing the zoom operation so that the zoom magnification changes smoothly when the plurality of images are reproduced after processing. An image processing step of performing at least one of a doubling process and a replacement process using a part of the plurality of captured images;
In the image processing step, for each of the plurality of images, the scaling process is performed when a first condition is satisfied, and the replacement process is performed when a second condition different from the first condition is satisfied. And an image processing method.
ズーム動作を行いながら撮像した複数の画像の少なくとも一部の画像の各々に対して、前記複数の画像を処理後に再生するときのズーム倍率の変化が滑らかになるように、拡大または縮小を行う変倍処理、および、前記撮像した複数の画像の一部を用いて置き換える置換処理の、少なくともいずれかを行う画像処理工程を有し、
前記画像処理工程において、
前記複数の画像の各々のうち、第1の条件を満たす画像に対して、前記変倍処理を行うことで第1の画像を生成して出力し、
前記複数の画像の各々のうち、第2の条件を満たす画像に対して、前記変倍処理および前記置換処理を行うことで第2の画像および第3の画像を生成し、前記第2の画像と前記第3の画像のいずれかを出力するか、あるいは、前記第2の画像と前記第3の画像を合成した画像を出力することを特徴とする画像処理方法。
A variable for enlarging or reducing each of at least some of the plurality of images captured while performing the zoom operation so that the zoom magnification changes smoothly when the plurality of images are reproduced after processing. An image processing step of performing at least one of a doubling process and a replacement process using a part of the plurality of captured images;
In the image processing step,
A first image is generated and output by performing the scaling process on an image satisfying a first condition among the plurality of images,
A second image and a third image are generated by performing the scaling process and the replacement process on an image satisfying a second condition among the plurality of images, and the second image is generated. And the third image are output, or an image obtained by combining the second image and the third image is output.
動体の検出工程と第1の選択工程とを有し、
前記第1の選択工程において、前記動体の検出工程において前記画像に動体を検出した場合、第2の画像を選択し、選択した画像の処理後の画像として出力することを特徴とする請求項2に記載の画像処理方法。
A moving object detection step and a first selection step;
3. In the first selection step, when a moving object is detected in the image in the moving object detection step, a second image is selected and output as a processed image of the selected image. An image processing method described in 1.
動体の検出工程と画像の合成工程とを有し、
前記動体の検出工程において、前記画像の一部の領域から動体を検出した場合、
前記画像の合成工程において、前記画像の一部の領域に対応する第2の画像の部分と、前記画像の一部の領域以外の領域に対応する第1の画像の部分とを用いて、画像を合成し、処理後の画像として出力することを特徴とする請求項2に記載の画像処理方法。
A moving object detection step and an image synthesis step;
In the moving object detection step, when a moving object is detected from a partial area of the image,
In the image synthesizing step, an image is generated by using a second image portion corresponding to a partial region of the image and a first image portion corresponding to a region other than the partial region of the image. The image processing method according to claim 2, wherein the images are combined and output as a processed image.
前記動体の検出工程において、第1の画像と第2の画像とを比較することによって、動体を検出することを特徴とする請求項3または4に記載の画像処理方法。   5. The image processing method according to claim 3, wherein the moving object is detected by comparing the first image and the second image in the moving object detection step. 補正ズーム倍率を生成する工程をさらに有し、
前記置換処理は、前記複数の画像の少なくとも一部の画像を、前記置き換える処理の対象となる画像の前記補正ズーム倍率と等しい撮像ズーム倍率を有する画像に置き換えるか、
または、ほかの画像のズーム倍率を、前記画像の補正ズーム倍率と等しくなるように、拡大縮小の処理を行い、前記拡大縮小の処理の後の画像に置き換えることを特徴とする請求項1乃至5のいずれか1項に記載の画像処理方法。
Further comprising generating a corrected zoom magnification,
In the replacement process, at least a part of the plurality of images is replaced with an image having an imaging zoom magnification equal to the correction zoom magnification of the image to be replaced.
6. The zoom magnification of another image is performed so as to be equal to the correction zoom magnification of the image, and the image is replaced with the image after the enlargement / reduction processing. The image processing method according to any one of the above.
前記補正ズーム倍率は、前記撮像ズーム倍率より滑らかに変化することを特徴とする請求項6に記載の画像処理方法。   The image processing method according to claim 6, wherein the correction zoom magnification changes more smoothly than the imaging zoom magnification. 予めズーム倍率の違いの閾値を定める工程を有し、
前記第1の条件は、
前記補正ズーム倍率と前記撮像をするときの撮像ズーム倍率との違いが、
前記ズーム倍率の違いの閾値を定める工程において定められたズーム倍率の違いの閾値未満であることを特徴とする請求項6または7に記載の画像処理方法。
Having a step of predetermining a threshold value of a difference in zoom magnification;
The first condition is:
The difference between the corrected zoom magnification and the imaging zoom magnification when taking the image is
8. The image processing method according to claim 6, wherein the image processing method is less than a zoom magnification difference threshold value determined in the step of determining the zoom magnification difference threshold value.
第2の選択工程を有し、
前記第1の条件とは、処理の対象となる画像が前記補正ズーム倍率と前記撮像ズーム倍率との違いが前記倍率の違いの閾値未満の画像で、かつ、前記第2の選択工程において選択されることを特徴とする請求項6乃至8のいずれか1項に記載の画像処理方法。
Having a second selection step;
The first condition is that an image to be processed is an image in which a difference between the correction zoom magnification and the imaging zoom magnification is less than a threshold value of the difference in magnification, and is selected in the second selection step. The image processing method according to claim 6, wherein the image processing method is an image processing method.
撮像部を用いて画像を撮像する画像の撮像工程と、
前記撮像部の動きに関する情報を検出する検出工程とを有し、
前記第2の選択工程において、前記画像の撮像工程において撮像する際に前記検出工程において検出された前記撮像部の動きに関する情報に基づいて画像を選択することを特徴とする請求項9に記載の画像処理方法。
An image capturing step of capturing an image using the imaging unit;
A detection step of detecting information related to the movement of the imaging unit,
The said 2nd selection process WHEREIN: When imaging in the imaging process of the said image, an image is selected based on the information regarding the motion of the said imaging part detected in the said detection process, The image of Claim 9 characterized by the above-mentioned. Image processing method.
前記第2の条件は、前記補正ズーム倍率と前記撮像ズーム倍率との違いが、前記ズーム倍率の違いの閾値以上であることを特徴とする請求項6乃至10のいずれか1項に記載の画像処理方法。   The image according to any one of claims 6 to 10, wherein the second condition is that a difference between the correction zoom magnification and the imaging zoom magnification is equal to or greater than a threshold value of the difference in zoom magnification. Processing method. ズーム動作を行いながら撮像した複数の画像の少なくとも一部の画像の各々に対して、前記複数の画像を処理後に再生するときのズーム倍率の変化が滑らかになるように、拡大または縮小を行う変倍処理、および、前記撮像した複数の画像の一部を用いて置き換える置換処理の、少なくともいずれかを行う画像処理手段を有し、
前記画像処理手段は、前記複数の画像の各々に対して、第1の条件を満たす場合に前記変倍処理を行い、前記第1の条件とは異なる第2の条件を満たす場合に前記置換処理を行うことを特徴とする画像処理装置。
A variable for enlarging or reducing each of at least some of the plurality of images captured while performing the zoom operation so that the zoom magnification changes smoothly when the plurality of images are reproduced after processing. Image processing means for performing at least one of a doubling process and a replacement process using a part of the plurality of captured images;
The image processing means performs the scaling process when a first condition is satisfied for each of the plurality of images, and performs the replacement process when a second condition different from the first condition is satisfied. An image processing apparatus characterized by
JP2016122981A 2016-06-21 2016-06-21 Image processing method and image processing apparatus Expired - Fee Related JP6708490B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2016122981A JP6708490B2 (en) 2016-06-21 2016-06-21 Image processing method and image processing apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2016122981A JP6708490B2 (en) 2016-06-21 2016-06-21 Image processing method and image processing apparatus

Publications (2)

Publication Number Publication Date
JP2017228904A true JP2017228904A (en) 2017-12-28
JP6708490B2 JP6708490B2 (en) 2020-06-10

Family

ID=60892294

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2016122981A Expired - Fee Related JP6708490B2 (en) 2016-06-21 2016-06-21 Image processing method and image processing apparatus

Country Status (1)

Country Link
JP (1) JP6708490B2 (en)

Also Published As

Publication number Publication date
JP6708490B2 (en) 2020-06-10

Similar Documents

Publication Publication Date Title
JP4783252B2 (en) Image pickup apparatus with image stabilization function, image stabilization method, pre-processing program for image stabilization processing, and stored image determination program
JP6115268B2 (en) Imaging apparatus and imaging method
JP6224362B2 (en) Imaging device
JP2009147658A (en) Imaging apparatus, control method therefor, and program
US20140362258A1 (en) Image processing apparatus, image processing method, and computer readable recording medium
JP2011188481A (en) Imaging device
JP6786311B2 (en) Image processing equipment, image processing methods, computer programs and storage media
JP2018207413A (en) Imaging apparatus
WO2016152358A1 (en) Image processing device, image processing method and image processing program
JP6541501B2 (en) IMAGE PROCESSING APPARATUS, IMAGING APPARATUS, AND IMAGE PROCESSING METHOD
JP2017143354A (en) Image processing apparatus and image processing method
WO2017104102A1 (en) Imaging device
JP2015233211A (en) Imaging apparatus, control method thereof, and program
JP6708490B2 (en) Image processing method and image processing apparatus
JP2018142983A (en) Image processing device and method of controlling the same, program, and storage medium
JP6746390B2 (en) Image processing method and image processing apparatus
JP2017183983A (en) Imaging apparatus, control method and control program of the same
JP6157274B2 (en) Imaging apparatus, information processing method, and program
JP2011135537A (en) Imaging apparatus and control method of the same
JP5615031B2 (en) Imaging device
JP6800644B2 (en) Image processing device and image processing method
CN111698389A (en) Image processing apparatus, image capturing apparatus, image processing method, and storage medium
JP2016208118A (en) Image processing apparatus, image processing method, and program
JP2014236244A (en) Image processing system, image processing program, and digital camera
JP2014138378A (en) Image pickup device, control method thereof, and control program thereof

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20190418

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20191218

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20200107

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20200205

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20200421

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20200521

R151 Written notification of patent or utility model registration

Ref document number: 6708490

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R151

LAPS Cancellation because of no payment of annual fees