WO2007029640A1 - 画像処理装置および方法、プログラム、並びに記録媒体 - Google Patents

画像処理装置および方法、プログラム、並びに記録媒体 Download PDF

Info

Publication number
WO2007029640A1
WO2007029640A1 PCT/JP2006/317448 JP2006317448W WO2007029640A1 WO 2007029640 A1 WO2007029640 A1 WO 2007029640A1 JP 2006317448 W JP2006317448 W JP 2006317448W WO 2007029640 A1 WO2007029640 A1 WO 2007029640A1
Authority
WO
WIPO (PCT)
Prior art keywords
vector
block
gradient
motion vector
pixel
Prior art date
Application number
PCT/JP2006/317448
Other languages
English (en)
French (fr)
Inventor
Yukihiro Nakamura
Yasuaki Takahashi
Kunio Kawaguchi
Norifumi Yoshiwara
Akihiko Kaino
Yuta Choki
Takashi Horishi
Takafumi Morifuji
Original Assignee
Sony Corporation
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 Sony Corporation filed Critical Sony Corporation
Priority to CN2006800418410A priority Critical patent/CN101305616B/zh
Priority to US12/066,092 priority patent/US20090167959A1/en
Publication of WO2007029640A1 publication Critical patent/WO2007029640A1/ja

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/50Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding
    • H04N19/503Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding involving temporal prediction
    • H04N19/51Motion estimation or motion compensation
    • H04N19/513Processing of motion vectors
    • H04N19/521Processing of motion vectors for estimating the reliability of the determined motion vectors or motion vector field, e.g. for smoothing the motion vector field or for correcting motion vectors
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/20Analysis of motion
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/20Analysis of motion
    • G06T7/223Analysis of motion using block-matching
    • HELECTRICITY
    • H03ELECTRONIC CIRCUITRY
    • H03MCODING; DECODING; CODE CONVERSION IN GENERAL
    • H03M7/00Conversion of a code where information is represented by a given sequence or number of digits to a code where the same, similar or subset of information is represented by a different sequence or number of digits
    • H03M7/30Compression; Expansion; Suppression of unnecessary data, e.g. redundancy reduction
    • H03M7/3002Conversion to or from differential modulation
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/103Selection of coding mode or of prediction mode
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/132Sampling, masking or truncation of coding units, e.g. adaptive resampling, frame skipping, frame interpolation or high-frequency transform coefficient masking
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/134Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or criterion affecting or controlling the adaptive coding
    • H04N19/136Incoming video signal characteristics or properties
    • H04N19/137Motion inside a coding unit, e.g. average field, frame or block difference
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/134Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or criterion affecting or controlling the adaptive coding
    • H04N19/136Incoming video signal characteristics or properties
    • H04N19/14Coding unit complexity, e.g. amount of activity or edge presence estimation
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/169Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
    • H04N19/17Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object
    • H04N19/176Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object the region being a block, e.g. a macroblock
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/169Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
    • H04N19/182Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being a pixel
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/189Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the adaptation method, adaptation tool or adaptation type used for the adaptive coding
    • H04N19/192Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the adaptation method, adaptation tool or adaptation type used for the adaptive coding the adaptation method, adaptation tool or adaptation type being iterative or recursive
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/42Methods or arrangements for coding, decoding, compressing or decompressing digital video signals characterised by implementation details or hardware specially adapted for video compression or decompression, e.g. dedicated software implementation
    • H04N19/436Methods or arrangements for coding, decoding, compressing or decompressing digital video signals characterised by implementation details or hardware specially adapted for video compression or decompression, e.g. dedicated software implementation using parallelised computational arrangements
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/46Embedding additional information in the video signal during the compression process
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/50Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding
    • H04N19/503Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding involving temporal prediction
    • H04N19/51Motion estimation or motion compensation
    • H04N19/56Motion estimation with initialisation of the vector search, e.g. estimating a good candidate to initiate a search
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/50Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding
    • H04N19/587Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding involving temporal sub-sampling or interpolation, e.g. decimation or subsequent interpolation of pictures in a video sequence
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N7/00Television systems
    • H04N7/01Conversion of standards, e.g. involving analogue television standards or digital television standards processed at pixel level
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10016Video; Image sequence

Definitions

  • the present invention relates to an image processing apparatus and method, a program, and a recording medium, and in particular, by using an evaluation value obtained by subtracting an average value of luminance values between two frames used for evaluation, the average luminance between frames.
  • the present invention relates to an image processing apparatus and method, a program, and a recording medium that can evaluate the reliability of motion vectors even when the level changes greatly.
  • An image processing apparatus that performs frame frequency conversion processing or moving image compression processing of a moving image performs motion detection processing on the moving image and performs processing using the detected motion vector.
  • motion detection processing There are many (refer patent document 1). Commonly used methods in this motion detection process include block matching and iterative gradient methods.
  • a process for selecting an initial offset vector from a vector group of peripheral pixels (blocks) around the point of interest (block) and a gradient method calculation are performed a plurality of times.
  • the evaluation value for each vector is calculated, and the comparison of the evaluation values is performed.
  • the reliability of this evaluation value is directly related to the reliability of the vector.
  • Patent Document 1 Japanese Patent Laid-Open No. 9172621
  • the present invention has been made in view of such a situation, so that the reliability of motion vectors can be evaluated even when the average luminance level between frames changes greatly. To do.
  • An image processing apparatus detects a motion vector, and generates a pixel value based on the detected motion vector.
  • a motion vector of a block of interest on a frame is detected.
  • the evaluation value indicating the reliability of the accuracy of the motion vector used is the brightness value of the block of 2 frames including the start point and end point of the target motion vector.
  • Evaluation value calculation means for calculating using a value obtained by subtracting the average of the values, and vector evaluation means for evaluating reliability of the accuracy of the motion vector using the evaluation value calculated by the evaluation value calculation means .
  • the evaluation value calculation means includes a first calculation means for calculating a sum of squares of luminance value differences between the blocks of the two frames, and a calculation in parallel with the calculation by the first calculation means. And a second computing means for computing the square of the sum of the luminance value differences between the blocks.
  • Gradient method computing means for obtaining a motion vector of the block of interest by the gradient method is further provided, and the evaluation value computing means computes an evaluation value of the motion vector for each iteration stage obtained by the gradient method computing means.
  • the vector evaluation means evaluates the motion vector having the smallest evaluation value among the evaluation values of the motion vectors for each iteration stage calculated by the evaluation value calculation means as having high reliability in accuracy, and As the motion vector of the block of interest Can be output.
  • the method further comprises initial vector selection means for selecting an initial vector used as an initial value of a gradient method for detecting a motion vector of the block of interest on the frame, wherein the evaluation calculation means It is a motion vector of the same size and the same direction as the motion vector, starting from the target block on the frame at the same position as the end point block that is the end point of the motion vector detected in the past frame.
  • the shift initial vector of the block of interest and an evaluation value of a motion vector of a predetermined peripheral block of the block of interest detected in the frame or the past frame are calculated, and the vector evaluation means is the evaluation value calculation means
  • An image processing method is directed to an image processing method for an image processing apparatus that detects a motion vector and generates a pixel value based on the detected motion vector.
  • the evaluation value that represents the reliability of the accuracy of the motion vector used in the process of detecting the motion vector of the block, and the brightness value of the 2-frame block that includes the start and end points of the target motion vector.
  • a program is a program that detects a motion vector and causes a computer to perform processing for generating a pixel value based on the detected motion vector, and includes a target block on the frame.
  • the evaluation value indicating the reliability of the accuracy of the motion vector used is calculated from the luminance value of the block of 2 frames including the start point and end point of the target motion vector.
  • the evaluation value calculation step for calculating using the value obtained by subtracting the average of the luminance values in each block, and using the evaluation value calculated by the processing of the evaluation value calculation step, the accuracy of the motion vector is calculated. And a vector evaluation step for evaluating the reliability.
  • a program recorded on a recording medium is a program that detects a motion vector and causes a computer to perform a process of generating a pixel value based on the detected motion vector.
  • a 2-frame block that includes the start and end points of the target motion vector, and an evaluation value that represents the reliability of the accuracy of the motion vector used in the process of detecting the motion vector of the target block on the frame.
  • the evaluation value calculation step that is calculated using the value obtained by subtracting the average of the luminance values in each block from the luminance value of the block, and the evaluation value calculated by the processing of the evaluation value calculation step.
  • a vector evaluation step for evaluating accuracy reliability.
  • the evaluation value indicating the reliability of the accuracy of the motion vector used is the starting point of the target motion vector. Is calculated using the value obtained by subtracting the average of the luminance values in each block from the luminance values of the two-frame blocks each including the end point and the end point, and using the calculated evaluation value, the reliability of the accuracy of the motion vector Is evaluated.
  • FIG. 2 is a block diagram showing a configuration of a signal processing device.
  • FIG. 3 is a diagram for explaining the principle of processing of the present invention.
  • FIG. 4 is a diagram for specifically explaining the processing of the present invention.
  • FIG. 5 is a diagram for explaining an evaluation value of a motion vector used in the signal processing device.
  • FIG. 6 is a block diagram illustrating a configuration example of an evaluation value calculation unit that calculates an evaluation value DFD. 7]
  • FIG. 7 is a flowchart for explaining an evaluation value calculation process of the evaluation value calculation unit in FIG.
  • FIG. 8 is a diagram for explaining an evaluation value DFD when the average luminance level changes.
  • FIG. 9 is a diagram for explaining an evaluation value DFD when the average luminance level changes.
  • FIG. 11 is a block diagram illustrating a configuration example of an evaluation value calculation unit that calculates an evaluation value mDFD. [12] It is a flowchart for explaining the evaluation value calculation process of the evaluation value calculation unit of FIG. [13] FIG. 13 is a flowchart illustrating an evaluation value calculation process of the evaluation value calculation unit in FIG.
  • FIG. 14 is a block diagram illustrating a configuration example of an evaluation value calculation unit that calculates an evaluation value dfv.
  • FIG. 15 is a flowchart illustrating an evaluation value calculation process of the evaluation value calculation unit in FIG. ⁇ 16] It is a flowchart explaining the frame frequency conversion processing of the signal processing device.
  • FIG. 17 is a block diagram showing a configuration of the vector detection unit in FIG. 2.
  • FIG. 18 is a diagram for explaining a gradient method used in a vector detection unit.
  • FIG. 19 is a diagram for explaining an iterative gradient method using an initial vector.
  • FIG. 20 is a flowchart illustrating the motion vector detection process in step S82 of FIG.
  • FIG. 21 is a block diagram showing a configuration of a shifted initial vector allocating unit in FIG.
  • FIG. 22 is a flowchart for explaining the shifted initial vector allocation processing in step S104 of FIG.
  • FIG. 23 is a block diagram showing a configuration of an initial vector selection unit in FIG.
  • FIG. 24 is a flowchart for explaining initial vector selection processing in step S102 of FIG.
  • FIG. 25 is a block diagram showing the configuration of the iterative gradient method computing unit and vector evaluation unit of FIG. The
  • FIG. 26 is a block diagram showing a configuration of an effective pixel determination unit in FIG. 25.
  • FIG. 27 is a block diagram showing a configuration of a gradient method computing unit in FIG. 25.
  • FIG. 28 is a diagram illustrating motion vector detection target blocks and calculation blocks.
  • FIG. 29 is a diagram for explaining an effective pixel determination method.
  • FIG. 30 is a diagram for describing a configuration of effective pixels in a calculation block.
  • FIG. 31 is a diagram illustrating a one-sided gradient region.
  • FIG. 32 is a flowchart for explaining the iterative gradient method computing process in step S103 of FIG.
  • FIG. 33 is a flowchart for describing effective pixel determination processing in step S303 of FIG. 32.
  • FIG. 34 is a flowchart for describing effective pixel calculation processing in step S323 of FIG. 33.
  • FIG. 35 is a flowchart for explaining gradient method execution determination processing in step S305 of FIG. 32.
  • FIG. 36 is a flowchart for explaining gradient method computing processing in step S306 of FIG. 32.
  • FIG. 37 is a flowchart for explaining the integrated gradient method computing process in step S403 of FIG. 36.
  • FIG. 38 is a flowchart for describing independent gradient method computing processing in step S406 of FIG. 36.
  • FIG. 39 is a flowchart illustrating the vector evaluation process in step S307 of FIG. 32.
  • FIG. 40 is a block diagram showing another configuration of the pixel determination unit, counter, and calculation execution determination unit in FIG. 26.
  • FIG. 41 is a block diagram showing another configuration of the operation determination unit in FIG. 27.
  • FIG. 42 is a flowchart for explaining another example of the effective pixel determination process in step S303 of FIG. 32.
  • FIG. 43 is a flowchart for explaining another example of the gradient method execution determination process in step S305 of FIG. 32.
  • FIG. 44 is a flowchart for explaining another example of the independent gradient method arithmetic processing in step S406 of FIG. 36.
  • FIG. 45 is a block diagram showing another configuration of the vector detection unit in FIG. 2.
  • FIG. 46 is a block diagram showing the configuration of the iterative gradient method computing unit and vector evaluation unit of FIG. 45.
  • FIG. 47 is a block diagram showing a configuration of an effective pixel determination unit in FIG. 46.
  • FIG. 48 is a diagram for explaining an interpolation frame generated using the motion vector detected by the vector detection unit in FIG. 17.
  • FIG. 49 is a diagram for explaining an interpolation frame generated using the motion vector detected by the vector detection unit in FIG. 17.
  • FIG. 50 is a diagram for explaining an interpolation frame generated using a motion vector detected by the vector detection unit in FIG. 17.
  • FIG. 51 is a diagram for explaining a method of selecting an initial vector by the vector detection unit of FIG.
  • FIG. 52 is a diagram for explaining a method of selecting an initial vector by the vector detection unit of FIG.
  • FIG. 53 is a diagram for explaining a method of selecting an initial vector by the vector detection unit of FIG.
  • FIG. 54 is a diagram for explaining a method of selecting an initial vector by the vector detection unit of FIG.
  • FIG. 55 is a diagram for explaining a method of selecting an initial vector by the vector detection unit of FIG.
  • FIG. 56 is a diagram for explaining an interpolation frame generated using the motion vector detected by the vector detection unit in FIG. 45.
  • FIG. 57 is a diagram for explaining an interpolation frame generated using the motion vector detected by the vector detection unit in FIG. 45.
  • FIG. 58 is a diagram for explaining a method of selecting an initial vector by the vector detection unit of FIG.
  • FIG. 59 is a diagram for explaining a method of selecting an initial vector by the vector detection unit of FIG. 45.
  • FIG. 60 is a diagram for explaining an interpolation frame generated using a motion vector detected by the vector detection unit in FIG. 45.
  • FIG. 61 is a diagram illustrating a method of selecting an initial vector by the vector detection unit of FIG. 45.
  • FIG. 62 is a diagram for explaining an interpolation frame generated using the motion vector detected by the vector detection unit in FIG. 45.
  • FIG. 63 is a flowchart for explaining another example of the iterative gradient method computing process in step S 103 of FIG.
  • FIG. 64 is a flowchart for explaining still another example of the iterative gradient method computing process in step S103 of FIG.
  • FIG. 65 is a flowchart for explaining still another example of the iterative gradient method computing process in step S103 of FIG.
  • FIG. 66 is a flowchart explaining the gradient method calculation and provisional setting processing in step S614 of FIG. 64.
  • FIG. 67 is a diagram for explaining a vector evaluation comparison target and an iterative determination result for each flag value.
  • FIG. 68 is a block diagram showing still another configuration of the vector detection unit in FIG. 2.
  • FIG. 69 is a diagram showing the configuration of the iterative gradient method computing unit and vector evaluation unit of FIG. 68.
  • FIG. 70 is a flowchart for explaining another example of the vector storage control in step S565 of FIG. 63.
  • FIG. 71 is a block diagram showing the configuration of the vector assignment unit in FIG. 2.
  • FIG. 71 is a block diagram showing the configuration of the vector assignment unit in FIG. 2.
  • FIG. 72 is a diagram for explaining the concept of the four-point interpolation processing of the present invention.
  • FIG. 73 is a flowchart for explaining the vector assignment processing in step S83 of FIG.
  • FIG. 74 is a flowchart for explaining the assignment vector evaluation process in step S707 of FIG. 73.
  • FIG. 75 is a block diagram showing a configuration of an allocation compensation unit in FIG. 2.
  • FIG. 76 is a flowchart for explaining the allocation compensation process in step S 84 of FIG. 16.
  • FIG. 77 is a flowchart for describing vector compensation processing in step S803 of FIG. 76.
  • FIG. 78 is a block diagram showing a configuration of an image interpolation unit in FIG. 2.
  • FIG. 79 is a flowchart for describing image interpolation processing in step S85 of FIG.
  • FIG. 1 shows a configuration example of a signal processing device 1 to which the present invention is applied.
  • the signal processing device 1 is composed of, for example, a personal computer.
  • a CPU Central Processing Unit
  • ROM Read Only Memory
  • a RAM Random Access Memory 13 appropriately stores programs executed by the CPU 11 and data.
  • the CPU 11, ROM 12, and RAM 13 are connected to each other by a bus 14.
  • An input / output interface 15 is also connected to the CPU 11 via the bus 14.
  • the input / output interface 15 is connected to an input unit 16 composed of a keyboard, a mouse, a microphone and the like, and an output unit 17 composed of a display, a speaker and the like.
  • the CPU 11 executes various processes in response to commands input from the input unit 16. Then, the CPU 11 outputs the image and sound obtained as a result of the processing to the output unit 17.
  • the storage unit 18 connected to the input / output interface 15 is composed of, for example, a node disk, and stores programs executed by the CPU 11 and various data.
  • the communication unit 19 communicates with an external device via the Internet or other networks. Alternatively, the program may be acquired via the communication unit 19 and stored in the storage unit 18.
  • the drive 20 connected to the input / output interface 15 drives and records there. Get the programs and data that are being used. The acquired program data is transferred to and stored in the storage unit 18 as necessary.
  • the signal processing device 1 may be, for example, a television receiver, an optical disc player, or a signal processing unit thereof.
  • FIG. 2 is a block diagram showing the signal processing device 1.
  • each function of the signal processing device 1 is realized by hardware or software.
  • each block diagram in this specification may be considered as a hardware block diagram or a software functional block diagram.
  • FIG. 2 is a diagram illustrating a configuration of a signal processing device that is an image processing device.
  • the input image of the 24P signal input to the signal processing device 1 is supplied to the frame memory 51, the vector detection unit 52, the vector allocation unit 54, the allocation compensation unit 57, and the image interpolation unit 58.
  • the frame memory 51 stores input images in units of frames.
  • the frame memory 51 stores a frame at time t immediately before the input image at time t + 1.
  • the frame at time t stored in the frame memory 51 is supplied to the vector detection unit 52, the vector allocation unit 54, the allocation compensation unit 57, and the image interpolation unit 58.
  • the frame at time t on the frame memory 51 is referred to as frame t
  • the frame of the input image at time t + 1 is referred to as frame t + 1.
  • the vector detection unit 52 detects a motion vector between the target block of frame t on the frame memory 51 and the target block of frame t + 1 of the input image, and the detected motion vector is stored in the detection vector memory 53.
  • a gradient method or a block matching method is used as a method for detecting the motion vector between the two frames. Details of the configuration of the vector detection unit 52 will be described later with reference to FIG.
  • the detection vector memory 53 stores the motion vector detected by the vector detection unit 52 in the frame t.
  • the vector allocation unit 54 interpolates the motion vector obtained on the frame t of the 24P signal on the allocation vector memory 55 (hereinafter, the frame of the 60P signal is the frame of the 24P signal). In order to distinguish it, the allocation flag of the allocation flag memory 56 of the pixel to which the motion vector is allocated is assigned to l (True ). Details of the configuration of the vector allocation unit 54 will be described later with reference to FIG.
  • the allocation vector memory 55 stores the motion vector allocated by the vector allocation unit 54 in association with each pixel of the interpolation frame.
  • the allocation flag memory 56 stores an allocation flag indicating the presence / absence of a motion vector to be allocated for each pixel of the interpolation frame. For example, an assignment flag of True (l) indicates that a motion vector is assigned to the corresponding pixel, and an assignment flag of False (O) indicates that a motion vector is not assigned to the corresponding pixel. Indicates.
  • the allocation compensation unit 57 refers to the allocation flag in the allocation flag memory 56, and for the target pixel to which no motion vector is allocated by the vector allocation unit 54, the motion vector of the peripheral pixel of the target pixel Is allocated on the interpolation frame of the allocation vector memory 55. At this time, the allocation compensator 57 rewrites the allocation flag of the target pixel to which the motion vector is allocated to l (True). Details of the configuration of the allocation compensation unit 57 will be described later with reference to FIG.
  • the image interpolation unit 58 interpolates the pixel value of the interpolation frame using the motion vector allocated to the interpolation frame of the allocation vector memory 55 and the pixel value of frame t and the next frame t + 1. Generate. Then, the image interpolation unit 58 outputs the generated interpolated frame, and then outputs the image of the 60P signal to the subsequent stage (not shown) by outputting the frame t + 1 as necessary. . Details of the configuration of the image interpolation unit 58 will be described later with reference to FIG.
  • the pixel value is also referred to as a luminance value as appropriate.
  • FIG. 3 is a diagram for explaining the principle of processing in the signal processing apparatus 1 according to the present invention.
  • the dotted line represents the frame of the 24P signal input at time t, t + 1, and t + 2, which is input to the signal processing device 1, and the solid line represents the input 24P signal power as well.
  • 1 represents the interpolated frame of the 60P signal at the generated times t, t + O. 4, t + O. 8, t + 1. 2, t + 1. 6, and t + 2.
  • the signal processing device 1 when the image of the 24P signal is input, the signal processing device 1 generates four interpolation frames from the two frames at the time t and the time t + 1 of the 24P signal. Therefore, the signal processing device 1 outputs an image of a 60P signal composed of five frames at times t, t + O. 4, t + 0.8, t + 1.2, and t + 1.6.
  • the signal processing device 1 executes the process of converting the frame frequency from the 24P signal image to the 60P signal image.
  • it is based on 2 frames of time t and time t + 1 of 24P signal.
  • the frame of 60P signal of t, t + O.4, t + O.8 is generated, and t + 1.2 and t + 1 based on the two frames of time t + 1 and t + 2 of 24P signal. 6 and t + 2 60P signal frames are generated.
  • FIG. 4 is a diagram for explaining the processing of the present invention more specifically.
  • the thick arrow represents a transition to each state
  • the arrow T represents the direction of time passage in state J11 [5.
  • the state J1 No. 3 [5 is the frame t at the time t of the 24P signal, the frame t + 1 at the time t + 1 after the time t, or the frame at the time of input / output to each part constituting the signal processing device It conceptually represents the state of the interpolated frame F of the 60P signal generated between t and frame t + 1. That is, actually, for example, a frame in which a motion vector is detected as shown in the state J2 is not input to the vector allocation unit 54, but the frame and the motion vector are separately input to the vector allocation unit 54.
  • the thick arrow represents a transition to each state
  • the arrow T represents the direction of time passage in state J11 [5.
  • the state J1 No. 3 [5 is the frame t at the time t of the 24P signal,
  • the vector detection unit 52, the vector allocation unit 54, and the allocation compensation unit 57 calculate an evaluation value for evaluating the reliability of motion vector accuracy.
  • Each has an evaluation value calculation unit 61.
  • the state J1 is a frame t and a frame t of the 24P signal input to the vector detection unit 52.
  • a black dot on frame t in state J1 represents a pixel on frame t.
  • the vector detection unit 52 detects the position of the pixel force on the frame t in the state J1 in the frame t + 1 at the next time, and moves the movement onto the frame t in the state 82. As shown, it outputs as a motion vector corresponding to each pixel.
  • a block matching method or a gradient method is used as a method for detecting the motion vector between the two frames. At this time, when a plurality of motion vectors are detected in the pixel, the vector detection unit 52 causes the built-in evaluation value calculation unit 61 to calculate an evaluation value for each motion vector, and based on the calculated evaluation value. To select a motion vector.
  • the state J2 represents the state of the frame t and the frame t + 1 input to the vector allocation unit 54.
  • the arrow of each pixel in the frame t represents the motion vector detected by the vector detection unit 52.
  • the vector allocating unit 54 extends the motion vector detected for each pixel of the frame t in the state J2 to the next frame t + 1 and sets a preset time phase (for example, FIG. 3). Find the position on the interpolation frame F at t + O. 4). This is because if the motion between frame t and frame t + 1 is assumed to be constant, the motion vector becomes the point force that passed through inner frame F and the pixel position in that frame. Therefore, the vector assigning unit 54 assigns the passing motion vector to the four neighboring pixels on the interpolation frame F in the state J3.
  • the vector allocating unit 54 causes the built-in evaluation value calculation unit 61 to calculate the evaluation value for each motion vector, and to calculate the calculated evaluation value, similarly to the vector detection unit 52. Based on this, select the motion vector to be assigned.
  • the state J3 represents the state of the frame t and the frame t + 1 input to the allocation compensation unit 57 and the interpolation frame F to which the motion vector is allocated.
  • the interpolation frame F in the state J3 the pixels to which the motion vector is allocated by the vector allocation unit 54 and the powerful pixels to which the motion vector is not allocated are shown.
  • the allocation compensator 57 compensates for a pixel to which the motion vector of the state J3 is not allocated by using the motion vector allocated to the peripheral pixel of the pixel. This is a certain focus This is because the motion vector of the peripheral pixel of the pixel of interest and the motion vector of the pixel of interest are similar if the assumption that the neighborhood region of the pixel has the same motion holds. As a result, even a powerful pixel to which no motion vector is assigned is given a somewhat accurate motion vector, and the motion vector is assigned to all the pixels on the interpolation frame F in the state 84.
  • the allocation compensator 57 like the vector allocation unit 54, has its motion vectors in the built-in evaluation value calculator 61. Calculate all the evaluation values for the tuttle, and select the motion vector to be assigned based on the calculated evaluation values! /.
  • the state J4 represents the state of the frame t and the frame t + 1 input to the image interpolation unit 58 and the state of the interpolation frame F in which motion vectors are assigned to all the pixels. Based on the motion vectors assigned to all these pixels, the image interpolation unit 58 determines the positional relationship between the pixels on the interpolation frame F and the two frames t and t + 1. be able to.
  • the image interpolation unit 58 uses the motion vector allocated on the interpolation frame F and the pixel values of the frame t and the frame t + 1 as indicated by the black point of the interpolation frame F in the state J5. Then, the pixel value on the interpolation frame F is generated by interpolation. Then, the image interpolation unit 58 outputs the generated interpolated frame, and then outputs the image of the 60P signal to the subsequent stage (not shown) by outputting the frame t + 1 as necessary. .
  • each unit of the signal processing device 1 uses the sum of absolute differences (DFD (Displaced Frame Difference) representing the correlation value between the blocks shifted by the vector amount of interest of the two frames as an evaluation value for the motion vector. )) Is calculated and used by the evaluation value calculation unit 61 of each unit.
  • DFD Dislaced Frame Difference
  • Ft (p) represents the luminance value at the pixel position p at time t
  • mX n represents the DFD calculation range (block) for obtaining the sum of absolute differences.
  • This difference absolute value sum represents the correlation value between the DFD calculation ranges (blocks) in two frames. In general, the smaller the difference absolute value sum, the more the waveform of the block between the frames matches. Therefore, it is determined that the reliability of the motion vector V is higher as the sum of absolute differences is smaller.
  • evaluation value DFD this sum of absolute differences
  • FIG. 6 is a block diagram illustrating a configuration example of the evaluation value calculation unit 61 that calculates the evaluation value DFD.
  • the frame t of the image at time t is the time from the frame memory 51.
  • the frame t + 1 of the image at time t + 1 is input to the luminance value acquisition unit 72.
  • the evaluation value calculation unit 61 includes a block position calculation unit 71, a luminance value acquisition unit 72, a difference absolute value calculation unit 73, and a product-sum calculation unit 74.
  • the evaluation value calculation unit 61 receives the block (DFD calculation range) position of the frame t and the motion vector to be evaluated.
  • the block position of the frame t is input to the block position calculation unit 71 and the luminance value acquisition unit 72, and the motion vector is input to the block position calculation unit 71.
  • the block position calculation unit 71 calculates the block position of the frame t + 1 using the input block position and motion vector of the frame t, and outputs the block position to the luminance value acquisition unit 72.
  • Brightness value The acquisition unit 72 acquires a luminance value corresponding to the block position of the input frame t from the frame memory of the frame t (not shown), and receives the block of the input frame t + 1 from the frame memory 51 of the frame t + 1.
  • the luminance value corresponding to the position is acquired, and each acquired luminance value is output to the difference absolute value calculation unit 73.
  • the difference absolute value calculation unit 73 calculates the luminance difference absolute value using the luminance value in each block of frames t and t + 1 from the luminance acquisition unit 72, and calculates the calculated luminance difference absolute value. Output to sum calculation unit 74.
  • the product-sum operation unit 74 acquires the evaluation value DFD by integrating the luminance difference absolute values calculated by the difference absolute value calculation unit 73, and outputs the acquired evaluation value DFD to the subsequent stage.
  • the evaluation value calculation unit 61 receives the block (DFD calculation range) position of the frame t and the motion vector to be evaluated from the previous stage.
  • the block position calculation unit 71 uses the block position and the motion vector of the input frame t in step S11 to generate the frame t + 1.
  • the block position is calculated and output to the luminance value acquisition unit 72.
  • step S12 the luminance value acquisition unit 72 receives the input frame t and frame t.
  • the luminance value of the pixel of the block (DFD calculation range) of each frame is acquired, and each acquired luminance value is output to the difference absolute value calculation unit 73.
  • the luminance value acquisition unit 72 acquires the luminance value of the upper left pixel of the block.
  • step S13 the difference absolute value calculation unit 73 calculates the luminance difference absolute value using the luminance values of the pixels of frame t and frame t + 1 from the luminance value acquisition unit 72, and calculates the calculated luminance difference.
  • the absolute value is output to the product-sum operation unit 74.
  • step S14 the product-sum operation unit 74 accumulates the luminance difference absolute values from the difference absolute value calculation unit 73, and in step S15, determines whether or not the processing has been completed for all the pixels in the block. judge. If it is determined in step S15 that the processing has not been completed for all the pixels in the block, the processing returns to step S12, and the subsequent processing is repeated. That is, processing for the next pixel in the block is performed. On the other hand, if it is determined in step S15 that the processing has been completed for all the pixels in the block, the product-sum operation unit 74 calculates DFD, which is the result of integrating the luminance difference absolute values, in step S16. Acquired and output as evaluation value DFD to the subsequent stage. Thereby, the evaluation value calculation process is terminated.
  • the evaluation value DFD is obtained by accumulating the absolute difference values of the luminance values in the block (DFD calculation range). Therefore, generally, the smaller the evaluation value DFD, the more the frame. It is determined that the motion vector V is highly reliable because the waveforms of the blocks in between match.
  • the evaluation value DFD when the average luminance level changes will be described with reference to FIG. 8 and FIG.
  • the arrow T indicates the passage of time from the frame t at time t on the left front side to the frame t + 1 at time t + 1 on the right back!
  • motion vector vl which is the correct motion vector of pixel ⁇ between frames t and t + 1, is shown, and pixel ⁇ on frame t moves from the corresponding pixel pi.
  • a block B1 of m X n around the pixel pl + vl at the position shifted (shifted) by the vector amount of the vector vl is shown.
  • motion vector v2 which is an incorrect motion vector of pixel ⁇ between frames t and t + 1
  • pixel ⁇ on frame t is the motion vector from the corresponding pixel pi.
  • a block B2 of m X n around the pixel pi + v2 at a position shifted by the vector amount of v2 is shown.
  • the graph on the left side of Fig. 9 shows the block B0, block Bl, and block B2 of Fig. 8 in the general case (that is, when there is no movement of the light source or passage of shadow between frames). Waveforms of luminance values Y0, Yl, and ⁇ ⁇ 2 at each (pixel) position are shown, and the graph on the right shows the movement of the light source and the passage of shadows in block B1 on frame t + 1. Waveforms Y0, Yll, and ⁇ 2 of luminance values at the respective (pixel) positions of block B0, block Bl, and block B2 in FIG. 8 when B1 is affected by them are shown. That is, since the blocks BO and B2 are not affected by the movement of the light source and the passage of the shadow, the luminance value waveforms YO and Y2 in the left and right graphs remain the same.
  • the waveform Y1 of the luminance value of the block B1 is the block as shown in the hatched portion between the waveform Y0 and the waveform Y1.
  • the evaluation value DFD (Yl) between block B 0 and block B1 is the evaluation between block BO and block B2 because it is more similar to the waveform YO of the luminance value of block BO than the waveform Y2 of the luminance value of B2
  • the value is smaller than DFD (Y2). Therefore, it is determined that the reliability of the motion vector vl that is the correct motion vector is higher than the reliability of the incorrect motion vector v2.
  • the waveform Y1 As shown in the waveform Y11, the brightness level of the block B1 that has been changed greatly (average). That is, the luminance value waveform Y11 of the block B1 is separated from the waveform Y1 of the left graph by the amount of change in the average luminance value level, and as a result, as shown by the hatched portion between the waveform YO and the waveform Y11. In addition, the brightness value waveform YO of the block BO is farther from the waveform Y2 of the brightness value of the block B2.
  • the amount of change in the average luminance value level is superimposed as an offset, and the evaluation value DFD (Yl l) between block BO and block B1 in this case is the evaluation value DFD ( If it is larger than Y2), the reliability of the motion vector vl, which is a motion vector, is determined to be lower than the reliability of the erroneous motion vector v2.
  • the difference variance is actually the luminance value at the pixel position p + v at the time t + 1 and the calculation range of the pixel position p + v at the time t + 1, as can be seen from the equation (2).
  • the equation (2) which is the sum of squares, is calculated by subtracting the difference between the average luminance value and the luminance value at pixel position p at time t and the average luminance value at the pixel position P at time t. By doing so, it becomes an equation for variance of luminance value differences in the computation block (Equation (5) described later), so it is called differential variance.
  • the difference variance is an evaluation value with the degree of coincidence of the waveforms of the blocks between the frames as a solid reliability. The smaller the value, the higher the reliability of the vector V. It can be judged.
  • FIG. 10 is a diagram for explaining difference dispersion when the average luminance level changes.
  • FIG. 10 shows an example of the difference variance dfv corresponding to the example of the evaluation value DFD described with reference to FIG. 9.
  • dfv difference variance
  • FIG. 10 shows an example of the difference variance dfv corresponding to the example of the evaluation value DFD described with reference to FIG. 9.
  • block BO block Bl
  • block B2 block B2 in FIG.
  • the graph on the left side of FIG. 10 shows the block BO of FIG. 8 in the general case (ie, when there is no movement of the light source or passage of shadow between frames), as in FIG. Waveforms YO, Yl, and ⁇ 2 of luminance values at each (pixel) position of block Bl and block B2 are shown, and the graph on the right shows the movement and shadow of the light source in block B1 on frame t + 1
  • the waveform of luminance values YO, Yl l, at each (pixel) position of the block BO, block Bl, and block B2 in Fig. 8 And ⁇ 2 are shown.
  • the waveform Y1 of the luminance value of the block B1 is the block as shown in the hatched portion between the waveform Y0 and the waveform Y1. Since it is more similar to the waveform YO of the brightness value of the block BO than the waveform Y2 of the brightness value of B2, as in the case of the evaluation DFD in Fig. 9, it is the difference variance between the block BO and the block B1. (Yl) is smaller than dfv (Y2), which is the difference variance between block BO and block B2. Therefore, it is correctly determined that the reliability of the motion vector vl which is a motion vector is higher than the reliability of the erroneous motion vector v2.
  • the waveform Y As shown in the waveform Y11, the brightness level of the block B1 that was 1 changes greatly (on average) as a whole.
  • the luminance value waveform Y11 of the block B1 is separated from the waveform Y1 by the amount of change in the average luminance value level, and as a result, the luminance value waveform YO of the block BO is YO than the luminance value waveform Y2 of the block B2. Power will also be separated.
  • Waveform Z1 represents the waveform of the luminance value obtained by subtracting the average of the difference between waveform Y11 and waveform YO from waveform Y11.
  • Waveform Z2 represents the average of the difference between waveform Y2 and waveform YO from waveform Y2. This represents the waveform of the brightness value.
  • the difference variance is the sum of squares of luminance values obtained by subtracting the average luminance value in the calculation block for each frame as an offset, that is, in the calculation block for each frame. This is a statistic obtained by subtracting the average of the luminance values as an offset.
  • the difference between the waveform YO and the waveform Z1 which is the hatched portion in the graph on the right side of FIG. 10, is obtained by subtracting the difference between the waveform Y11 and the average of the differences between the waveform Y11 and the waveform YO from the waveform YO.
  • this represents the part in parentheses of the sum of squares of Equation (2) for calculating dfv (Yl l), which is the difference variance between block BO and block B1, and from waveform YO, waveform Y2, waveform Y2 and waveform
  • the value is smaller than the difference between YO and waveform Z2.
  • the average luminance level of the object having the motion V due to the movement of the light source or the passage of the shadow, etc. Df v (Yl l), which is the difference variance between block BO and block B1, is smaller than dfv (Y2), which is the difference variance between block BO and block B2. Therefore, it is determined that the reliability of the motion vector vl that is the correct motion vector is higher than the reliability of the incorrect motion vector v2.
  • evaluation value dfv the difference variance
  • the evaluation value dfv is an equation of sum of squares as shown in the equation (2), so it is necessary to use a multiplier, and the hardware is more efficient than the case where the evaluation value DFD is calculated.
  • the circuit scale becomes large.
  • the mDFD also represents the degree of coincidence of the waveform in consideration of the average luminance level, and is an evaluation value of a motion vector corresponding to a case where the average luminance level changes greatly between frames. Therefore, hereinafter, mDFD is also referred to as an evaluation value mDFD.
  • FIG. 11 is a block diagram illustrating a configuration example of the evaluation value calculation unit 61A that calculates the evaluation value mDFD.
  • FIG. 11 is different from the evaluation value calculation unit 61 of FIG. 6 in that a block position calculation unit 71, a luminance value acquisition unit 72, a difference absolute value calculation unit 73, and a product-sum calculation unit 74 are provided.
  • the product-sum calculation units 81-1 and 81-2, the average value calculation units 82-1 and 82-2, 6 is different from the evaluation value calculation unit 61 in FIG. 6 in that difference calculation units 83-1 and 82-2 are added.
  • the luminance value acquisition unit 72 acquires the luminance value corresponding to the block position of the input frame t from the frame memory of the frame t (not shown), and the acquired luminance value of the frame t Is output to the product-sum operation unit 81-1 and the difference operation unit 83-1.
  • the luminance value acquisition unit 72 acquires the luminance value corresponding to the block position of the input frame t + 1 from the frame memory 51 of the frame t + 1, and sums the acquired luminance value of the frame t + 1. Output to calculation unit 81-2 and difference calculation unit 83-2.
  • the product-sum operation unit 81-1 integrates the luminance values of all the pixels in the block of the frame t, and outputs the integrated luminance value to the average value calculation unit 82-1.
  • the average value calculation unit 82-1 calculates the luminance average value in the block using the luminance value accumulated from the product-sum calculation unit 81-1, and calculates the luminance average value in the block as the difference calculation unit.
  • 83 Outputs to 1.
  • the difference calculation unit 83-1 uses the luminance value from the luminance value acquisition unit 72 and the average luminance value in the block from the average value calculation unit 82-1, and then each pixel in the block of the frame t and the block The difference of the average luminance value is calculated, and the difference of the calculated frame t is output to the difference absolute value calculation unit 73.
  • product-sum operation unit 81-2 integrates the luminance values of all the pixels in the block of frame t + 1 and outputs the integrated luminance value to average value calculating unit 82-2.
  • the average value calculation unit 82-2 calculates the average luminance value in the block using the integrated luminance value from the product-sum calculation unit 81-2, and calculates the calculated average luminance value in the block as the difference calculation unit 83. — Output to 2.
  • the difference calculation unit 83-2 uses the luminance value from the luminance value acquisition unit 72 and the average luminance value in the block from the average value calculation unit 82-2 to calculate each pixel in the block of frame t + 1. The difference between the average luminance values in the block is calculated, and the calculated difference between the frames t + 1 is output to the difference absolute value calculation unit 73.
  • the difference absolute value calculation unit 73 includes a frame t from the difference calculation unit 83-1.
  • the luminance value in the block and the luminance value in the t + 1 block from the difference calculation unit 83 — 2 are used to calculate the luminance difference absolute value, and the calculated luminance difference absolute value is sent to the product-sum calculation unit 74.
  • the product-sum operation unit 74 obtains the evaluation value mDFD by integrating the luminance difference absolute value calculated by the difference absolute value calculation unit 73, and outputs the acquired evaluation value mDFD to the subsequent stage.
  • the evaluation value calculation unit 61A receives the block (DFD calculation range) position of the frame t and the motion vector to be evaluated from the previous stage.
  • the block position calculation unit 71 uses the block position and the motion vector of the input frame t in step S31 to input the frame t + 1.
  • the block position is calculated and output to the luminance value acquisition unit 72.
  • the luminance value acquisition unit 72 receives the input frame t and frame t in step S32.
  • the luminance value of the pixel of each block (DFD calculation range) is acquired, and the acquired luminance value of the pixel of frame t is output to the product-sum calculation unit 81-1
  • the luminance value of the pixel at frame t + 1 is output to the product-sum operation unit 81-2.
  • the luminance value acquisition unit 72 outputs the acquired luminance value of the pixel of frame t to the difference calculation unit 83-1, and also outputs the luminance value of the pixel of frame t + 1 to the difference calculation unit 83-2. Output.
  • the product-sum operation unit 81-1 integrates the luminance values of the pixels of the frame t from the luminance value acquisition unit 72 in step S33, and the processing is completed for all the pixels in the block in step S34. It is determined whether or not. If it is determined in step S34 that the processing has not been completed for all pixels in the block, the processing returns to step S32, and the subsequent processing is repeated. That is, processing for the next pixel in the block is performed.
  • step S34 When it is determined in step S34 that the processing has been completed for all the pixels in the block, the product-sum operation unit 81-1 calculates a value obtained by integrating the luminance values of all the pixels in the block in frame t. And output to the average value calculation unit 82-1.
  • step S35 average value calculation unit 82-1 calculates the average luminance value in the block of frame t using the integrated luminance value from product-sum operation unit 81-1 and calculates Bro The average luminance value in the box is output to the difference calculation unit 83-1.
  • step S36 in FIG. 13 the difference calculation unit 83-1 uses the luminance value from the luminance value acquisition unit 72 and the average luminance value in the block from the average value calculation unit 82-1, to perform frame t The difference between each pixel in the block and the luminance average value in the block is calculated, and the difference between the calculated frames t is output to the difference absolute value calculation unit 73.
  • step S32 to S36 the processing in steps S32 to S36 described above is performed by the product-sum operation unit 81-2, the average value calculation unit 82-2, and the difference operation unit 83-.
  • step 2 the same operation is performed for frame t + 1.
  • step S37 the difference calculation unit 83-1 calculates the difference between each pixel in the block of frame t and the luminance average value in the block by the difference calculation unit 83-1, and outputs the difference to the difference absolute value calculation unit 73.
  • step S38 the difference absolute value calculation unit 73 integrates the luminance difference absolute values from the difference calculation unit 83-1 and the difference calculation unit 83-2, and in step S39, the difference absolute value calculation unit 73 adds all the luminance difference absolute values. It is determined whether or not the processing is completed. If it is determined in step S38 that the processing has not been completed for all the pixels in the block, the processing returns to step S36 and the subsequent processing is repeated. That is, the process for the next pixel of the block is performed.
  • step S39 if it is determined in step S39 that the processing has been completed for all pixels in the block, the product-sum operation unit 74 calculates the luminance average that is the result of integrating the luminance difference absolute values in step S40. Obtain DFD considering offset (ie, mDFD) and output it as evaluation value mDFD to the subsequent stage.
  • offset ie, mDFD
  • an evaluation value mDFD is obtained as an evaluation value of a motion vector corresponding to a case where the average luminance level changes greatly between frames.
  • the evaluation value calculation unit 61A of Fig. 11 that calculates the evaluation value mDFD does not require a multiplier, and therefore, it is not necessary to increase the circuit scale in hardware.
  • Equation (5) indicates that the difference variance is the variance of the luminance value Dt in the evaluation value calculation block. Therefore, Equation (5) can be transformed into Equation (6) from the expansion of the dispersion equation.
  • the difference variance can be separated into a difference square sum (difference square sum) term and a difference sum square term. That is, when calculating the difference variance, the difference variance calculation unit can be configured so that each term is calculated in parallel.
  • FIG. 14 is a block diagram illustrating a configuration example of the evaluation value calculation unit 61B that calculates the difference variance (that is, the evaluation value dfv).
  • FIG. 14 includes a block position calculation unit 71 and a luminance value acquisition unit 72.
  • the difference calculation unit 91 instead of the difference absolute value calculation unit 73 and the product-sum calculation unit 74, the difference calculation unit 91, the difference sum square calculation unit 92, and the difference square sum calculation are used.
  • the unit 93, the multiplier 94, and the difference calculation unit 95 are added.
  • the luminance value acquisition unit 72 acquires the luminance value corresponding to the block position of the input frame t from the frame memory of the frame t (not shown), and the frame memory of the frame t + 1 The luminance value corresponding to the block position of the input frame t + 1 is obtained from 51, and each acquired luminance value is output to the difference calculation unit 91.
  • the difference calculation unit 91 calculates the luminance value difference of the target pixel, and outputs the calculated luminance value difference to the difference sum square calculation unit 92 and the difference square sum calculation unit 93.
  • the difference sum square operation unit 92 includes a product sum operation unit 92a and a multiplier 92b.
  • the product-sum operation unit 92a integrates the luminance value difference from the difference operation unit 91 for each block, and outputs the integrated luminance value difference (luminance value difference sum) to the multiplier 92b.
  • the multiplier 92b squares the luminance value difference sum from the product-sum calculation unit 92a and outputs the luminance value difference sum square to the difference calculation unit 95.
  • the difference-square-sum operation unit 93 includes a multiplier 93a and a product-sum operation unit 93b.
  • the multiplier 93a calculates the square of the luminance value difference from the difference calculation unit 91, and outputs the calculated luminance difference square to the product-sum calculation unit 93b.
  • the product-sum operation unit 93b accumulates the luminance difference squares for the blocks, and outputs the accumulated luminance value difference squares (luminance value difference square sums) to the multiplier 94.
  • the number of pixels in the block is input to the multiplier 94 in advance from a control unit (not shown) or the like.
  • the multiplier 94 multiplies the number of pixels in the block by the sum of squares of the luminance difference values and outputs the result to the difference calculation unit 95.
  • the difference calculation unit 95 obtains the difference variance by subtracting the luminance difference value square sum multiplied by the number of pixels in the block from the multiplier 94 from the luminance value difference sum square from the multiplier 92b. And output it as the evaluation value dfv to the subsequent stage.
  • the evaluation value calculation unit 61B receives the block (DFD calculation range) position of the frame t and the motion vector to be evaluated from the previous stage.
  • the block position calculation unit 71 When the lock position and the motion vector to be evaluated are input, in step S51, the block position of frame t + 1 is calculated using the input block position and motion vector of frame t, and the luminance value acquisition unit Output to 72.
  • the luminance value acquisition unit 72 receives the input frame t and frame t in step S52.
  • the luminance value of the pixel of the block (DFD calculation range) of each frame is acquired, and each acquired luminance value is output to the difference calculation unit 91.
  • step S53 the difference calculation unit 91 calculates the luminance value difference of the target pixel.
  • the calculated luminance value difference is output to the difference sum square calculation unit 92 and the difference square sum calculation unit 93.
  • step S54 the luminance value difference is calculated, and the luminance value difference squares are integrated.
  • the product-sum operation unit 92a of the difference sum square operation unit 92 integrates the luminance value differences from the difference operation unit 91 in step S54.
  • the product-sum operation unit 93b of the difference square sum operation unit 93 integrates the luminance value difference squares obtained by calculating the luminance difference from the difference operation unit 91 by the multiplier 93a.
  • step S55 determines in step S55 whether or not the processing has been completed for all the pixels in the block. If it is determined in step S55 that the processing has not been completed for all pixels in the block, the processing returns to step S52, and the subsequent processing is repeated. That is, the process for the next pixel of the block is performed.
  • the product-sum operation unit 92a uses the accumulated luminance value difference (luminance value difference sum) as a multiplier 92b.
  • the product-sum operation unit 93b outputs the accumulated luminance value difference square (luminance value difference square sum) to the multiplier 94.
  • step S56 the luminance value difference sum square is calculated, and the number of pixels in the block and the luminance value difference square sum are calculated. That is, the multiplier 92b of the difference sum square calculation unit 92 squares the luminance value difference sum from the product sum calculation unit 92a and outputs the luminance value difference sum square to the difference calculation unit 95 in step S56. At the same time, the multiplier 94 multiplies the number of pixels in the block and the sum of squares of the luminance difference values and outputs the result to the difference calculation unit 95.
  • the difference calculation unit 95 subtracts the luminance difference value square sum multiplied by the number of pixels in the block from the luminance value difference sum square from the multiplier 92b in step S57, and in step S58, Acquire a certain variance and output it as an evaluation value dfv to the subsequent stage.
  • an evaluation value dfv is obtained as an evaluation value of a motion vector corresponding to a case where the average luminance level changes greatly between frames.
  • step S54 and step S56 the difference sum square calculation unit 92 and the difference square sum calculation unit 93 perform calculation processing in parallel. be able to. Therefore, as shown in the evaluation value calculation unit 61B in FIG. 14, the difference variance requires a multiplier, which increases the hardware implementation. On the other hand, the circuits can be parallelized. Therefore, it is possible to shorten the processing time compared with mDFD.
  • the evaluation value dfv is used instead of the evaluation value DFD as the evaluation value when a motion vector is selected.
  • the allocation unit 54 and the allocation compensation unit 57 use the sum of absolute differences (hereinafter referred to as the evaluation value D FD) as an evaluation value when a motion vector is selected, unless otherwise specified. To do.
  • the vector detection unit 52 is described as having the evaluation value calculation unit 61B inside, and the vector allocation unit 54 and the allocation compensation unit 57 have the evaluation value calculation unit 61 inside. I will explain as.
  • the vector detection unit 52 may be configured such that the evaluation value dfv is used instead of the evaluation value DFD. .
  • step S 81 the vector detection unit 52 inputs the pixel value of the frame t + 1 of the input image at time t + 1 and the frame t at the time t immediately before the input image of the frame memory 51.
  • the vector allocating unit 54, the allocation compensating unit 57, and the image interpolating unit 58 also have the frame t + 1 of the input image at time t + 1 and the frame t at the time t immediately before the input image of the frame memory 51.
  • the pixel value is input.
  • step S82 the vector detection unit 52 executes motion vector detection processing.
  • the vector detection unit 52 detects a motion vector between the target block of the frame t on the frame memory 51 and the target block of the next frame t + 1 that is an input image, and the detected motion vector is detected by the detection vector memory.
  • a gradient method or a block matching method is used as a method for detecting the motion beta between the two frames.
  • the vector detection unit 52 obtains an evaluation value dfv (difference variance) for each motion vector by the evaluation value calculation unit 61B.
  • dfv difference variance
  • a highly reliable motion vector based on the evaluation value dfv is detected. That is, in this case, the most accurate motion vector is selected and detected in the target block for detecting the motion vector. Details of the motion vector detection processing in step S82 will be described later with reference to FIG.
  • step S83 vector allocating unit 54 performs vector allocation processing. That is, in step S83, the vector allocation unit 54 allocates the motion vector obtained on the frame t to the pixel of interest on the interpolation frame to be interpolated in the allocation vector memory 55, and the motion vector is allocated.
  • the assigned flag of the assigned pixel memory 56 is rewritten to 1 (True). For example, an allocation flag that is True indicates that a motion vector is allocated to the corresponding pixel, and an allocation flag that is False indicates that a motion vector is allocated to the corresponding pixel.
  • the evaluation value calculation unit 61 calculates an evaluation value DFD for each motion vector. Based on the evaluated value DFD, a high reliability and motion vector are assigned. That is, in this case, the most probable motion vector is selected and assigned in the target pixel to which the motion vector is assigned. Details of the vector allocation processing in step S83 will be described later with reference to FIG.
  • step S84 allocation compensator 57 executes allocation compensation processing. That is, In step S84, the allocation compensator 57 refers to the allocation flag in the allocation flag memory 56, and for the focused pixel to which no motion vector is allocated by the vector allocation unit 54, the motion vector of the peripheral pixel of the focused pixel Is allocated on the interpolation frame of the allocation vector memory 55. At this time, the allocation compensator 57 compensates the motion vector and rewrites the allocation flag of the allocated pixel of interest to l (True).
  • the allocation compensation unit 57 obtains an evaluation value DFD by the evaluation value calculation unit 61 for each motion vector, and the obtained evaluation value.
  • a highly reliable motion vector based on the value DFD is assigned. That is, in this case, the most probable motion vector is selected and assigned in the pixel of interest to which the motion vector is assigned. Details of the allocation compensation processing in step S84 will be described later with reference to FIG.
  • step S85 the image interpolation unit 58 performs an image interpolation process. That is, in step S85, the image interpolation unit 58 uses the motion vector assigned to the interpolation frame in the assignment vector memory 55 and the pixel values of the frame t and the frame t + 1 to calculate the pixel value of the interpolation frame. Generate interpolation. Details of the image interpolation processing in step S85 will be described later with reference to FIG.
  • step S86 the image interpolation unit 58 outputs the generated interpolation frame, and then outputs the frame t + 1 as necessary, thereby outputting the 60P signal image to a subsequent stage (not shown). To do.
  • step S87 the vector detection unit 52 determines whether or not the processing of all frames has been completed. If it is determined that the processing of all frames has not been completed, the process returns to step S81. The subsequent processing is repeated. On the other hand, when it is determined in step S87 that all the frames have been processed, the vector detection unit 52 ends the process of converting the frame frequency.
  • the signal processing device 1 detects a motion vector from a frame of an input image of a 24P signal, assigns the detected motion vector to a pixel on the frame of a 60P signal, Based on the assigned motion vector, the pixel value on the 60P signal frame is generated.
  • the signal processing apparatus 1 uses the evaluation value dfv (difference variance) in the vector detection process.
  • dfv difference variance
  • a motion vector with higher reliability based on the above is selected and output to the subsequent stage. Therefore, the signal processing apparatus 1 can correctly evaluate the reliability of the motion vector even if the average luminance level changes greatly between frames for which the motion vector is obtained. As a result, the failure of the movement is suppressed, and a more accurate image can be generated.
  • FIG. 17 is a block diagram showing a configuration of the vector detection unit 52. As shown in FIG. The vector detector 52 shown in FIG. 17 detects a motion vector on the frame t using the frame t of the image at time t and the frame t + 1 of the image at time t + 1. The detected motion vector is stored in the detection vector memory 53. The process of detecting the motion vector is executed for each predetermined block composed of a plurality of pixels.
  • the initial vector selection unit 101 uses a repetitive gradient as an initial vector VO, which is an initial value used in the gradient method, for a predetermined block, for a predetermined block, a motion vector having a high degree of reliability for which a detection result force of a past motion vector is also obtained. Output to the modulo unit 103. Specifically, the initial vector selection unit 101 uses the motion vectors of the peripheral blocks obtained in the past stored in the detection vector memory 53 and the shifted initial vectors stored in the shifted initial vector memory 107 as initial values. Select as a vector candidate vector.
  • the initial vector selection unit 101 includes the evaluation value calculation unit 61B described above with reference to FIG. 14. The evaluation value calculation unit 61B uses the frame t and the frame t + 1 to evaluate candidate vectors.
  • the value dfv is obtained, and the candidate vector having the highest reliability based on the evaluation value dfv obtained by the evaluation value calculation unit 61B is selected from the candidate vectors and output as the initial vector VO. Details of the configuration of the initial vector selection unit 101 will be described later with reference to FIG.
  • the pre-filters 102-1 and 102-2 are composed of a low-pass filter and a Gaussian filter, respectively, to remove the noise components of the frame t and the frame t + 1 of the input image, and to the iterative gradient method computing unit 103. Output.
  • the iterative gradient method computing unit 103 uses the initial vector V 0 input from the initial vector selection unit 101, and the frame t and the frame t + 1 input via the prefilters 102-1 and 102-2. For each predetermined block, the motion vector Vn is calculated by the gradient method. Anti The backward gradient method computing unit 103 outputs the initial vector VO and the calculated motion vector Vn to the vector evaluation unit 104. Further, the iterative gradient method computing unit 103 repeatedly performs the gradient method computation based on the motion vector evaluation result by the vector evaluation unit 104 to calculate the motion vector Vn.
  • the vector evaluation unit 104 also includes an evaluation value calculation unit 61B.
  • the evaluation value calculation unit 61B includes the motion vector Vn— 1 (or the initial vector V0) from the iterative gradient method calculation unit 103, and the motion.
  • the evaluation value dfv of the vector Vn is obtained, the iterative gradient method calculation unit 103 is controlled based on the evaluation value dfv obtained by the evaluation value calculation unit 61B, and the gradient method calculation is repeatedly executed. Then, a highly reliable one based on the evaluation value dfv is selected, and the selected motion vector V is stored in the detection vector memory 53.
  • the vector evaluation unit 104 supplies the evaluation value dfv obtained for the motion vector V together with the motion vector V to the shifted initial vector allocation unit 105. Details of the configuration of the iterative gradient method computing unit 103 and the vector evaluation unit 104 will be described later with reference to FIG.
  • the shifted initial vector allocation unit 105 shifts the motion vector passing through the target block on the next frame to the target block. Also set as the initial shift vector.
  • the shift initial vector allocation unit 105 has a motion vector of the same size and the same direction as the motion vector V, starting from the target block on the next frame at the same position as the end block of the motion vector V. Is set as the shifted initial vector. Then, the shifted initial vector allocation unit 105 allocates the set shifted initial vector to the shifted initial vector memory 107 in association with the block of interest.
  • the shifted initial vector allocation unit 105 stores the evaluation value dfv of the motion vector V allocated as the shifted initial vector in the evaluation value memory 106 in association with the block of interest, Compare with the evaluation value dfv of another motion vector V that passes through the same target block (that is, the block of the past frame at the same position as the target block ends). Then, the shifted initial vector allocating unit 105 shifts the motion vector V, which is determined to have high reliability based on the evaluation value dfv, to the block of interest, and sets it as the shifted initial vector of the block of interest. To the shifted initial vector memory 107. Details of the configuration of the shifted initial vector allocation unit 105 will be described later with reference to FIG.
  • g (X, y, t) be the luminance value of a pixel represented by coordinates (X, y, t) using the horizontal, vertical, and time axes in a moving image.
  • the pixel of interest (X, y , t) is (dx,
  • equation (9) is a two-variable equation of vx and vy, a single equation for one pixel of interest cannot find its solution. Therefore, as described below, the block that is the peripheral area of the target pixel is considered as one processing unit, and it is assumed that all the pixels in the block (peripheral area) have the same movement (vx, vy). Build a similar formula. Assuming assumptions, the formula for the number of neighboring pixels is obtained for two variables. Therefore, by combining these equations, (vx, vy) that minimizes the sum of squares of motion compensation frame differences of all pixels in the block is obtained. [0182] When moving by (vx, vy) between pixels (x, y, t) frames, the motion compensation inter-frame difference d is expressed by the following equation (10).
  • each frame shows only an area of 8 pixels ⁇ 8 pixels used for the gradient method calculation as a peripheral area (block) of the pixel of interest p.
  • the gradient method is to obtain gradients ⁇ , ⁇ , and At between two frames, and statistically calculate the motion vector V from the obtained ⁇ , ⁇ , and At using the sum of squared differences. (vx, vy) is calculated.
  • the number of iterations of the gradient method is reduced.
  • an offset is added in advance to the point indicated by the initial vector, and a large motion is calculated, and the position force with the offset is also calculated using the gradient method.
  • FIG. 19 is a diagram for specifically explaining the iterative gradient method executed using the initial vector.
  • an arrow T indicates the passage of time from frame t at time t on the left front side to frame t + 1 at time t + 1 on the right back in the figure.
  • the block centered on each pixel p, qO, ql, q2, and q3 represents the peripheral area (block) used for the gradient method calculation of that pixel.
  • the initial beta ⁇ obtained in advance is not obtained in the pixel qO located in the same phase of the target pixel p in the frame t + 1 as compared to the target pixel p in the frame t.
  • the first gradient method calculation is performed starting from the position (pixel) ql calculated by offset (moving), and the motion vector vl is obtained as a result.
  • V v0 + vl + v2
  • the vector detection unit 52 receives the input frame t of the image at time t and the frame t + 1 of the image at time t + 1.
  • step S101 the initial vector selection unit 101 selects a block to be processed on the frame t as a target block. On the frame, the processing is executed in the order of the block power raster scan in the upper left.
  • step S102 the initial vector selection unit 101 executes an initial vector selection process.
  • the initial vector selection unit 101 selects a motion vector with high reliability from the detection result of the past motion vector for each predetermined block, and uses the selected motion vector as an initial value used in the gradient method. Is output to the iterative gradient method computing unit 103 as an initial vector VO.
  • the initial vector selection unit 101 obtains the motion vector of the peripheral block obtained in the past gradient method calculation evaluation process (step S103 described later) and stored in the detection vector memory 53, and the past shift.
  • the shifted initial vector stored in the shifted initial vector memory 107 is selected as an initial vector candidate vector.
  • the initial vector selection unit 101 causes the evaluation value calculation unit 61B to obtain the evaluation value dfv of the candidate vector using the frame t and the frame t + 1, and from the candidate vector, the evaluation value calculation unit 61B A highly reliable one based on the obtained evaluation value dfv is selected, and the selected candidate vector is output as the initial vector VO. Details of the initial vector selection process in step S102 will be described later with reference to FIG.
  • step S103 the iterative gradient method computing unit 103 and the vector evaluating unit 104 execute an iterative gradient method computing evaluation process (also referred to as an iterative gradient method computing process). Specifically, in step S103, the iterative gradient method computing unit 103 receives the initial vector VO input from the initial vector selection unit 101 and the frame t input via the prefilters 102-1 and 102-2. Then, using the frame t + 1, based on the motion vector evaluation result by the vector evaluation unit 104, the gradient method is repeatedly calculated to calculate the motion vector Vn. Further, the vector evaluation unit 104 adds an iterative gradient method calculation unit 103 to the evaluation value calculation unit 61B.
  • an iterative gradient method computing evaluation process also referred to as an iterative gradient method computing process.
  • the iterative gradient method computing unit 103 receives the initial vector VO input from the initial vector selection unit 101 and the frame t input via the prefilters 102-1 and 102-2. Then, using the frame t + 1, based on the motion vector evaluation result by
  • the motion vector Vn—1 and the evaluation value dfv of the motion vector Vn are obtained, the most reliable one based on the evaluation value dfv obtained by the evaluation value calculation unit 61B is selected, and the motion vector V is selected. And stored in the detection vector memory 53. At this time, the vector evaluation unit 104 supplies the evaluation value dfv obtained for the motion vector V together with the motion vector V to the shift initial vector allocation unit 105. Details of the iterative gradient method calculation processing in step S103 will be described later with reference to FIG.
  • step S104 the shifted initial vector allocation unit 105 executes shifted initial vector allocation processing.
  • the shifted initial vector allocation unit 105 receives the motion vector passing through the block of interest on the next frame in step S104.
  • the motion vector force is set as the initial vector with the same magnitude and the same direction as the motion vector V, starting from the target block on the next frame of the same Cf as the end block of the motion vector V.
  • the shift initial vector allocation unit 105 allocates the set shift initial vector to the shift initial vector memory 107 in association with the block of interest.
  • the shifted initial vector allocation unit 105 stores the evaluation value dfv of the motion vector V allocated as the shifted initial vector in the evaluation value memory 106 in association with the block of interest. Compared with the evaluation value dfv of another motion vector V that passes through the same target block (that is, the block of the past frame at the same position as the target block is the end point), the reliability based on the evaluation value dfv The motion vector V determined to have a high degree is shifted to that block and set as a shifted initial vector, and is allocated to the shifted initial vector memory 107 in correspondence with the shifted block. Details of the configuration of the shifted initial vector allocating unit 105 will be described later with reference to FIG.
  • step S105 the initial vector selection unit 101 determines whether or not all blocks have been processed in the frame t. If it is determined in step S105 that all the blocks have not been processed, the process returns to step S101, and the subsequent processing is repeated. In step S 105, if it is determined that all the blocks have been processed in frame t, that is, the process on frame t is completed. It is determined that the motion vector V has been detected in all blocks, and the motion vector detection process is terminated.
  • an initial vector of motion vector force detected in the past is selected, and an iterative gradient method is used based on the selected initial vector to calculate an iterative motion vector. From the calculated motion vectors, a motion vector having a high reliability (ie, most probable) based on the evaluation value dfv is detected. As a result, the motion vector V corresponding to all the blocks on the frame t is stored in the detection vector memory 53.
  • FIG. 21 is a block diagram showing a configuration of the shifted initial vector allocating unit 105.
  • the shifted initial vector allocating unit 105 shown in FIG. 21 has a shifted initial vector that becomes a candidate vector of the initial vector based on the motion vector V detected by the vector evaluating unit 104 in the previous (past) frame. Setting and assigning to the shifted initial vector memory 107 is performed.
  • the shifted initial vector allocation unit 105 receives the motion vector V detected by the vector evaluation unit 104 and the evaluation value dfv of the motion vector V.
  • the allocation target position calculation unit 201 receives the position of the block through which the motion vector V detected by the vector evaluation unit 104 passes on the frame at the next time (ie, the motion vector V detected on the current frame). And the position of the calculated block is supplied to the evaluation value memory 106 and the shifted initial vector replacement unit 203.
  • the evaluation value comparison unit 202 receives the evaluation value dfv of the block position from the allocation target position calculation unit 201 as the evaluation value memory. Read from 106. Then, the evaluation value comparison unit 202 compares the evaluation value dfv read from the evaluation value memory 106 with the evaluation value dfv of the motion vector V detected by the vector evaluation unit 104.
  • the evaluation value comparison unit 202 determines that the evaluation value dfv of the detected motion vector V is smaller (that is, the reliability is higher), it controls the shifted initial vector replacement unit 203.
  • the motion initial vector at the block position supplied by the shift initial vector allocation unit 105 in the shift initial vector memory 107 is determined to have high reliability based on the evaluation value dfv. Rewrite with Tuttle V.
  • the evaluation value comparison unit 202 controls the evaluation value replacement unit 204, and in the evaluation value memory 106, the evaluation value dfv of the position of the block selected by the allocation target position calculation unit 201 is converted into the motion vector V.
  • the evaluation value of dfv is rewritten.
  • the shifted initial vector replacing unit 203 uses the shifted initial vector of the block position supplied by the allocation target position calculating unit 201 in the shifted initial vector memory 107 as the motion vector V supplied from the evaluation value comparing unit 202. (That is, a motion vector of the same magnitude and direction as motion vector V). Under the control of the evaluation value comparison unit 202, the evaluation value replacement unit 204 uses the evaluation value dfv of the position of the block selected by the allocation target position calculation unit 201 in the evaluation value memory 106 as the evaluation value dfv of the motion vector V. Rewrite with.
  • Evaluation value memory 106 stores, for each block, evaluation value dfv of a shift initial candidate vector assigned to each block on the next frame.
  • the shifted initial vector memory 107 performs a fe with a motion vector having the smallest evaluation value dfv (that is, the most reliable) in each block in the next frame as a shifted initial vector corresponding to the block. .
  • step S201 the evaluation value comparison unit 202 receives the evaluation value dfv of the motion vector V together with the motion vector V from the vector evaluation unit 104. At this time, the allocation target position calculation unit 201 also inputs the motion vector V. In step S202, the allocation target position calculation unit 201 obtains the position of the allocation target block that is the offset (motion compensation) destination of the motion vector V in the frame t. That is, the allocation target position calculation unit 201 obtains the position of the block on the frame t that is located at the same Cf as the end block of the motion vector V detected on the frame t 1.
  • step S203 the allocation target position calculation unit 201 selects one allocation target block from the obtained allocation target blocks, and sets the position of the selected allocation target block in the evaluation value memory 106 and the shift initial block. This is supplied to the vector replacement unit 203.
  • Step S In 203 the blocks to be allocated are selected in order from the upper left block on frame t.
  • step S204 the evaluation value comparison unit 202 acquires the evaluation value dfv of the allocation target block selected by the allocation target position calculation unit 201 from the evaluation value memory 106, and in step S205, the step Evaluation value of motion vector V input in S201 dfv force evaluation Value memory 106 is smaller than evaluation value dfv! /, Or not (that is, evaluation value d fv of motion vector V is evaluated in evaluation value memory 106) A determination is made as to whether or not the reliability is higher than the value dfv. If it is determined in step S205 that the evaluation value dfv of the motion vector V is smaller than the evaluation value dfv in the evaluation value memory 106, the process proceeds to step S205. Proceed to S206.
  • step S206 the evaluation value comparison unit 202 controls the shift initial vector replacement unit 203 to determine the shift initial vector of the allocation target block in the shift initial vector memory 107 selected by the allocation target position calculation unit 201.
  • the motion vector V (that is, a motion vector having the same magnitude and the same direction as the motion vector V) is rewritten, and the evaluation value replacement unit 204 is controlled and selected by the allocation target position calculation unit 201 in step S207.
  • the evaluation value dfv of the allocation target block is rewritten with the evaluation value dfv of the motion vector V.
  • step S205 If it is determined in step S205 that the evaluation value dfv of the motion vector V input in step S201 is smaller than the evaluation value dfv stored in the evaluation value memory 106, the process proceeds to step S205. Skip S206 and S207 and proceed to step S208. In other words, in this case, since the evaluation value dfv in the evaluation value memory 106 is determined to be more reliable than the evaluation value dfv of the motion vector V, the values in the evaluation value memory 106 and the shifted initial vector memory 107 are Will not be rewritten.
  • the allocation target position calculation unit 201 determines in step S208 whether or not the processing for all the allocation target blocks of the motion vector V has been completed. If it is determined in step S208 that all the allocation target blocks have not been processed, the process returns to step S203, and the subsequent processing is repeated. If it is determined in step S208 that the processing has been completed for all blocks to which the motion vector V is allocated, the shift initial vector allocation processing ends.
  • the initial shift corresponding to the selected allocation target block is performed.
  • Vector force Shift initial vector memory 107 not yet stored. Therefore, if the evaluation value dfv of the shifted initial vector is not yet stored in the corresponding allocation target block of the evaluation value memory 106, the selected allocation target block force is also evaluated as the evaluation value dfv in step S204. Since it is not acquired, it is determined as Yes in step S205, and the processes of steps S206 and S207 are executed.
  • the evaluation value dfv is also used when assigning the initial shift vector, so the average luminance level between frames changes due to the movement of the light source or the passage of shadows.
  • the motion vector detected in the frame at the previous time passes through the block (that is, the motion vector V detected on the frame t 1).
  • the block on the frame t at the same position as the end block) is determined and assigned as the initial shift shift for the target block on the frame at the next time.
  • the evaluation value dfv is also set to the previous time. Since the motion vector detected when obtaining the motion vector detected by V is used for the current frame, the motion vector that passes through the block of interest that does not need to obtain the re-evaluated value dfv is determined at the previous time. Compared to searching for the motion vector force of all blocks in the frame, the amount of processing is reduced, making it difficult to implement with a huge amount of computation. It is possible to realize a Hardware A reduction was.
  • FIG. 23 is a block diagram showing a configuration of initial vector selection section 101.
  • the initial vector selection unit 101 having the configuration shown in FIG. 23 is based on a motion vector detected in the previous (past) frame, a candidate vector such as a shifted initial vector (hereinafter also referred to as an initial candidate vector), and a highly reliable motion vector. Is selected as the initial vector.
  • the initial vector selection unit 101 receives the frame t of the image at time t and the frame t + 1 of the image at time t + 1.
  • the candidate vector position calculation unit 251 selects the target block to be processed on the frame t, and selects the initial target block from the peripheral area of the target block. Obtain the position of the candidate block for obtaining the candidate vector, the type and priority of the motion vector that will be the initial candidate vector, and obtain the detection vector for the position information of the candidate block and the type information of the initial candidate vector in the order of the obtained priority. Supplied to unit 252 and shift initial vector acquisition unit 253. The candidate vector position calculation unit 251 also supplies the position information of the candidate block to the offset position calculation unit 254.
  • the number of initial candidate vectors is set to a predetermined number based on a balance between the accuracy of the initial vector and the hardware capability, and further, the position of the candidate block, the initial Candidate vector types and priorities are also set in advance.
  • a type of initial candidate vector a motion vector obtained by shifting a motion vector passing through a predetermined block in the past frame to the predetermined block (that is, a motion vector detected in the past frame).
  • a shifted initial vector SV which is a motion vector of the same size and in the same direction as the motion vector V, starting from the block on the next frame at the same position as the end block, and the motion vector detected in the previous frame (
  • a past vector PV a motion vector detected in a block before the target block in the current frame
  • a zero vector a motion vector detected in a block before the target block in the current frame
  • the candidate vector position calculation unit 251 detects the position information of the candidate block and the type information of the initial candidate vector when the preset type of the initial candidate vector is the past vector or the current vector.
  • the position information of the candidate block and the initial candidate vector type information are supplied to the shifted initial vector acquiring unit 253, and the obtained initial candidate vector type is supplied to the vector acquiring unit 252. If neither of them is detected (for example, the type of the initial candidate vector is 0 vector), the 0 vector is set, and the position information of the candidate block is supplied to the offset position calculation unit 254 together with the 0 vector. .
  • the detection vector acquisition unit 252 acquires the motion vector corresponding to the position information of the candidate block and the type information of the initial candidate vector supplied from the candidate vector position calculation unit 251 from the detection vector memory 53 and acquires the motion vector.
  • the motion vector is output to the offset position calculation unit 254 as an initial candidate vector.
  • the shifted initial vector acquisition unit 253 obtains the shifted initial vector corresponding to the position information of the candidate block according to the position information of the candidate block and the type information of the initial candidate vector supplied by the candidate vector position calculation unit 251. It is obtained from the shifted initial vector memory 107 and output to the offset position calculation unit 254 as an initial candidate vector.
  • the shifted initial vector acquisition unit 253 outputs a zero vector to the offset position calculating unit 254 when the shifted initial vector is not allocated to the position of the block designated by the candidate vector position calculating unit 251. If no shift initial vector is assigned, the zero vector force shift initial vector memory 107 may be stored in advance.
  • the offset position calculation unit 254 receives the initial candidate vector (or 0 vector from the candidate vector position calculation unit 251) from the detection vector acquisition unit 252 or the shifted initial vector acquisition unit 253, and then receives the candidate vector position calculation unit 254. Based on the position information of the candidate block supplied by 251, the offset target block position obtained by offsetting (motion compensation) the target block of frame t to frame t + 1 is calculated for each initial candidate vector. Then, offset position calculation section 254 outputs the candidate block position information and offset destination block position information together with the initial candidate vector to evaluation value calculation section 61B described above with reference to FIG.
  • the evaluation value calculation unit 61B inputs the candidate block position information and the offset destination block position information together with the initial candidate vector from the offset position calculation unit 254, using the frame t and the frame t + 1, Find the evaluation value dfv of the initial candidate vector. Then, the evaluation value calculation unit 61B outputs the obtained evaluation value dfv together with the initial candidate vector to the evaluation value comparison unit 256.
  • the evaluation value comparison unit 256 compares the evaluation value dfv input by the evaluation value calculation unit 61B with the evaluation value dfv of the optimal candidate vector stored in the optimal candidate storage register 257, and evaluates the evaluation value.
  • the evaluation value dfv of the initial candidate vector input by the calculation unit 61B is smaller than the evaluation value dfv of the optimal candidate vector, that is, the initial candidate vector has higher reliability than the optimal candidate vector.
  • the optimal candidate vector in the optimal candidate storage register 257 and its evaluation value dfv are replaced with the initial candidate vector whose reliability is high! And its evaluation value dfv.
  • the evaluation value comparison unit 256 registers the optimum candidate storage register.
  • the optimal candidate vector determined to have the highest reliability based on the evaluation value dfv among all candidate vectors is output as an initial vector VO to the iterative gradient method computing unit 103. .
  • the optimal candidate storage register 257 In the optimum candidate storage register 257, the initial candidate vector whose evaluation value dfv is small (high reliability) by the evaluation value comparison unit 256 is stored together with the evaluation value dfv as the optimal candidate vector. ing. Then, under the control of the evaluation value comparison unit 256, the optimal candidate storage register 257 outputs the optimally stored optimal candidate vector to the iterative gradient method computing unit 103 as the initial vector VO.
  • step S251 the candidate vector position calculation unit 251 obtains a preset initial candidate vector of the target block from the peripheral region of the selected target block, and the type of initial candidate vector. In step S252, it is determined whether or not the type of the initial candidate vector of the candidate block is a past vector or a current vector in the order of the obtained priority. In step S252, if it is determined that the type of initial candidate vector of the candidate block is a past vector or a current vector, the candidate vector position calculation unit 251 determines the position information of the candidate block and the type of initial candidate vector in step S253.
  • the detection vector acquisition unit 252 detects the motion vector (past vector PV or current vector CV) according to the position information of the candidate block and the type information of the initial candidate vector.
  • the obtained motion vector is acquired from the output vector memory 53, and the acquired motion vector is output to the offset position calculation unit 2 54.
  • step S252 if it is determined that the initial candidate vector type power of the candidate block is not a past vector or a current vector, the candidate vector position calculation unit 251 determines whether the candidate block is a candidate block in step S254. Determine whether initial candidate vector type power is shifted initial vector. If it is determined in step S254 that the type of the initial candidate vector of the candidate block is a shifted initial vector, the candidate vector position calculation unit 251 determines the position information of the candidate block and the type of initial candidate vector in step S255.
  • Class information is supplied to the shift initial vector acquisition unit 253, and the shift initial vector acquisition unit 253 acquires the shift initial vector corresponding to the position information of the candidate block from the shift initial vector memory 107, and the acquired shift initial vector Is output to the offset position calculation unit 254.
  • step S254 if it is determined that the initial candidate vector type power of the candidate block is not a shift initial vector! / ⁇ (that is, the initial candidate vector type power of the candidate block is determined to be 0 vector)
  • step S256 the candidate vector position calculation unit 251 sets a zero vector as the initial candidate vector and supplies the position information of the candidate block to the offset position calculation unit 254 together with the zero vector. Note that also in steps S253 and S255, the candidate vector position calculation unit 251 supplies the position information of the candidate block to the offset position calculation unit 254.
  • the offset position calculation unit 254 receives the position of the candidate block supplied by the candidate vector position calculation unit 251. Based on the information, for each initial candidate vector, the offset destination block position obtained by offsetting the target block of frame t to frame t + 1 is calculated. Then, offset position calculation section 254 outputs the candidate block position information and offset destination block position information together with the initial candidate vector to evaluation value calculation section 61B.
  • step S258 When the evaluation value calculation unit 61B inputs the candidate block position information and the offset destination block position information together with the initial candidate vector from the offset position calculation unit 254, in step S258, the frame t and the frame t + 1 Is used to obtain the evaluation value df V of the initial candidate vector, and outputs the obtained evaluation value dfv along with the initial candidate vector to 256 evaluation values.
  • step S259 the evaluation value comparison unit 256 evaluates whether or not the evaluation value dfv force obtained by the evaluation value calculation unit 61B is smaller than the evaluation value dfv of the optimal candidate vector stored in the optimal candidate storage register 257.
  • the evaluation value df V obtained by the evaluation value calculation unit 61B is smaller than the evaluation value dfv of the optimal candidate vector stored in the optimal candidate storage register 257, that is, the initial candidate vector is the optimal candidate. Recognized as more reliable than vector If it is determined, in step S260, the optimal candidate vector of the optimal candidate storage register 257 and its evaluation value dfv are rewritten with the initial candidate vector whose reliability is high! And its evaluation value dfv.
  • step S261 candidate vector position calculation section 251 determines whether or not processing of all initial candidate vectors (for example, eight vectors) has been completed. If it is determined in step S261 that all the initial candidate vectors have not been processed, the process returns to step S252, and the subsequent processing is repeated.
  • all initial candidate vectors for example, eight vectors
  • step S262 If it is determined in step S261 that all of the initial candidate vectors have been processed, in step S262, the evaluation value comparison unit 256 controls the optimal candidate storage register 257 so that all the initial candidate vectors are processed.
  • the optimum candidate vector having the highest reliability based on the evaluation value dfv is output to the iterative gradient method computing unit 103 as the initial vector VO. Thus, the initial vector selection process is completed.
  • the evaluation value dfv of a plurality of initial candidate vectors is obtained in the block of interest, and the initial candidate vector having the smallest evaluation value dfv, that is, the highest reliability, is obtained as the initial value. Since it is selected as a vector, even if the average luminance level of a moving object changes greatly due to movement of the light source or passage of a shadow, it is the optimal initial vector for detecting the motion vector at the subsequent stage. As a result, the accuracy of motion vector detection in the subsequent stage can be improved.
  • the moving amount of the moving object between successive frames has a certain degree of continuity, and based on the fact that the change in the moving amount is small, the previous frame force is also a shifted initial vector that is a motion vector passing through the block of interest.
  • the evaluation value dfv as a candidate for the initial vector, as compared with the conventional case where only the motion vector obtained in the past in the peripheral block is used as the initial vector candidate. Therefore, highly accurate motion detection can be performed. This is particularly effective at the boundaries of moving objects.
  • FIG. 25 is a block diagram showing the configuration of the iterative gradient method computing unit 103 and the vector evaluation unit 104.
  • the iterative gradient method computing unit 103 and vector evaluation unit 104 shown in FIG. 25 detect the optimal motion vector using the input frame t of the image at time t and the frame t + 1 of the image at time t + 1. Perform the process.
  • the process of detecting the motion vector is a process executed for each predetermined block having a plurality of pixel forces.
  • the iterative gradient method computing unit 103 and the vector evaluation unit 104 perform the gradient method for each block.
  • an optimal motion vector with high reliability based on the evaluation value dfv is output.
  • the motion vector is obtained for each detection target block that is the detection target of the motion vector, and the gradient method calculation for obtaining the motion vector of the detection target block is performed on the calculation block that is the target of the gradient method calculation. And executed.
  • the iterative gradient method computing unit 103 includes a selector 401, a memory control signal generating unit 402, a memory 403, an effective pixel determining unit 404, a gradient method computing unit 405, and a delay unit 406.
  • the initial vector VO from the initial vector selection unit 101 is input to the selector 401.
  • the selector 401 selects the initial vector V0 from the initial vector selection unit 101 as a motion vector (hereinafter referred to as an offset vector) Vn ⁇ 1 that is used as an initial value of the gradient method calculation, the memory control signal generation unit 402, the gradient The result is output to the legal operation unit 405 and the vector evaluation unit 104.
  • an offset vector a motion vector (hereinafter referred to as an offset vector) Vn ⁇ 1 that is used as an initial value of the gradient method calculation, the memory control signal generation unit 402, the gradient The result is output to the legal operation unit 405 and the vector evaluation unit 104.
  • the selector 401 receives from the delay unit 406 the motion vector V resulting from the gradient method calculation performed by the gradient method calculation unit 405, the motion vector calculated by the gradient method calculation unit 405 is input.
  • V is selected as the offset vector Vn ⁇ 1 and output to the memory control signal generation unit 402, the gradient method calculation unit 405, and the vector evaluation unit 104.
  • a control signal for controlling processing start timing and position information is input to the memory control signal generation unit 402 from a control unit (not shown) of the signal processing device 1.
  • the memory control signal generation unit 402 based on the control signal and the offset vector Vn ⁇ 1 from the selector 401, stores the frame t of the image at time t stored in the memory 403 and the frame t + 1 of the image at time t + 1.
  • the read target pixel value is supplied to the effective pixel determination unit 404 and the gradient method calculation unit 405.
  • the memory 403 receives and stores the frame t of the image at time t and the frame t + 1 of the image at time t + 1 through the prefilters 102-1 and 102-2.
  • the effective pixel determination unit 404 uses the target pixel value supplied from the memory 403, for example, to calculate the pixel difference between the calculation blocks of the frame t and the frame t + 1, and perform the calculation based on the pixel difference. It is determined whether or not the number of pixels effective for gradient method calculation is greater than a predetermined threshold value in the block, and a counter flag (countflg) corresponding to the determination result is set to the gradient method calculation unit 405 and vector evaluation. Supply to part 104.
  • the effective pixel determination unit 404 obtains a gradient state (that is, whether or not there is a gradient) in each horizontal direction and vertical direction for the pixel determined to be an effective pixel in the calculation block, and The ratio of pixels with a gradient only in either the horizontal direction or the vertical direction (hereinafter also referred to as a one-sided gradient pixel) is also determined, and whether or not the gradient flag (gladflg) is set according to the determination result is also determined.
  • the gradient method calculation unit 405 and the vector evaluation unit 104 are supplied.
  • the gradient method computing unit 405 executes gradient method computation using the target pixel value supplied from the memory 403 based on the values of the counter flag and the gradient flag supplied from the effective pixel determination unit 404. Then, the motion vector Vn is calculated using the offset vector Vn ⁇ 1 from the selector 401, and the calculated motion vector Vn is output to the vector evaluation unit 104. At this time, the gradient method calculation unit 405 uses the gradient method calculation (expression) force used in the gradient method calculation processing using the least square sum of the above-described equation (14) (hereinafter referred to as the integrated gradient method calculation processing). Or a simple gradient method calculation process (hereinafter referred to as independent gradient method calculation process) of Equation (23) described later.
  • the delay unit 406 receives from the vector evaluation unit 104 the motion vector V that is calculated by the gradient method calculation unit 405 and evaluated by the vector evaluation unit 104.
  • the delay unit 406 holds the motion vector V input from the vector evaluation unit 104 until the next processing cycle of the effective pixel determination unit 404 and the gradient method computing unit 405, and moves in the next processing cycle.
  • the vector V is output to the selector 401.
  • the vector evaluation unit 104 includes the evaluation value calculation unit 61B described above with reference to FIG.
  • the value judgment unit 412 is configured.
  • the evaluation value calculation unit 61B receives the frame t of the image at time t and the frame t + 1 of the image at time t + 1 through the pre-filters 102-1 and 102-2, and the signal t A control signal for controlling position information is input from a control unit (not shown) of the processing apparatus 1.
  • the evaluation value calculation unit 61B uses the motion vector Vn calculated by the gradient method calculation unit 405 using the frame t, the frame t + 1, and the position information, and the selector. Obtain the evaluation value dfv of the offset vector Vn—1 and 0 vector from 401. Then, the evaluation value calculation unit 61B outputs the obtained evaluation value dfv together with each vector to the evaluation value determination unit 412.
  • the evaluation value determination unit 412 compares the evaluation value dfv calculated by the evaluation value calculation unit 61B based on the counter flag and the gradient flag supplied from the valid pixel determination unit 404, thereby making the trust Select the most appropriate one and find the motion vector V.
  • the evaluation value determination unit 412 determines whether or not to repeat the gradient method arithmetic processing based on the counter flag and the gradient flag supplied from the effective pixel determination unit 404, and determines that the gradient method calculation process is to be repeated. In this case, the obtained motion vector V is output to the delay unit 406. The evaluation value determination unit 412 stores the obtained motion vector V in the detection vector memory 53 when the gradient method calculation processing is not repeated. At this time, the evaluation value determination unit 412 supplies the motion vector V and the evaluation value dfv obtained for the motion vector V to the shifted initial vector allocation unit 105.
  • FIG. 26 is a block diagram showing a detailed configuration of the effective pixel determination unit 404.
  • the effective pixel determination unit 404 includes a pixel difference calculation unit 421, a pixel determination unit 422, a counter 423, a gradient method continuation determination unit 424, and an operation execution determination unit 425.
  • the pixel difference calculation unit 421 includes a first spatial gradient pixel difference calculation unit 421-1, a second spatial gradient pixel difference calculation unit 421-2, and a time direction pixel difference calculation unit 421-3.
  • the first spatial gradient pixel difference calculation unit 421-1 uses the pixel value of the pixel in the calculation block in the frame t + 1 among the target pixel values supplied from the memory 403, and calculates the calculation block in the frame t + 1. Pixel difference ⁇ in the horizontal direction and pixels in the vertical direction The difference Ay is calculated, and the pixel difference ⁇ in the horizontal direction and the pixel difference Ay in the vertical direction of the pixels in the calculation block in the calculated frame t + 1 are output to the pixel determination unit 422.
  • the second spatial gradient pixel difference calculation unit 421-2 uses the pixel value of the pixel in the calculation block in the frame t, out of the target pixel values supplied from the memory 403, in the calculation block in the frame t.
  • the pixel difference ⁇ X in the horizontal direction of the pixel and the pixel difference Ay in the vertical direction are calculated, and the pixel difference ⁇ in the horizontal direction and the pixel difference Ay in the vertical direction of the pixel in the calculation block in the calculated frame t are calculated as a pixel determination unit.
  • the time direction pixel difference calculation unit 421-3 uses the target pixel value supplied from the memory 403 (that is, the pixel value of the pixel in the calculation block in frame t and frame t + 1) to The pixel difference At in the time direction of the pixels in the calculation block at t is calculated, and the pixel difference At in the time direction of the pixels in the calculation block in the calculated frame t is output to the pixel determination unit 422.
  • the pixel determination unit 422 includes an effective pixel determination unit 431, a horizontal gradient determination unit 432, and a vertical gradient determination unit 433.
  • the counter 423 includes an effective pixel counter 441, a horizontal gradient-free counter 442, and a vertical gradient-free counter 443.
  • the effective pixel determination unit 431 includes the horizontal pixel difference ⁇ X and the vertical pixel difference Ay of the pixels in the calculation block in the frame t + 1 from the first spatial gradient pixel difference calculation unit 421-1.
  • Spatial gradient pixel difference calculation unit 421 From pixel t in the calculation block in frame t from frame Delta X in the horizontal direction ⁇ X and vertical pixel difference Ay, and from time direction pixel difference calculation unit 421-3 A predetermined logical operation is performed using the pixel difference At in the time direction of the pixels in the operation block between the frame t + 1 and the frame t. Details of the predetermined logical operation will be described later with reference to FIG.
  • the effective pixel determination unit 431 determines whether or not it is effective for detecting the pixel force motion vector in the calculation block (that is, the calculation of the gradient method calculation unit 405 in the subsequent stage). If it is determined that it is effective for motion vector detection, the value of the effective pixel counter 441 (number of effective pixels) is incremented by 1 and the horizontal gradient determination unit 432 and vertical gradient determination unit 433 are controlled. Then, the gradient state in each of the horizontal direction and the vertical direction is obtained for the effective pixel determined to be effective for motion vector detection.
  • the horizontal gradient determination unit 432 obtains the horizontal gradient state of the effective pixel, determines whether or not the effective pixel has a horizontal gradient, and When it is determined that there is no horizontal gradient of the effective pixel, add 1 to the value of the no horizontal gradient counter 442 (no horizontal gradient !, number of pixels).
  • the vertical gradient determination unit 433 obtains the vertical gradient state of the effective pixel, determines whether or not the effective pixel has a vertical gradient, When it is determined that the effective pixel has no vertical gradient, 1 is added to the value of the vertical gradient non-counter 443 (that is, the number of pixels having no horizontal gradient).
  • the effective pixel number counter 441 stores the number of effective pixels determined to be effective for the detection of the motion vector by the effective pixel determination unit 431 for each calculation block.
  • the horizontal gradient non-counter 442 stores the number of effective pixels determined by the horizontal gradient determination unit 432 as having no horizontal gradient for each computation block.
  • the vertical gradient non-counter 443 stores the number of effective pixels determined by the vertical gradient determination unit 433 as having no vertical gradient for each calculation block.
  • the calculation execution determination unit 425 includes a counter value calculation unit 451 and a flag setting unit 452.
  • the counter value calculation unit 451 has a counter 423 (valid pixel counter 441, horizontal gradient no counter 442, and vertical gradient no counter 443).
  • the number of effective pixels the number of pixels without a gradient in the horizontal direction, And the number of pixels having no gradient in the vertical direction, and calculating the effective pixels in the calculation block and the one-side gradient pixels of the effective pixels (that is, pixels having a gradient only in either the horizontal direction or the vertical direction).
  • the ratio is calculated, and the value of the gradient flag (gladflg) set by the flag setting unit 452 is controlled according to the calculation result.
  • the flag setting unit 452 sets the value of the gradient flag under the control of the counter value calculation unit 451.
  • the gradient flag is output to the gradient method calculation unit 405 and the evaluation determination unit 412.
  • the value of the gradient flag will be described later with reference to FIG.
  • FIG. 27 is a block diagram showing a detailed configuration of the gradient method computing unit 405.
  • the gradient method calculation unit 405 includes a pixel difference calculation unit 461, a calculation determination unit 462, an integrated gradient calculation unit 463-1, an independent gradient calculation unit 463-2, and a vector calculation unit 464. Configured.
  • the pixel difference calculation unit 461 includes a first spatial gradient pixel difference calculation unit 461-1, a second spatial gradient pixel difference calculation unit 461-2, and a time direction pixel difference calculation unit 461-3. Under the control of the determination unit 462, a target pixel difference is calculated.
  • the first spatial gradient pixel difference calculation unit 461-1 has the same configuration as the first spatial gradient pixel difference calculation unit 421-1, and among the target pixel values supplied from the memory 403, the first spatial gradient pixel difference calculation unit 461-1 Using the pixel values of the pixels in the calculation block, the horizontal pixel difference ⁇ and the vertical pixel difference Ay of the pixels in the calculation block at frame t + 1 are calculated, and the calculation at frame t + 1 is calculated.
  • the pixel difference ⁇ X in the horizontal direction and the pixel difference Ay in the vertical direction of the pixels in the block are output to the operation determination unit 462.
  • the second spatial gradient pixel difference calculation unit 461-2 is configured in the same manner as the second spatial gradient pixel difference calculation unit 421-2, and among the target pixel values supplied from the memory 403, the calculation block in the frame t
  • the horizontal pixel difference ⁇ and the vertical pixel difference Ay of the pixel in the calculation block at frame t are calculated using the pixel value of the pixel in the frame t, and the horizontal of the pixel in the calculation block at the calculated frame t is calculated.
  • the pixel difference ⁇ in the direction and the pixel difference Ay in the vertical direction are output to the calculation determination unit 462.
  • the time direction pixel difference calculation unit 461-3 is configured in the same manner as the time direction pixel difference calculation unit 421-3, and the target pixel value supplied from the memory 403 (ie, frame t and frame).
  • the pixel difference At in the time direction of the pixel in the calculation block at frame t is calculated using the pixel value of the pixel in the calculation block at t + 1, and the time direction of the pixel in the calculation block at the calculated frame t is calculated.
  • the pixel difference At is output to the operation determination unit 462.
  • the arithmetic determination unit 462 includes an effective pixel determination unit 471, a horizontal gradient determination unit 472, and a vertical gradient determination unit 473.
  • the effective pixel determination unit 471 controls execution / prohibition of the gradient method calculation unit 405 based on the value of the counter flag (countflg) supplied from the gradient method continuation determination unit 424.
  • the effective pixel determination unit 471 based on the value of the gradient flag (gla dflg) supplied from the calculation execution determination unit 425, the first spatial gradient pixel difference calculation unit 461-1, the second spatial gradient pixel
  • the execution and prohibition of the pixel difference calculation processing of the difference calculation unit 461-2 and the time direction pixel difference calculation unit 461-3 are controlled, and the integrated gradient calculation unit 463-1 and independent gradient calculation unit 463-2 Which of the gradient method calculation processing is performed is determined.
  • the effective pixel determination unit 471 determines whether the integrated gradient calculation unit 463-1 performs gradient method calculation processing based on the value of the gradient flag, and determines whether the first spatial gradient pixel difference calculation unit 461-1 is used. Pixels in the computation block in frame t from frame t + 1 from the horizontal pixel difference ⁇ X and vertical pixel difference Ay of the pixels in the computation block in frame t + 1 and the second spatial gradient pixel difference calculation unit 461-2.
  • a predetermined logical operation similar to that of the effective pixel determination unit 431 is performed, and based on the predetermined logical operation, whether or not the pixel in the operation block is effective for detecting a motion vector is determined.
  • Judgment and effective for motion vector detection Gradient of the effective pixels determined and that the (pixel difference) is supplied to the integrated gradient computing unit 463 1, to execute integrated gradient method calculation process.
  • the effective pixel determination unit 471 determines that the gradient method calculation processing is to be performed by the stand-alone gradient calculation unit 463-2 based on the value of the gradient flag, the horizontal gradient determination unit 472 and the vertical gradient determination unit 473 At least one of these is controlled, and the gradient state in each of the horizontal direction and the vertical direction is obtained for the effective pixel determined to be effective for detecting the motion vector of the pixel in the operation block based on a predetermined logical operation.
  • the horizontal gradient determination unit 472 obtains the horizontal gradient state of the effective pixel, determines whether or not the effective pixel has a horizontal gradient, Of the effective pixels, only the gradient (pixel difference) of the pixel having the gradient in the horizontal direction is supplied to the independent gradient calculation unit 463-2 to execute the independent gradient method calculation processing in the horizontal direction.
  • the vertical gradient determination unit 473 obtains the vertical gradient state of the effective pixel, determines whether or not the effective pixel has a vertical gradient, and Of the effective pixels, only the gradient (pixel difference) of the pixel having the gradient in the vertical direction is supplied to the independent gradient calculation unit 463-2 to execute the independent gradient method calculation processing in the vertical direction.
  • the integrated gradient calculation unit 463-1 executes the integrated gradient method calculation process under the control of the effective pixel determination unit 471.
  • the integrated gradient calculation unit 463-1 includes the gradients of the effective pixels supplied by the effective pixel determination unit 471 (the pixel difference ⁇ t in the time direction, the pixel difference ⁇ in the horizontal direction, and the pixel in the vertical direction).
  • the difference Ay) is integrated, and the motion vector vn is obtained using the least square sum of the above-described equation (14), and the obtained motion vector vn is output to the vector calculation unit 464.
  • the independent gradient calculation unit 463-2 executes an independent gradient method calculation process in the horizontal direction under the control of the horizontal gradient determination unit 472.
  • the stand-alone gradient calculation unit 463-2 includes the gradients of pixels having a gradient in the horizontal direction among the effective pixels supplied by the horizontal gradient determination unit 472 (the pixel difference At in the time direction, the pixel difference ⁇ in the horizontal direction ⁇ ⁇ and pixel difference Ay) in the vertical direction are integrated, and the horizontal component of the motion vector vn is obtained by using Equation (23), which is a simple mathematical formula described later, instead of Equation (14).
  • Equation (23) which is a simple mathematical formula described later, instead of Equation (14).
  • the horizontal component of the motion vector vn is output to the vector calculation unit 464.
  • the independent gradient calculation unit 463-2 executes the independent gradient method calculation process in the vertical direction under the control of the vertical gradient determination unit 473. That is, the stand-alone gradient calculation unit 463-2 includes the pixel value gradient (pixel difference At in the time direction, pixel in the horizontal direction) of the pixels having the gradient in the vertical direction among the effective pixels supplied by the vertical gradient determination unit 473.
  • the difference ⁇ ⁇ and the pixel difference Ay in the vertical direction are integrated, and the vertical component of the motion vector vn is obtained by using Equation (23), which is a simple equation described later, instead of Equation (14).
  • Equation (23) which is a simple equation described later, instead of Equation (14).
  • the vertical component of the obtained motion vector vn is output to the vector calculation unit 464.
  • the vector calculation unit 464 uses the offset vector Vn—1 from the selector 401 as the motion vector vn from the integrated gradient calculation unit 463-1 or the motion vector vn from the independent gradient calculation unit 463-2.
  • the motion vector Vn is calculated and the calculated motion vector Vn is output to the vector evaluation unit 104.
  • FIG. 28 shows another example of a detection target block that is a detection target of a motion vector and a calculation block that is a target of gradient method calculation corresponding to the detection target block.
  • a frame t is shown, and a circle on the frame t represents a pixel.
  • the calculation target blocks K1 to K3 each consisting of 4 pixels ⁇ 4 pixels and each calculation block of 8 pixels ⁇ 8 pixels centering on the detection target blocks K1 to K3, respectively. E1 to E3 are shown. Note that each of the calculation blocks E1 to E3 overlaps the adjacent calculation block with half of the constituent pixels.
  • the calculation blocks of the gradient method are the calculation block El, the calculation block ⁇ 2, and the calculation block ⁇ 3. That is, in the case of the detection target block and the calculation block in the example of FIG. 28, each calculation block E1 to ⁇ 3 overlaps the adjacent calculation block with a half of the configured pixel.
  • the detection target block is not limited to four pixels, and may be composed of, for example, one pixel or a plurality of other pixels.
  • the detection target block and the calculation block may be configured with the same number of pixels with different numbers of pixels. In other words, the calculation block can be configured to be the detection target block as it is.
  • the effective pixel determination method of the effective pixel determination unit 404 will be described with reference to FIG.
  • the arrow ⁇ indicates the time t at the right back from the frame t at the time t at the left front in the figure. Show the direction of time to +1 frame t + 1! /
  • the dotted line block on frame t + 1 represents the block in phase with detection target block Kt, and the motion vector V (Vx, Vy) is given as the initial vector on frame t + 1.
  • the calculation block Et + 1 at the position shifted (moved) from the dotted line block is used as the object of the gradient method calculation.
  • ⁇ 1 ⁇ (k + 1) -Yt (k)
  • ⁇ y1 Yt (k + w) -Yt (k)
  • Yt + 1 represents a pixel value at time t + 1
  • Yt represents a pixel value at time t
  • k + 1 and k represent an address (position).
  • the horizontal pixel difference ⁇ x2 and the vertical pixel difference Ay2 of the pixel p2 of the calculation block Et + 1 corresponding to the pixel pi are also obtained.
  • the effective pixel determination unit 404 performs a logical operation using these values, and performs effective pixel determination based on the result.
  • the effective pixel determination unit 431 of the effective pixel determination unit 404 satisfies any of the following three conditional expressions (19) to (21) among the pixels of the calculation block Et (that is, the expression (22) It is determined whether or not the pixel is an effective pixel for motion vector detection.
  • II represents a logical sum
  • && represents a logical product
  • represents a multiplication
  • thl and th2 represent predetermined threshold values, respectively.
  • thl is, for example, 1, 1.5, or 2
  • th2 is 4, for example.
  • Equation (19) ⁇ 1 ⁇ 0 && ⁇ 2 ⁇ 0 represents that the horizontal gradient of the pixel pi and the pixel ⁇ 2 is not flat (has a gradient in the horizontal direction).
  • I At / Axl—At / Ax2 I th th2 is similar to the horizontal movement by the gradient method (when normalized), which is smaller than the predetermined threshold th2. Represents similarity. From the above, equation (19) expresses the condition focusing on the horizontal direction, and pixels that satisfy all of these conditions are determined to have similarity in horizontal movement and are effective for the gradient method in the subsequent stage. It is determined that
  • Equation (20) expresses the condition focusing on the vertical direction. Pixels that satisfy all of these conditions are determined to have similarity in vertical movement and are effective for the gradient method in the subsequent stage. It is determined that
  • equation (21) is a condition that focuses on both horizontal and vertical directions (hereinafter also referred to as diagonal directions or vertical horizontal directions) for those not satisfying equations (19) and (20). (Hereinafter referred to as “horizontal and vertical focus conditions”), pixels satisfying all of these are judged to have similarities in horizontal and vertical movements, and are effective for use in the gradient method in the subsequent stage. Determined.
  • the logical operation for determining the effective pixel is not limited to the example in FIG. 29 as long as each pixel difference is used.
  • the effective pixel determination is not necessarily determined based on all the pixel differences described above. For example, the same position between the pixel pi of the calculation block Et on the frame t and the calculation block Et + 1 on the frame t + 1 It is determined whether or not the pixel difference (frame difference) At in the time direction at the pixel p2 is smaller than a predetermined value, and if it is determined to be small, it can be determined that the pixel is an effective pixel.
  • FIG. 30 shows a configuration example of the pixels in the calculation block.
  • the calculation block E consisting of 8 pixels X 8 pixels (64 pixels) centering on the detection target block K consisting of 4 pixels X 4 pixels
  • the above-described equation (22) is satisfied and effective pixels Judged as The pixel (white circle in the figure) and the pixel that does not satisfy Equation (22) and is not subject to the gradient method calculation (black circle in the figure) are shown.
  • the effective pixel determination unit 404 uses the equation (22), and each pixel in the computation block Et has similarity to any movement in the horizontal direction, the vertical direction, or the diagonal direction. Judge whether there is a certain force.
  • the effective pixel determination unit 404 is 50% of the number of pixels determined to be similar to any movement in the horizontal direction, vertical direction, or diagonal direction, that is, the number of pixels determined as effective pixels. If the number of pixels determined as valid pixels is 50% or less, the calculation in the calculation block is unstable, and for example, the calculation is aborted. Process. It should be noted that the force at which the threshold value of the effective pixel counter is set to 50%. Of course, this value may be another value.
  • the gradient method computing unit 405 further uses Equation (22) to calculate the horizontal and vertical directions for each pixel in the computation block Et. Judgment is made on whether or not there is a similarity to the movement in either the horizontal direction or the diagonal direction, and the pixel determined to have no similarity in any movement in the horizontal direction, vertical direction or diagonal direction Also, the target power of the gradient method calculation is removed, and in the calculation block E, the gradient method calculation is performed using only the pixels determined as effective pixels (34 pixels).
  • a normal region having a gradient in the horizontal direction and the vertical direction (hereinafter referred to as a normal gradient region) and only one of the horizontal direction and the vertical direction are included.
  • Gradient method calculation is performed to distinguish the region where the gradient exists (hereinafter referred to as one-side gradient region). Therefore, in practice, it is particularly In some cases, the accuracy of motion vector detection in the distribution area is significantly reduced.
  • the one-sided gradient region will be described with reference to FIG.
  • the arrow T indicates the direction of passage of time from the frame t at time t on the left front side to the frame t + 1 at time t + 1 on the right back in the figure.
  • Line L on frame t and frame t + 1 is an area with pixel power of luminance value e (white area) and an area with pixel power of luminance value f with a value different from luminance value e (hatching area) It shows the boundary of
  • an arithmetic block Et composed of 4 pixels x 4 pixels, which is a target of motion vector detection, is shown. In the example of FIG. 31, the detection target block is omitted.
  • an arithmetic block Et + 1 consisting of 4 pixels ⁇ 4 pixels corresponding to the arithmetic block Et is shown.
  • the dotted line block on the frame t + 1 represents a block having the same phase as the operation block Et.
  • the gradient method calculation is repeated, including the dotted line block force.
  • a motion vector V (Vx, Vy) detected by using the arithmetic block Et + 1 as an object of the gradient method is shown.
  • the pixels in the left two columns (pixel pOO, pixel plO, pixel p20, and pixel ⁇ 30, pixel ⁇ , pixel pl l, pixel of the operation block Et are expanded to the right.
  • p 21, and pixel p31) all have the same luminance value e
  • the pixels in the right two columns of the operation block Et (pixel p02, pixel pl2, pixel p22, and pixel ⁇ 32, pixel ⁇ 03, pixel ⁇ 13, pixel ⁇ 23, And the pixel ⁇ 33) all have the same luminance value f.
  • the motion vector detected on the line L of the frame t + 1 with the block located above or below the computation block Et + 1 being used as the computation target is the optimal motion vector.
  • the gradient method calculation is repeated on the frame t + 1 with the dotted block force, and finally the calculation block Et + 1 is used as the target of the gradient method calculation.
  • the motion vector V (Vx, Vy) may be evaluated and detected as the optimal motion vector.
  • the effective pixel determination unit 404 further performs gradient method execution determination based on the gradient state of each pixel in the horizontal and vertical directions, and according to the determination result, the gradient method Let the calculation unit 405 switch between integrated gradient method calculation using equation (14) and independent gradient method calculation using equation (23), which is simplified from equation (14). Let the motion vector be calculated.
  • Equation (23) when obtaining the horizontal component of the motion vector, the vertical component of the motion vector is not used, but the vertical gradient of the pixel to be calculated is used. When obtaining, the horizontal gradient of the pixel to be calculated is not used. That is, since the motion can be detected using each gradient for each direction component, only a horizontal gradient or a vertical gradient can be used. Therefore, the motion vector detection accuracy can be improved.
  • the effective pixel determination unit 404 further determines whether or not there is a gradient in the horizontal direction and the vertical direction with respect to the pixel determined to be an effective pixel by the above-described effective pixel determination process in the calculation block. Judgment is made for each gradient, and the number of effective pixels (cnt_t), the number of pixels without gradient in the horizontal direction (ngcnt_x), and the number of pixels without gradient in the vertical direction (ngcnt) are obtained. Then, gradient method execution determination processing is performed using the following equations (24) to (26) using these values.
  • pxLa represents the total number of pixels in the operation block
  • represents multiplication
  • th3 represents a predetermined threshold value less than 1.
  • the integrated gradient method calculation is performed using equation (14).
  • the gradient method calculation unit 405 performs the integrated gradient method calculation using Expression (14) with the effective pixel as the target of the gradient method calculation. Execute.
  • the vector evaluation unit 104 compares the motion vector resulting from the integrated gradient method operation with the evaluation value dfv of the offset vector, and determines that the evaluation value dfv is small. The user is evaluated as having high reliability, and the motion vector is corrected (changed) according to the evaluation result. Further, the vector evaluation unit 104 determines that the iterative gradient calculation process is repeated only when the reliability of the motion vector resulting from the integrated gradient method calculation is high and the number of iterations does not satisfy the maximum number. To do.
  • the gradient method computing unit 405 uses a pixel having a horizontal gradient as a target of the gradient method computation using Equation (23). Independent vertical gradient calculation using Equation (23) is performed on the pixels with vertical gradient among the effective pixels. To do.
  • the gradient method calculation using Equation (23) is executed only for the movement of. In this case, only effective pixels having a gradient in the horizontal direction are used for the gradient method calculation.
  • the gradient method computing unit 405 uses a pixel having a horizontal gradient as an object of gradient method computation using the equation (23). Horizontal Directional independent gradient method operations.
  • the gradient method calculation using Equation (23) is executed only for the movement in the direction. In this case, only effective pixels having a gradient in the vertical direction are used for the gradient method calculation.
  • the gradient method computing unit 405 uses a pixel having a vertical gradient among the effective pixels as an object of the gradient method calculation using Equation (23). Performs the independent gradient method operation in the vertical direction.
  • the vector evaluation unit 104 compares the motion vector resulting from the independent gradient method operation with the evaluation value dfv of the 0 vector, and the evaluation value dfv If it is determined that the value is small, it is evaluated that the reliability is high, and the motion vector is corrected (changed) according to the evaluation result. Further, in this case, the vector evaluation unit 104 does not repeat the iterative gradient calculation process.
  • the gradient method execution determination process is performed using the equations (24) to (26), and the gradient method calculation is switched according to the determination result.
  • the independent gradient method calculation only the effective pixels with gradient in the target direction are used to obtain the motion vector of the direction component, or the motion vector of the direction component with many pixels without gradient is set to 0 vector.
  • a certain motion vector It becomes possible to do.
  • the vector evaluation that is performed only by the control of the gradient method calculation, the change of the motion vector according to the evaluation result, and the repeated determination of the gradient method calculation are also performed.
  • the calculation load can be reduced and the motion vector detection accuracy can be further improved.
  • the initial vector VO is input to the selector 401 from the previous stage.
  • selector 401 selects offset vector Vn-1 and sends the selected offset vector Vn-1 to memory control signal generator 402, gradient method calculator 405, and evaluation value calculator 61B. Output.
  • the selector 401 selects the input initial vector VO as the offset vector Vn ⁇ 1, and the delay unit 406 calculates the gradient method calculation.
  • the motion vector V of the result calculated by the unit 405 and evaluated by the evaluation determination unit 412 is input, the motion vector V is selected as the offset vector Vn ⁇ 1.
  • Memory control signal generation section 402 receives a control signal for controlling processing start timing and position information and an offset vector from selector 401 from a control section (not shown) of signal processing apparatus 1. .
  • the memory control signal generation unit 402 determines the frame t of the image at time t and the image at time t + 1 stored in the memory 403 according to the control signal and the offset vector Vn ⁇ 1 from the selector 401.
  • the target pixel value of the calculation block to be processed is read from the frame t + 1, and the read target pixel value is supplied to the effective pixel determination unit 404 and the gradient method calculation unit 405.
  • the valid pixel determination unit 404 Upon receiving the target pixel value supplied from the memory 403, the valid pixel determination unit 404 executes a valid pixel determination process in step S303. This effective pixel determination process will be described later in detail with reference to FIG.
  • the pixel difference between the operation blocks of frame t and frame t + 1 is calculated using the target pixel value supplied from the memory 403 by the effective pixel determination process in step S303, so that a gradient is added to the operation block.
  • the number of effective pixels effective for the arithmetic operation is added to the effective pixel counter 441. Be counted.
  • the horizontal and vertical gradient states are obtained, and the number of pixels without horizontal gradient and the number of pixels without vertical gradient are respectively horizontal. It counts to No Counter 442 and No Counter 443 Vertical Slope.
  • the gradient method execution determination process in step S305 the number of effective pixels of the effective pixel counter 441, the number of pixels without the horizontal gradient 442, and the vertical gradient of the counter 443 without vertical gradient are not present.
  • the gradient method calculation processing performed by the gradient method calculation unit 405 is performed according to the determination result.
  • the gradient flag (gladflg) for switching between the arithmetic processing and the independent gradient method arithmetic processing is set, and the set gradient flag is output to the gradient method arithmetic unit 405 and the evaluation determination unit 412. Proceed to S306.
  • step S306 According to the gradient method calculation processing in step S306, according to the gradient flag from the calculation execution determination unit 425, the integrated gradient method calculation processing using the effective pixels or the horizontal gradient of the effective pixels is performed. Independent horizontal gradient calculation processing and vertical At least one of the vertical independent gradient method operations using pixels with a gradient in the straight direction is executed to obtain the motion vector Vn, and the obtained motion vector Vn is the vector. The data is output to the evaluation unit 104, and the process proceeds to step S307.
  • step S307 the vector evaluation unit 104 executes vector evaluation processing.
  • the motion vector Vn, the offset vector Vn—1, and the 0 vector evaluation value dfv are obtained from the gradient method computing unit 405 according to the gradient flag, and from the computation execution judging unit 425. Based on the gradient flag, the motion vector Vn and the evaluation value dfv of the offset vector Vn—1 or 0 vector are compared, and the motion vector V is determined according to the comparison result. For example, when the evaluation value df V of the motion vector Vn and the offset vector Vn— 1 is compared and the reliability of the evaluation value of the motion vector Vn is high, the motion vector Vn is regarded as the motion vector V, and the gradient method The number of iterations is counted as one.
  • step S308 the vector evaluation unit 104 determines whether or not to repeat the gradient method calculation based on the gradient flag and the gradient method iteration count from the calculation execution determination unit 425! To do.
  • the delay unit 406 holds the motion vector V input from the vector evaluation unit 104 until the next processing cycle of the effective pixel determination unit 404 and the gradient method computing unit 405, and in the next processing cycle.
  • the motion vector V is output to the selector 401. Thereby, the process returns to step S301 and the subsequent processes are repeated.
  • the vector evaluation unit 104 is a flag other than a flag for executing gradient flag force-integrated gradient method calculation processing, or the maximum number of iterations in which the number of gradient method iterations is set (for example, 2 In step S308, it is determined that the gradient method calculation is not repeated, that is, the gradient method calculation is finished.
  • the vector evaluation unit 104 performs step S3.
  • step 10 the obtained motion vector V is stored in the detection vector memory 53 in association with the detection target block, and the iterative gradient method processing is terminated. At this time, the motion vector V and its evaluation value dfv are also output to the shifted initial vector allocation unit 105.
  • step S304 when it is determined in step S304 that the number of effective pixels is smaller than the predetermined threshold value ⁇ , the gradient method continuation determination unit 424 causes the calculation execution determination unit 425, the gradient method calculation unit 405, and the evaluation value.
  • step S309 0 vector is set as the motion vector V, and in step S310, the motion vector V is stored in the detection vector memory 53 in association with the detection target block. Also at this time, the motion vector V that is the 0 vector and its evaluation value dfv are also output to the shifted initial vector allocation unit 105.
  • the iterative gradient method computing process is completed, and the shifted initial vector allocation unit 105 executes the shifted initial vector allocation process using the motion vector V and its evaluation value dfv, and stores it in the detection vector memory 53.
  • the stored motion vector V is used by the vector allocation unit 54 in the subsequent stage.
  • the vector evaluation unit 104 obtains evaluation values dfv of the motion vector Vn, the offset vector Vn—1, and the 0 vector according to the ratio of the one-sided gradient pixels in the effective pixels, and the evaluation value dfv is obtained. Since the motion vector that is small, that is, with high reliability, is selected, even if the average luminance level of the moving object changes greatly due to the movement of the light source or the passage of the shadow, etc. Therefore, an optimal motion vector can be given to the subsequent vector allocation, and as a result, the accuracy of the subsequent vector allocation can be improved. Next, details of the effective pixel determination process in step S303 in FIG. 32 will be described with reference to the flowchart in FIG.
  • each unit of the pixel determination unit 422 (effective pixel determination unit 431, 431, The horizontal gradient determining unit 432 and the vertical gradient determining unit 433) are controlled to reset the values of the counters (effective pixel number counter 441, horizontal gradient non-counter 442, and vertical gradient non-counter 443).
  • each part of the pixel difference calculation unit 421 (first spatial gradient pixel difference calculation unit 421-1, second spatial gradient pixel difference calculation unit 421-2, and time direction pixel difference calculation unit 421-3)
  • step S323 effective pixel calculation processing is executed. This effective pixel calculation process will be described with reference to the flowchart of FIG.
  • step S351 the time-direction pixel difference calculation unit 421-3 calculates the time-direction pixel difference ⁇ t between the frame t + 1 and the frame t of the selected pixel in the calculation block.
  • the pixel difference At in the time direction between the pixel frame t + 1 and the frame t is output to the pixel determination unit 422.
  • step S352 the first spatial gradient pixel difference calculation unit 421-1 calculates the horizontal pixel difference ⁇ and the vertical pixel difference Ay on the frame t + 1 of the selected pixel in the calculation block. Then, the pixel difference ⁇ X in the horizontal direction on the frame t + 1 of the calculated pixel and the pixel difference Ay in the vertical direction are output to the pixel determination unit 422.
  • step S353 the second spatial gradient pixel difference calculation unit 421-2 calculates a horizontal pixel difference ⁇ and a vertical pixel difference Ay on the frame t of the selected pixel in the calculation block.
  • the pixel difference ⁇ in the horizontal direction on the frame t of the calculated pixel and the pixel difference Ay in the vertical direction are output to the pixel determination unit 422.
  • step S354 the effective pixel determination unit 431 of the pixel determination unit 422 determines the horizontal pixel difference ⁇ X on the frame t + 1 of the selected pixel from the first spatial gradient pixel difference calculation unit 421-1.
  • Pixel difference ⁇ y in the vertical direction, second spatial gradient pixel difference calculation unit 421 the pixel difference ⁇ X in the horizontal direction on the frame t of the selected pixel, and the image in the vertical direction.
  • step S324 the effective pixel determination unit 431 obtains the logical sum of the above-described three expressions (that is, the expression (22) is obtained, and the power / failure power that the expression (22) is true). It is determined whether or not the selected pixel is an effective pixel. Therefore, if any one of the above-described equations (19) to (21) is satisfied, the effective pixel determination unit 431 determines that the pixel is an effective pixel in step S324, and in step S325. The effective pixel count counter 441 is incremented by one.
  • the horizontal gradient determination unit 432 obtains the state of the horizontal gradient of the pixel determined to be an effective pixel by the effective pixel determination unit 431 in step S326. If it is determined whether or not the effective pixel has a horizontal gradient, and if it is determined that there is no horizontal gradient of the effective pixel, the number of pixels having no horizontal gradient of the horizontal gradient non-counter 442 is determined in step S327. Add one. If it is determined in step S326 that there is a horizontal gradient of the effective pixel, the process skips step S327 and proceeds to step S328.
  • the vertical gradient determination unit 433 obtains the state of the gradient in the vertical direction of the pixel determined to be an effective pixel by the effective pixel determination unit 431 in step S328. If it is determined whether or not the effective pixel has a vertical gradient, and it is determined that there is no vertical gradient of the effective pixel, in step S329, the number of pixels having no vertical gradient of the vertical gradient non-counter 443 is determined. Add one. If it is determined in step S328 that there is a vertical gradient of the effective pixel, the process skips step S329 and proceeds to step S330.
  • step S330 the pixel difference calculation unit 421 determines whether or not the processing of all the pixels in the calculation block has been completed. If it is determined in step S330 that all the pixels in the calculation block have been processed, the effective pixel number determination process is ended, Until processing ⁇ , return to step S303 in FIG. 32 and proceed to step S304.
  • step S324 when it is determined that none of the expressions (19) to (21) described above is satisfied and the selected pixel is not a valid pixel, or V is determined in step S330. If it is determined that the processing of all the pixels in the calculation block is still finished, the processing returns to step S322, and the subsequent processing is repeated.
  • the effective pixel number counter 441 has the number of effective pixels determined to be effective in the calculation block, and the horizontal gradient non-counter 442 has a horizontal gradient among the effective pixels.
  • the number of pixels determined not to be present and the number of pixels determined to have no vertical gradient among the effective pixels are stored in the vertical gradient non-counter 443.
  • the gradient method execution determination process in FIG. 35 is a process executed by the calculation execution determination unit 425 based on each counter in which the number of pixels is stored as described above with reference to FIG.
  • the counter value calculation unit 451 of the calculation execution determination unit 425 calculates the number of effective pixels (cnt_t) and the horizontal gradient non-counter 442 from the number of pixels with no gradient in the horizontal direction (ngcnt_x ), And the vertical gradient-free counter 443, the number of pixels having no gradient in the vertical direction (ng cntj) is obtained, and it is determined whether or not Expression (24) is satisfied in step S381.
  • step S383 determines in step S383 whether equation (25) and equation (26) are satisfied. Determine whether or not. If it is determined in step S383 that Expression (25) and Expression (26) are satisfied, the effective pixel includes a considerable number of pixels having no gradient in either the horizontal direction or the vertical direction. It is thought that. Therefore, in step S384, the flag setting unit 452 sets the value of the gradient flag to “0” for performing the independent gradient method calculation processing using Equation (23) for each of the horizontal and vertical directions.
  • step S385 the counter value calculation unit 451 determines whether or not the expression (26) is satisfied in step S387. If it is determined in step S387 that the expression (26) is satisfied, it is considered that the effective pixels include many pixels having no gradient in the horizontal direction. Therefore, the flag setting unit 452 sets the value of the gradient flag to “2” in step S388 to perform the independent gradient method calculation process using the equation (23) in the vertical direction.
  • the gradient state of the operation block (that is, the number of effective pixels, the number of effective pixels without horizontal gradient, and the number of effective pixels without vertical gradient) is calculated.
  • the corresponding gradient flag is output to the gradient method computing unit 405 and the evaluation determining unit 412.
  • step S306 of FIG. 32 which is executed by the gradient method calculation unit 405, will be described in detail with reference to the flowchart of FIG.
  • the counter flag is 1, the valid pixel determination unit 471 starts the gradient method calculation process of FIG.
  • step S401 the effective pixel determination unit 471 determines whether or not the value of the gradient flag is 3. If it is determined that the value of the gradient flag is not 3, the value of the gradient flag is determined in step S402. It is determined whether or not it is a force.
  • step S403 If the effective pixel determination unit 471 determines that the value of the gradient flag is the value in step S402, in step S403, the effective pixel determination unit 471 controls each unit of the gradient method calculation unit 405 to execute the integrated gradient method calculation process. .
  • This integrated gradient method computing process will be described later with reference to the flowchart of FIG.
  • the integrated gradient method calculation processing in step S403 makes the effective pixel the target of the gradient method calculation.
  • the pixel difference ⁇ in the horizontal direction of the effective pixel, the pixel difference Ay in the vertical direction, and the pixel in the time direction The difference ⁇ t is accumulated, and the motion vector vn is obtained using the accumulated gradient and the least square sum of Expression (14), and is output to the vector calculation unit 464.
  • step S404 the vector calculation unit 464 adds the motion vector vn obtained by the integrated gradient calculation unit 463-1 to the offset vector Vn—l from the selector 401 to obtain the offset vector Vn—1.
  • the motion vector Vn obtained by adding the motion vector vn to is output to the vector evaluation unit 104.
  • step S404 the motion vector Vn calculated by the vector calculation unit 464 is output to the vector evaluation unit 104, and the gradient method calculation process is terminated.
  • Step S306 Return, Step S307 [Proceed].
  • step S402 If it is determined in step S402 that the gradient flag value is not 4, the valid pixel determination unit 471 determines whether or not the gradient flag value is 2 in step S405. Determine whether or not. If it is determined in step S405 that the value of the gradient flag is 2, it is considered that there are many pixels that do not have a gradient in the horizontal direction in the effective pixels. Therefore, the processing is performed in step S406. Skip to step S407.
  • the effective pixel determination unit 471 determines in step S405 that the value of the gradient flag is not 2 (that is, the value of the gradient flag is 0 or 1), in step S406, the horizontal gradient
  • the determination unit 472 is controlled to execute horizontal independent gradient method calculation processing. This horizontal independent gradient method computing process will be described later with reference to FIG.
  • pixels having a gradient in the horizontal direction are subjected to gradient method computation by the horizontal independent gradient method computation processing in step S406, and there is a gradient in the horizontal direction among the effective pixels.
  • the pixel difference ⁇ x in the horizontal direction of the pixel and the pixel difference ⁇ t in the time direction are integrated, and the horizontal component of the motion vector vn is obtained using the integrated gradient and Equation (23).
  • the result is output to vector calculation unit 464, and the process proceeds to step S407.
  • step S407 the valid pixel determination unit 471 determines whether or not the value of the gradient flag is 1. If it is determined in step S407 that the value of the gradient flag is 1, it is considered that there are many pixels that do not have a gradient in the vertical direction in the effective pixels, so the processing skips step S408. Then proceed to step S409.
  • step S407 If the effective pixel determination unit 471 determines in step S407 that the value of the gradient flag is not 1 (that is, the value of the gradient flag is 0 or 2), in step S408, the vertical gradient is determined.
  • the determination unit 473 is controlled to execute vertical independent gradient method calculation processing. Note that this vertical independent gradient method computing process is different from the horizontal independent gradient method computing process in step S406 only in the target direction, and the basic process is the same, so FIG. Will be described later as a standalone gradient method calculation process.
  • step S408 By the independent gradient method computation process in the vertical direction in step S408, pixels having a gradient in the vertical direction among the effective pixels are subjected to gradient method computation, and among the effective pixels, there is a gradient in the vertical direction.
  • the pixel difference Ay in the vertical direction of the pixel and the pixel difference At in the time direction are integrated, and using the integrated gradient and equation (23), the vertical component of the motion vector vn is obtained.
  • the calculation is output to the calculation unit 464, and the process proceeds to step S409.
  • At least one of the horizontal direction component and the vertical direction component of the motion vector vn is input to the vector calculation unit 464 from the independent gradient calculation unit 463-2.
  • the vector calculation unit 464 obtains the target direction component (at least one of the horizontal direction component and the vertical direction component) of the offset vector Vn-l from the selector 401 and the independent gradient calculation unit 46 3-2.
  • the target direction component of the motion vector vn is added, and the resulting motion vector Vn is output to the vector evaluation unit 104.
  • the direction component that is not input from the independent gradient calculation unit 463-2 is calculated as a zero vector. That is, when the value of the gradient flag is 2, the vertical component of the motion vector vn cannot be obtained from the independent gradient calculation unit 463-2, so the vector calculation unit 464 calculates the vertical component of the motion vector vn. When the value is 0 and the gradient flag value is 1, the horizontal component of the motion vector vn cannot be obtained from the independent gradient calculation unit 463-2, so the vector calculation unit 464 The horizontal component of is a 0 vector.
  • step S409 the motion vector Vn calculated by the vector calculation unit 464 is output to the vector evaluation unit 104, the gradient method arithmetic processing is terminated, and the processing is performed in step S306 in FIG. Step S307 [Proceed.
  • step S410 when it is determined in step S401 that the value of the gradient flag is 3, in step S410, the valid pixel determination unit 471 prohibits the calculation of the gradient method calculation unit 405 and performs gradient method calculation processing. Exit.
  • the effective pixels are not used. If the motion vector is obtained by the integrated gradient method, and there are many one-sided gradient pixels in the effective pixels, then the independent gradient using only the pixels with the gradient in the effective pixels is used. A motion vector is obtained by a legal operation.
  • step S403 of FIG. 36 will be described in detail with reference to the flowchart of FIG.
  • the pixel difference calculation unit 461 of the gradient method calculation unit 405 receives the target pixel value of the calculation block supplied from the memory 403.
  • Each part of the pixel difference calculation unit 461 (the first spatial gradient pixel difference calculation unit 461-1, the second spatial gradient pixel difference calculation unit 461-2, and the temporal direction pixel difference calculation unit 461-3) is an effective pixel determination unit 471.
  • step S421 one pixel in the calculation block is selected, and the process proceeds to step S422 to execute the effective pixel calculation process.
  • the effective pixel calculation process is basically the same process as the effective pixel calculation process described above with reference to FIG. 34, and thus the description thereof is omitted.
  • step S422 By the effective pixel calculation process in step S422, the horizontal pixel difference ⁇ X and vertical pixel difference Ay on the frame t + 1 of the selected pixel, the horizontal pixel difference ⁇ and vertical on the frame t The pixel difference Ay in the direction and the pixel difference At in the time direction between the frame t + 1 and the frame t are obtained, and the logical operations of the equations (19) to (21) are performed using them.
  • step S423 the effective pixel determination unit 471 obtains the logical sum of the above-described three expressions (that is, the expression (22) is obtained and the power (force power) in which the expression (22) is true). It is determined whether or not the selected pixel is an effective pixel. If it is determined in step S423 that the selected pixel is not a valid pixel, the process returns to step S421, and the subsequent processes are repeated.
  • Effective pixel determination unit 471 determines in step S423 that the pixel is an effective pixel.
  • the pixel is subjected to the gradient method calculation, and the pixel difference ⁇ in the horizontal direction, the pixel difference Ay in the vertical direction, and the pixel difference At in the time direction are supplied to the integrated gradient calculation unit 463-1
  • the integrated gradient calculation unit 463-1 is controlled to integrate the supplied gradient (pixel difference).
  • step S425 the effective pixel determination unit 471 determines whether or not the processing of all the pixels in the calculation block has been completed. If it is determined in step S425 that all the pixels in the calculation block have not been processed yet, the process returns to step S421, and the subsequent processing is repeated.
  • the effective pixel determination unit 471 determines in step S425 that all the pixels in the calculation block have been processed, the effective gradient determination unit 471 controls and integrates the integrated gradient calculation unit 463-1 in step S426.
  • the motion vector vn is calculated using the gradient.
  • step S424 the integrated gradient calculation unit 463-1 receives the pixel difference At in the time direction, the pixel difference ⁇ ⁇ in the horizontal direction, and the horizontal pixel difference ⁇ supplied from the calculation determination unit 524. If the pixel difference Ay in the vertical direction is accumulated and it is determined in step S425 that all the pixels in the calculation block have been processed, the accumulated gradient and the least square sum of equation (14) are calculated in step S426. Using this, the motion vector vn is obtained, and the obtained motion beta vn is output to the vector nore calculation 464. Thereafter, the process returns to step S403 in FIG. 36 until the process is completed, and proceeds to step S404.
  • the pixel difference calculation unit 461 of the gradient method calculation unit 405 receives the target pixel value of the calculation block supplied from the memory 403. Each unit of the pixel difference calculation unit 461 selects one pixel in the calculation block in step S441 under the control of the effective pixel determination unit 471. In step S442, effective pixel calculation processing is executed.
  • This effective pixel calculation process is also basically the same process as the effective pixel calculation process described above with reference to FIG. 34, and a description thereof will be omitted.
  • step S442 By the effective pixel calculation process of step S442, the horizontal pixel difference ⁇ X and vertical pixel difference Ay on the frame t + 1 of the selected pixel, the horizontal pixel difference ⁇ and vertical on the frame t are obtained, and the logical operations of the equations (19) to (21) are performed using them.
  • step S443 the effective pixel determination unit 471 obtains the logical sum of the above-described three expressions (that is, the expression (22) is obtained and the power (force power) in which the expression (22) is true). It is determined whether or not the selected pixel is an effective pixel. If it is determined in step S443 that the selected pixel is not a valid pixel, the process returns to step S441, and the subsequent processes are repeated.
  • step S443 When the effective pixel determination unit 471 determines that the pixel is an effective pixel in step S443, the effective pixel determination unit 471 controls the horizontal gradient determination unit 472 in step S444 to perform the effective pixel target direction (in the horizontal direction in the other cases). It is determined whether or not the force has a gradient. If it is determined in step S444 that there is no gradient in the target direction of the effective pixel (in this case, the horizontal direction), the processing returns to step S441, and the subsequent processing is repeated.
  • the horizontal gradient determining unit 472 determines that there is a gradient in the horizontal direction of the effective pixel
  • the pixel is set as the calculation target of the gradient method
  • the horizontal pixel difference ⁇ of the pixel and the time direction
  • the pixel difference At is supplied to the independent gradient calculation unit 463-2, and in step S445, the independent gradient calculation unit 463-2 is controlled to integrate the supplied gradient (pixel difference).
  • step S446 the effective pixel determination unit 471 determines whether or not the processing of all the pixels in the calculation block has been completed. If it is determined in step S446 that the processing of all the pixels in the calculation block has not been completed, the processing returns to step S441, and the subsequent processing is repeated. [0433] When the effective pixel determination unit 471 determines in step S446 that all the pixels in the calculation block have been processed, the effective pixel determination unit 471 controls and integrates the independent gradient calculation unit 463-2 in step S447. Using the gradient, calculate the motion vector vn in the target direction.
  • the stand-alone gradient calculation unit 463-2 supplies the pixel difference At in the time direction of the effective pixels having a gradient in the horizontal direction, which is supplied from the horizontal gradient determination unit 472 in step S445, and the horizontal direction. If the pixel difference ⁇ is integrated and it is determined in step S446 that all the pixels in the calculation block have been processed, in step S447, the motion vector is calculated using the integrated gradient and equation (23). The target direction (horizontal direction) component of vn is obtained, and the horizontal direction component of the obtained motion vector vn is output to the vector calculation unit 464. Thereafter, the process returns to step S406 in FIG. 36 until the process is completed, and proceeds to step S407.
  • evaluation value determining unit 412 starts the vector evaluation process of FIG.
  • step S461 the evaluation value determination unit 412 determines whether or not the force has a gradient flag value of 3. If the evaluation value determination unit 412 determines that the gradient flag value is not 3, the gradient method calculation is being performed.
  • step S462 the evaluation value calculation unit 61B is controlled to execute evaluation value calculation processing of the offset vector Vn ⁇ 1, motion vector Vn, and 0 vector. This evaluation value calculation process is basically the same as the evaluation value calculation process described above with reference to FIG.
  • step S462 By the evaluation value calculation process in step S462, the offset vector Vn-1 from the selector 401, the integrated gradient calculation unit 463-1 or the independent gradient calculation unit 463-2, and the vector calculation unit 464 The motion vector Vn and the evaluation value dfv of the 0 vector are calculated.
  • the evaluation value determination unit 412 determines in step S463 whether or not it is the value of the gradient flag. If it is determined that the value of the gradient flag is 4 (that is, the motion vector Vn calculated by the integrated gradient calculation unit 46 3-1), the vector calculation unit 464 calculates it in step S464. It is determined whether the evaluation value dfv (n) of the motion vector Vn is smaller than the evaluation value dfv (n-1) of the force offset vector Vn1.
  • step S464 If it is determined in step S464 that the evaluation value dfv (n—l) is smaller than the evaluation value dfv (n) (the offset vector Vn—1 is more reliable)
  • the evaluation value determination unit 412 determines the offset vector Vn ⁇ 1 as the motion vector V in step S465. That is, the motion vector V is changed (corrected) to the offset vector Vn ⁇ 1 which is not the motion vector Vn calculated by the vector calculation unit 464. Then, in step S466, the evaluation value determining unit 412 maximizes the number of iterations of the gradient method calculation, and ends the vector evaluation process.
  • step S466 even if the gradient vector calculation is repeated using the motion vector V that was the offset vector Vn-1, the result is the same, so the gradient method calculation is repeated. As such, the number of iterations is maximized.
  • step S464 the force of the evaluation value dfv (n) is smaller than the evaluation value dfv (n-1) (the force reliability of the motion vector Vn calculated by the vector calculation unit 464 is high). If it is determined, the evaluation value determination unit 412 determines the motion vector Vn calculated by the vector calculation unit 464 as it is as the motion vector V in step S467, and repeats gradient method calculation in step S468. Add 1 to the number of times and finish the vector evaluation process.
  • step S469 it is determined whether or not the evaluation value d fv (n) of the motion vector Vn calculated by the vector calculation unit 464 is smaller than the evaluation value dfv (O) of the zero vector.
  • step S469 it is determined that the evaluation value dfv (n) is smaller than the evaluation value dfv (O) (the motion vector Vn calculated by the solid calculation unit 464 is more reliable). If so, the evaluation value determination unit 412 determines the motion vector Vn calculated by the vector calculation unit 464 as it is as the motion vector V in step S470, and ends the vector evaluation process. [0445] If it is determined in step S469 that the evaluation value dfv (O) is smaller than the evaluation value dfv (n) (the 0 vector is more reliable), the evaluation value determination unit 412 In step S471, the zero vector is determined as the motion vector V, and the vector evaluation process is terminated. That is, in step S471, the motion vector V is changed (corrected) to a zero vector that is not the motion vector Vn calculated by the vector calculation unit 464.
  • step S461 determines that the value of the gradient flag is 3, it is determined that the number of effective pixels is small in the calculation block.
  • the vector is determined as the motion vector V, that is, the motion vector V is changed (corrected) to the 0 vector that is not the motion vector Vn calculated by the vector calculation unit 464, and the vector evaluation process is terminated.
  • the comparison target in the vector evaluation is switched based on the value of the gradient flag, the motion vector is evaluated, and the motion vector is changed (corrected) according to the evaluation result. Therefore, it is possible to detect a motion vector with high accuracy according to the gradient state in the calculation block.
  • the horizontal gradient and the vertical gradient are determined, and the gradient state in the effective pixels (that is, the ratio of pixels having only the horizontal gradient or the vertical gradient) is determined.
  • the force for determining the execution of the gradient method based on the horizontal gradient or the vertical gradient using the equations (19) to (21) that are the conditional expressions for determining the effective pixel, as described below.
  • the ratio of pixels having only a gradient can be obtained, and the gradient method execution determination can be performed based on the ratio.
  • FIG. 40 is a block diagram illustrating another configuration example of the pixel determination unit, the counter, and the calculation execution determination unit of the effective pixel determination unit in FIG.
  • the pixel determination unit 422 in the example of FIG. 40 is common to the pixel determination unit 422 of FIG. 26 in that the effective pixel determination unit 431 is provided, but the horizontal gradient determination unit 432 and the vertical gradient determination unit 433 are excluded. This is different from the pixel determination unit 422 in FIG.
  • the effective pixel determination unit 431 further includes a horizontal / vertical gradient determination unit 431-1, a horizontal gradient determination unit 431-2, and a vertical gradient determination unit 431-3.
  • the horizontal / vertical gradient determination unit 431-1 uses the equation (21) to calculate the horizontal position of the pixels in the computation block.
  • the vertical focus condition is satisfied or not, and it is determined that the pixels in the calculation block satisfy the horizontal and vertical focus condition, that is, the vertical and horizontal gradients are present, and the horizontal and vertical directions Therefore, it is determined that there is horizontal gradient and vertical gradient (hereinafter also referred to as horizontal vertical gradient), and the value of horizontal vertical gradient counter 481 (the number of pixels having horizontal gradient and vertical gradient) And 1 is added to the value of the effective pixel counter 44 1.
  • the horizontal gradient determination unit 431-2 determines whether the pixels in the calculation block satisfy the horizontal focus condition, and the pixels in the calculation block satisfy the horizontal focus condition. In other words, the horizontal gradient is more dominant than the vertical gradient, and the horizontal movement is similar.Therefore, it is determined that there is a horizontal gradient, and the horizontal gradient counter The value of 482 (the number of pixels with a horizontal gradient) is incremented by 1, and the value of the effective pixel counter 441 is incremented by 1.
  • the vertical gradient determination unit 431-3 determines whether the pixels in the calculation block satisfy the vertical focus condition using Expression (20), and the pixels in the calculation block satisfy the vertical focus condition. In other words, the vertical gradient is more dominant than the horizontal gradient, and it is determined that there is a similarity in vertical movement. 1 (the number of pixels with a vertical gradient) is added by 1 and the value of the effective pixel counter 441 is added by 1.
  • Counter 423 in the example of FIG. 40 has a point power having an effective pixel counter 441.
  • counter 423 in Figure 26 Different from counter 423 in Figure 26.
  • the horizontal / vertical gradient counter 481 has a pixel (valid pixel) that is determined to have a horizontal gradient and a vertical gradient (hereinafter also referred to as a horizontal / vertical gradient) by the horizontal / vertical gradient determination unit 431-1 for each computation block. ) Is stored.
  • the horizontal gradient counter 482 stores the number of pixels (effective pixels) determined to have a horizontal gradient by the horizontal gradient determination unit 431-2 for each calculation block.
  • the vertical gradient counter 483 stores the number of pixels (effective pixels) determined to have a vertical gradient by the vertical gradient determination unit 433-1 for each calculation block.
  • the calculation execution determination unit 425 in the example of FIG. 40 is common to the calculation execution determination unit 425 of FIG. 29 in that it includes a flag setting unit 452, but instead of the counter value calculation unit 451, a counter value calculation is performed. Point power with part 491 added. This is different from the calculation execution determination part 425 in FIG.
  • the counter value calculation unit 491 has a counter 423 (valid pixel counter 441, horizontal / vertical gradient counter 481, horizontal gradient counter 482, and vertical From the no-gradient counter 483), the number of effective pixels (cnt_t), the number of pixels with horizontal and vertical gradients (cnt_xy), the number of pixels with horizontal gradients (cnt_x), and the vertical direction Obtain the number of pixels with gradient (cntj), calculate the ratio of the effective pixel in the calculation block and the one-sided gradient pixel of the effective pixel, and the flag setting unit 452 Controls the value of the gradient flag to be set.
  • the counter value calculation unit 491 includes the number of effective pixels (cnt_t), the number of pixels with a gradient in the horizontal and vertical directions (cnt_xy), the number of pixels with a gradient in the horizontal direction (cnt_x), and the vertical direction.
  • Gradient method execution determination processing is performed using the following equations (27) to (30) using the number of pixels with gradient (cnt_y).
  • pxLa represents the total number of pixels in the operation block
  • represents multiplication
  • th4 to th7 represent different predetermined threshold values less than 1. It should be noted that th4> th5, th6, th7.
  • the gradient method calculation using Expression (23) is executed only for the movement in the flat direction. In this case, only effective pixels having a gradient in the horizontal direction are used in the gradient method calculation.
  • the gradient method calculation using Equation (23) is executed only for vertical movement. In this case, only effective pixels having a gradient in the vertical direction are used for the gradient method calculation.
  • FIG. 41 is a diagram illustrating a configuration example of the calculation determination unit of the gradient method calculation unit corresponding to the effective pixel determination unit of FIG. That is, the arithmetic determination unit 462 in the example of FIG. 41 is common to the arithmetic determination unit 462 of FIG. 27 in that the effective pixel determination unit 471 includes the horizontal gradient determination unit 472 and the vertical gradient determination unit 473. This is different from the operation determination unit 462 in FIG. In the example of FIG. 41, the effective pixel determination unit 471 is further configured by a horizontal / vertical gradient determination unit 471-1, a horizontal gradient determination unit 471-2, and a vertical gradient determination unit 471-3! RU
  • the horizontal / vertical gradient determination unit 471-1, the horizontal gradient determination unit 471-2, and the vertical gradient determination unit 471-3 each determine the method of gradient method calculation processing based on the value of the gradient flag.
  • the horizontal / vertical gradient determination unit 471-1 determines that the integrated gradient calculation unit 463-1 performs gradient method calculation processing based on the value of the gradient flag, the equation (21) is used. Then, it is determined whether or not the pixels in the calculation block satisfy the horizontal / vertical focus condition, and the gradient (pixel difference) of the pixel determined to satisfy the horizontal / vertical focus condition is supplied to the integrated gradient calculation unit 463-1 .
  • the horizontal / vertical gradient determination unit 471-1 uses the equation (21) when it is determined that the independent gradient calculation unit 463-2 performs gradient method calculation processing based on the value of the gradient flag. It is determined whether or not the pixels in the block satisfy the horizontal / vertical focus condition, and the gradient (pixel difference) of the pixel determined to satisfy the horizontal / vertical focus condition is supplied to the independent gradient calculation unit 463-2.
  • the horizontal gradient determination unit 471-2 is based on the value of the gradient flag, and the integrated gradient calculation unit 463
  • the horizontal gradient determining unit 471-2 is based on the value of the gradient flag, and the independent gradient calculating unit 463-2.
  • step 2 it is determined whether or not the pixels in the calculation block satisfy the horizontal focus condition using Equation (19).
  • the gradient (pixel difference) of the pixel determined to satisfy the condition is supplied to the stand-alone gradient calculation unit 463-2.
  • the gradient of the pixel determined to satisfy the horizontal focus condition by the horizontal gradient determination unit 471-2 pixel (Difference) is not supplied to the stand-alone gradient calculation unit 463-2.
  • the vertical gradient determination unit 471-3 is based on the value of the gradient flag, based on the value of the gradient flag.
  • Equation (20) If it is determined that gradient method calculation processing is performed in 1, whether or not the pixel in the calculation block satisfies the vertical focus condition is determined by using Equation (20), and it is determined that the vertical focus condition is satisfied.
  • the gradient of the obtained pixel (pixel difference) is supplied to the integrated gradient calculation unit 463-1.
  • the vertical gradient determination unit 471-3 is based on the value of the gradient flag, and the independent gradient calculation unit 463
  • step 2 it is determined whether or not the pixels in the calculation block satisfy the vertical focus condition using Equation (20).
  • the gradient (pixel difference) of the pixel determined to satisfy the condition is supplied to the stand-alone gradient calculation unit 463-2. That is, when it is determined that the gradient method calculation process is performed in the horizontal direction, the gradient (pixel difference) of the pixel determined to satisfy the vertical focus condition by the vertical gradient determination unit 471-3 is determined as the independent gradient calculation unit 463. — Not supplied to 2.
  • the integrated gradient calculation unit 463-1 is configured so that the horizontal / vertical gradient determination unit 471-1, the horizontal gradient determination unit 471-2, and the vertical gradient determination unit 471-3 each satisfy the conditional expression. Performs an integrated gradient method calculation using the gradient of the pixel that is determined to be useful (i.e., the effective pixel).
  • the stand-alone gradient calculation unit 463-2 includes pixels that are determined by the horizontal / vertical gradient determination unit 471-1 and the horizontal gradient determination unit 471-2 to satisfy the conditional expressions (that is, the horizontal of the effective pixels). Pixels that have a gradient) are subjected to horizontal independent gradient method computation, and the horizontal and vertical gradient determination units 471-1 and 471-3 determine that the respective conditional expressions are satisfied. Using the gradient of the effective pixel (that is, the pixel having the vertical gradient), the vertical independent gradient method calculation is performed.
  • FIG. 42 is another example of the effective pixel determination process described above with reference to FIG. 33 performed in step S303 in FIG. 32.
  • the processes in steps S501 to S503 and S511 in FIG. Since basically the same processing as the processing of steps S321 to S323 and S330 is performed, detailed description thereof will be omitted as appropriate.
  • the pixel difference calculation unit 421 inputs the target pixel value of the calculation block supplied from the memory 403.
  • the effective pixel determination unit 431 is controlled to reset the values of the counters (effective pixel number counter 441, horizontal / vertical gradient counter 481, horizontal gradient counter 482, and vertical gradient counter 483).
  • each part of the pixel difference calculation unit 421 (the first spatial gradient pixel difference calculation unit 421-1, the second spatial gradient pixel difference calculation unit 421-2, and the time direction pixel difference calculation unit 421-3)
  • Step S503 executes the effective pixel calculation process. Since this effective pixel calculation process has been described above with reference to FIG. 34, its description is omitted.
  • step S503 By the effective pixel calculation process in step S503, the horizontal pixel difference ⁇ X and vertical pixel difference Ay on the frame t + 1 of the selected pixel, the horizontal pixel difference ⁇ and vertical on the frame t The pixel difference Ay in the direction and the pixel difference At in the time direction between the frame t + 1 and the frame t are calculated, and using these, the horizontal gradient determination unit 431-2 uses the expression ( 19), the vertical gradient judgment unit 431-3 uses the formula (20) that is the focus condition in the vertical direction, and the horizontal vertical gradient judgment unit 431-1 uses the logic of formula (21) that is the focus condition in the horizontal and vertical direction. An operation is performed. Thereafter, the process proceeds back to step S503 in FIG. 42 and proceeds to step S504.
  • step S504 the horizontal / vertical gradient determination unit 431-1 determines whether or not the selected pixel satisfies the horizontal and vertical focus condition (Equation (21)), and the selected pixel is determined.
  • step S505 the number of pixels having a horizontal / vertical gradient in the horizontal / vertical gradient counter 481 is incremented by 1, and in step S510, the effective pixel number counter 441 Add 1 to the number of effective pixels.
  • step S504 If it is determined in step S504 that the horizontal-vertical focus condition is not satisfied, the horizontal gradient determination unit 431-2 determines that the selected pixel is in the horizontal focus condition (formula (19)) in step S506. If it is determined whether the selected pixel satisfies the horizontal focus condition, in step S507, the horizontal gradient counter 482 adds 1 to the number of pixels having a horizontal gradient, In step S510, 1 is added to the number of effective pixels of the effective pixel counter 441.
  • step S506 If it is determined in step S506 that the horizontal focus condition is satisfied!
  • step S508 the vertical gradient determination unit 431-3 determines whether or not the selected pixel satisfies the vertical focus condition (Equation (20)), and the selected pixel satisfies the vertical focus condition.
  • step S509 the number of pixels having the vertical gradient of the vertical gradient counter 483 is incremented by 1, and in step S510, the number of effective pixels of the effective pixel number counter 441 is incremented by 1.
  • step S510 After the number of valid pixels is incremented by 1 in step S510, the process proceeds to step S511, and the pixel difference calculation unit 421 determines whether or not the processing of all the pixels in the calculation block has been completed. . If it is determined in step S510 that the processing of all the pixels in the calculation block has been completed, the effective pixel number determination processing is ended, and the processing proceeds to step S303 [return and step S304 in FIG. 32]. .
  • step S508 If it is determined in step S508 that the horizontal focus condition is satisfied! /
  • step S511 If it is determined that all the pixels have not been processed yet, the processing returns to step S502, and the subsequent processing is repeated.
  • the effective pixel counter 441 has the number of effective pixels determined to be effective in the calculation block, and the horizontal / vertical gradient counter 481 has horizontal and vertical out of the effective pixels.
  • the number of pixels that are determined to have gradients (more specifically, vertical and horizontal gradients and similar horizontal and vertical motion), valid for horizontal gradient counter 482 Number of pixels that have been determined to have a horizontal gradient (more specifically, the horizontal gradient is more dominant than the vertical gradient and has similarity in horizontal movement)
  • the vertical gradient counter 483 has a vertical gradient among the effective pixels (more specifically, the vertical gradient is more dominant than the horizontal gradient to some extent, and there is similarity to the vertical motion.
  • the gradient method execution determination process in FIG. 43 is another example of the gradient method execution determination process described above with reference to FIG. 35.
  • the counter value calculation unit 491 in FIG. 40 determines from the effective pixel number counter 441 that the number of effective pixels (cn U) and the horizontal / vertical gradient counter 481 have a horizontal / vertical gradient among the effective pixels. From the horizontal gradient counter 482, the number of pixels determined to have a horizontal gradient (cnt_x), and from the vertical gradient counter 483, the vertical gradient is calculated from the horizontal gradient counter 482. Pixel determined to be present (ngcntj is acquired, and in step S521, it is determined whether or not Expression (27) is satisfied.
  • step S521 If it is determined in step S521 that the expression (27) is satisfied, it is considered that valid pixels are appropriately present in the calculation block, and the counter value calculation unit 491 receives the expression ( 28) Judge whether the power meets the requirements.
  • step S524 If it is determined in step S524 that expression (29) is not satisfied, the counter value is calculated.
  • the gradient state of the calculation block (that is, the number of effective pixels, the number of effective pixels, the number of pixels having a horizontal and vertical gradient, the number of pixels having a horizontal gradient, and the number of effective pixels, A gradient flag corresponding to the number of pixels having a vertical gradient is output to the gradient method computing unit 405 and the evaluation determining unit 412.
  • the effective pixel determination unit 404 in Fig. 40 uses only the horizontal gradient or the vertical gradient using the equations (19) to (21) that are the conditional expressions for determining the effective pixels. Since the ratio of pixels is obtained and the gradient method execution decision is made based on this ratio, there is no need to obtain the horizontal gradient and vertical gradient again. Therefore, the calculation load can be reduced as compared with the case of the effective pixel determination unit 404 in FIG. 26 described above.
  • FIG. 44 is another example of the independent gradient method processing described above with reference to FIG. 38 performed in step S406 or S408 in FIG. 36, and steps S531, S532, S534 to S536 in FIG.
  • This processing is basically the same as the processing in steps S441, S442, S445 to S447 in FIG. 38, and therefore detailed description thereof will be omitted as appropriate.
  • Each part of the pixel difference calculation unit 461 in Fig. 41 selects one pixel in the calculation block in step S531 under the control of the effective pixel determination unit 471, and proceeds to step S532 to execute effective pixel calculation. Execute the process. Since this effective pixel calculation process is basically the same process as the effective pixel calculation process described above with reference to FIG. 34, the description thereof is omitted.
  • step S532 By the effective pixel calculation process in step S532, the horizontal pixel difference ⁇ X and vertical pixel difference Ay on the frame t + 1 of the selected pixel, the horizontal pixel difference ⁇ and vertical on the frame t The pixel difference Ay in the direction and the pixel difference At in the time direction between the frame t + 1 and the frame t are obtained, and using these, the horizontal gradient determination unit 471-2 uses the expression ( 19), the vertical gradient judgment unit 471-3 is used to calculate the logical expression (20), which is the vertical focus condition, and the horizontal vertical gradient determination unit 471-1 is the logical formula of the horizontal / vertical focus condition (21). An operation is performed. Thereafter, the process proceeds back to step S532 in FIG. 44 and proceeds to step S533.
  • step S533 the horizontal / vertical gradient determination unit 471-1 and horizontal gradient determination unit 471-2 determine whether the selected pixel has a gradient in the target direction (in this case, the horizontal direction). To do. That is, the horizontal / vertical gradient determination unit 471-1 determines whether or not the selected pixel satisfies the horizontal vertical direction of interest (formula (21)), and the horizontal gradient determination unit 471 2 It is determined whether or not the selected pixel satisfies the horizontal focus condition (Equation (19)). The horizontal / vertical gradient determination unit 471-1 determines that the selected pixel satisfies the horizontal focus condition. Or when the selected pixel is determined to satisfy the horizontal focus condition by the horizontal gradient determining unit 471-2, the selected pixel is inclined in the horizontal direction. It is determined that there is a distribution, and the process proceeds to step S534.
  • step S533 it is determined that the pixel selected by the horizontal / vertical gradient determination unit 471-1 does not satisfy the horizontal and vertical direction of interest, and the horizontal gradient determination unit 471-2 selects the pixel. If the selected pixel satisfies the horizontal focus condition and is determined to be ⁇ / ⁇ , it is determined that the selected pixel does not have a gradient in the horizontal direction, and the process returns to step S531, and the subsequent processes are performed. Repeated.
  • the horizontal / vertical gradient determination unit 471-1 or the horizontal gradient determination unit 471-2 uses the pixel determined to have a horizontal gradient in step S533 as the calculation target of the gradient method, and the pixel in the horizontal direction of the pixel
  • the difference ⁇ and the pixel difference At in the time direction are supplied to the stand-alone gradient calculation unit 463-2, and in step S534, the stand-alone gradient calculation unit 463-2 is controlled to supply the supplied gradient (pixel difference). Accumulate.
  • step S535 the horizontal / vertical gradient determination unit 471-1 determines whether or not the processing of all the pixels in the calculation block has been completed. If it is determined in step S535 that the processing of all the pixels in the calculation block has not been completed yet, the processing returns to step S441, and the subsequent processing is repeated.
  • the horizontal gradient determination unit 471-1 determines in step S535 that all the pixels in the calculation block have been processed, the horizontal gradient determination unit 471-1 controls the independent gradient calculation unit 463-2 in step S536. Then, the horizontal component of the motion vector vn is calculated using the accumulated gradient.
  • step S536 the stand-alone gradient calculation unit 463-2 obtains the target direction (horizontal direction) component of the motion vector vn using the accumulated gradient and Equation (23), and obtains the obtained motion vector V n Are output to the vector calculation unit 464. Thereafter, the process returns to step S406 in FIG. 36 and proceeds to step S407.
  • the gradient method computing unit 405 in FIG. 41 As described above, also in the gradient method computing unit 405 in FIG. 41, the gradient method computing unit 405 in FIG. Similarly to the case, only the gradients of the pixels having the gradient in the target direction among the effective pixels of the calculation block are integrated, and the gradient method calculation processing in the target direction is executed. As a result, even if the calculation block is a one-sided gradient region, it is possible to suppress detection of the target direction component of the wrong motion vector for the calculation block.
  • one-side gradient pixels having only a horizontal gradient or a vertical gradient are determined from the effective pixels that only need to be determined as effective pixels. Based on the ratio of pixels with one-sided gradient, the gradient method calculation was switched, the vector to be evaluated was switched, and iterative determination was performed. The accuracy of motion vector detection in the gradient region is improved.
  • the motion vector V obtained by the vector detection unit 52 in Fig. 17 is stored in the detection vector memory 53 as a motion vector (hereinafter also referred to as a detection vector) used in the subsequent allocation process.
  • the initial vector selection unit 101 also uses it as an initial candidate vector (candidate vector of the initial vector).
  • the vector detection unit 52 in FIG. 45 is configured to separately store the detection vector used in the subsequent vector allocation process and the initial candidate vector used in the initial vector selection process. .
  • the vector detection unit 52 shown in FIG. 45 includes the prefilters 102-1 and 102-2, the shifted initial beta allocation unit 105, the evaluation value memory 106, and the shifted initial vector memory 107.
  • Force common to detection unit 52 Initial vector selection unit 101 is replaced by initial vector selection unit 521, iterative gradient method calculation unit 103 is replaced by iterative gradient method calculation unit 522, and vector evaluation unit 104 is a vector The point that the evaluation unit 523 is replaced, and the point power to which the initial candidate vector memory 524 is added is different from the vector detection unit 52 of FIG.
  • the initial vector selection unit 521 is different from the above in that it acquires the motion vectors of the peripheral blocks obtained in the past from the initial candidate vector memory 524 that is not included in the detection vector memory 53. Since the basic configuration is the same as that of the vector selection unit 101 in FIG. 17, detailed description thereof is omitted.
  • the iterative gradient method computing unit 522 is configured similarly to the iterative gradient method computing unit 103 of FIG. 17, and the initial vector VO input from the initial vector selection unit 101 and Using the frame t and the frame t + 1 input through the filters 102-1 and 102-2, the motion vector Vn is calculated by the gradient method for each predetermined block.
  • the iterative gradient method computing unit 522 compares the number of effective pixels used as the target of the gradient method not only with a predetermined threshold value a but also with a predetermined threshold value
  • the iterative gradient method computing unit 522 outputs the initial vector V 0 and the calculated motion vector Vn to the vector evaluation unit 523, and the motion by the vector evaluation unit 104 is performed. Based on the vector evaluation results, the gradient method is repeated to calculate the motion vector Vn. Details of the iterative gradient method computing unit 522 will be described later with reference to FIG. 46 together with details of the vector evaluation unit 523.
  • the vector evaluation unit 523 has an evaluation value calculation unit 61B.
  • the evaluation value calculation unit 61B includes a motion vector Vn 1 from the iterative gradient method calculation unit 103. (Or the initial vector V0) and the evaluation value dfv of the motion vector Vn are calculated, and the iterative gradient method calculation unit 522 is controlled based on the evaluation value dfv calculated by the evaluation value calculation unit 61B to calculate the gradient method. Is executed repeatedly, and finally, a reliable one based on the evaluation value dfv is selected.
  • the vector evaluation unit 523 receives the motion vector Vn— 1 (or initial vector V0), motion vector Vn, or 0 vector from the iterative gradient method computing unit 522 from the iterative gradient method computing unit 522. According to the counter flag of each vector and the evaluation value dfv of each vector, V in the subsequent stage, the detection vector Ve used in the allocation process, and the initial candidate used in the initial vector selection unit 521 when selecting the initial vector Find each vector Vic . The vector evaluation unit 523 stores the obtained detection vector Ve in the detection vector memory 53 and also stores the obtained initial candidate vector Vic in the initial candidate vector memory 524.
  • the initial candidate vector memory 524 stores the initial candidate vector obtained by the vector evaluation unit 523. Tuttle Vic force Stored in correspondence with the detection target block.
  • FIG. 46 is a block diagram showing the configuration of the iterative gradient method computing unit 522 and the vector evaluation unit 523.
  • the iterative gradient method computing unit 522 of FIG. 46 includes a selector 401, a memory control signal generation unit 402, a memory 403, a gradient method computing unit 405, and a delay unit 406.
  • the effective pixel determination unit 404 is different from the iterative gradient method calculation unit 103 of FIG. 25 in that the effective pixel determination unit 404 is replaced with the effective pixel determination unit 531.
  • the effective pixel determination unit 531 calculates, for example, the pixel difference between the calculation blocks of the frame t and the frame t + 1 using the target pixel value supplied from the memory 403 in the same manner as the effective pixel determination unit 404. Thus, it is determined whether or not the number of effective pixels for the gradient method is greater than a predetermined threshold value in the calculation block, and the counter flag (countfl g) corresponding to the determination result is set to the gradient method.
  • the data is supplied to the calculation unit 405 and the vector evaluation unit 523.
  • the effective pixel determination unit 531 determines the number of pixels effective for the calculation of the gradient method by using two types of thresholds: a predetermined threshold, a value ⁇ , and a predetermined threshold Mfi jS ( ⁇ > ⁇ ). A value is used.
  • the effective pixel determination unit 531 obtains a gradient state in each of the horizontal direction and the vertical direction with respect to a pixel determined to be an effective pixel in the calculation block. Also, it is also determined whether or not the ratio of pixels having a gradient only in one of the vertical directions is large, and the gradient flag (gladflg) corresponding to the determination result is supplied to the gradient method calculation unit 405 and the vector evaluation unit 523. .
  • the vector evaluation unit 523 in FIG. 46 is provided with the evaluation value calculation unit 61B in that the vector in FIG. Force Common to Evaluation Unit 104 Point power obtained by replacing evaluation determination unit 412 with evaluation determination unit 541 This is different from vector evaluation unit 104 in FIG.
  • the evaluation value determination unit 523 determines whether or not it is possible to repeat the gradient method arithmetic processing, and detects the detection vector Ve. Find the initial candidate vectors Vic.
  • the evaluation value determination unit 523 compares the evaluation value dfv calculated by the evaluation value calculation unit 61B as necessary, and selects and changes the one with high reliability.
  • the gradient calculation processing is performed. It is determined whether or not to repeat. When it is determined to repeat, the obtained motion vector V is output to the delay unit 406.
  • the evaluation value determination unit 523 uses the obtained motion vector V or 0 vector as the detection vector Ve according to the value of the counter flag as the detection vector memory 53. Is stored in the initial candidate vector memory 524 as an initial candidate vector Vic.
  • the zero vector is stored in the detection vector memory 53 as the detection vector Ve, and the obtained motion vector V is used as the initial candidate vector Vic. It is stored in the Kuttle memory 524.
  • the effective pixel determination unit 531 determines whether or not to drop the detection vector Ve to the 0 vector based on the predetermined threshold value ⁇ with respect to the ratio of the number of effective pixels. Therefore, when the predetermined threshold ⁇ force is about the same as the threshold in the effective pixel determination unit 404 in FIG. 25, the accuracy of the detection vector Ve in the vector allocation unit 54 in the subsequent stage is as shown in FIG. Same as the case.
  • the effective pixel determination unit 531 determines whether or not to drop the initial candidate vector Vic to the 0 vector based on a predetermined threshold value j8 (which is a predetermined threshold value ⁇ ). .
  • a predetermined threshold value j8 which is a predetermined threshold value ⁇ .
  • the initial candidate vector Vic is less accurate as a detection processing result than the detection vector Ve, but is not a 0 vector! /, , Can have some vector value.
  • the number of valid pixels is set to a predetermined threshold value in the valid pixel determination unit 404 in FIG.
  • the ratio of 0 vectors in the candidate vector group is smaller than in the case of dropping to the 0 vector when the number is less than OC, and the variation of the vector values of the candidate vector group is increased.
  • the effective pixel determination unit 531 in FIG. 46 the possibility that a vector close to the true motion amount exists in the candidate vector is higher than in the case of the effective pixel determination unit 404 in FIG.
  • the accuracy of the initial beta can be improved.
  • FIG. 47 is a block diagram showing a detailed configuration example of the effective pixel determination unit 531. As shown in FIG.
  • the effective pixel determination unit 531 in FIG. 47 includes the pixel difference calculation unit 421, the pixel determination unit 422, the counter 423, and the calculation execution determination unit 425 in common with the effective pixel determination unit 404 in FIG. There is a difference from the effective pixel determination unit 404 in FIG. 26 in that the gradient method continuation determination unit 424 is replaced with a gradient method continuation determination unit 551.
  • the gradient method continuation determining unit 551 refers to the effective pixel number counter 441 to determine whether or not the number of pixels effective for the gradient method calculation in the calculation block is greater than a predetermined threshold value ⁇ . Further, it is determined whether or not the number of effective pixels in the calculation block is greater than a predetermined threshold value j8.
  • the gradient method continuation determination unit 551 determines that the number of pixels effective for gradient method computation in the computation block is greater than the predetermined threshold value ⁇ , the gradient method computation is executed, and the detection vector Ve and the initial value are determined.
  • the gradient method continuation determination unit 551 determines that the number of pixels effective for gradient method calculation is greater than the predetermined threshold value j8, which is less than the predetermined threshold value ⁇ , in the calculation block.
  • the result is supplied to the legal operation unit 405 and the vector evaluation unit 523.
  • the gradient method continuation determination unit 551 determines that the number of pixels effective for the gradient method calculation is less than the predetermined threshold ⁇ 8, the gradient method continuation determination unit 551 terminates the gradient method calculation and detects it.
  • a frame t + 1 of +1 is shown, and an arrow T indicates the direction of time passage from the frame t at the upper time t to the frame t + 1 at the lower time t + 1 in the figure.
  • the partition shown on the frame t represents the boundary of each block. From the left in the figure, blocks AO to A2 are shown on the frame t, and on the frame t + 1, the left in the figure. Thus, blocks B-3 to B-1 corresponding to blocks (not shown) on the frame t and blocks B0 to B2 corresponding to the blocks AO to A2 are shown. That is, on frames t and t + 1, blocks having the same number represent corresponding blocks.
  • the frame t and the frame t + 1 are generated based on the detected motion vector, for example.
  • An interpolated frame Fl at time t + 0.4 and an interpolated frame F2 at time t + 0.8 are shown.
  • FIG. 48 an example of an interpolation frame generated when a motion vector is correctly detected by the vector detection unit 52 of FIG. 17 is shown. That is, the correct true motion vector VI is detected as the motion between the corresponding blocks (block AO and block B0) between the frame t and the frame t + 1. Yo And the image blocks al and a2 on the interpolation frame F2 are correctly generated.
  • the motion vector VI is not always obtained correctly as shown in the example of FIG.
  • the result is calculated as a result of calculation using a calculation block with a small number of effective pixels.
  • Motion vector V2 deviates significantly from the true motion vector VI (ie, the probable motion vector VI detected between the corresponding block AO and block BO) and blocks at both ends of the motion vector V2 (block AO and block B). -2) is not a corresponding block. Therefore, the image blocks bl and b 2 on the interpolation frame F1 and the interpolation frame F2 that are generated using the motion vector V2 are often conspicuous.
  • the detection result force ⁇ vector SO when the number of effective pixels is equal to or smaller than the predetermined threshold value, the detection result force ⁇ vector SO. That is, since the number of effective pixels is small, the motion vector V2 deviates greatly from the true motion vector VI. Therefore, as shown in the example of FIG. 50, the motion vector V2 that is the detection result is changed to the 0 vector SO. To do. As a result, the failure of the image blocks cl and c2 on the inner frame F1 and the interpolation frame F2 generated using the 0 vector SO can be suppressed to the same extent as the interpolation processing when motion compensation is not performed. Relatively stable image blocks cl and c2 are generated.
  • the detection vector of the surrounding blocks is also selected as the initial vector that is the initial offset in the iterative gradient method.
  • the true motion vector VI is detected as the motion between the corresponding blocks (block AO and block B 0) between the frame t and the frame t + 1 (in the case of Fig. 48), Fig. 51
  • the true motion vector VI correctly detected in the block AO that is the left adjacent block may be selected as the initial vector V0.
  • using the detection results of the surrounding blocks as the initial vector means that there is a high correlation between the amount of movement that is likely to be included in the same object as the detection target block. There is an advantage that a motion propagation effect can be obtained, and the convergence of the motion detection process is accelerated.
  • Fig. 51 As shown in the example, in the detection target block A1, the true motion vector VI correctly detected in the block AO that is the left adjacent block may be selected as the initial vector V0.
  • using the detection results of the surrounding blocks as the initial vector means that there is a high correlation between the amount of movement that is likely to be included in the same object as the detection target block.
  • a motion propagation effect can be obtained, and
  • the motion vector V2 that is the detection result is likely to be accurate.
  • the 0 vector SO the motion vector detected in the block AO which is the left adjacent block 1S is easily selected as the initial vector V0.
  • the calculation of the detection target is performed.
  • setting the detection vector to 0 vector has the effect of suppressing the collapse of the image block on the interpolation frame as described above with reference to FIG. Since the certain force S and the initial candidate vector are also zero vectors, the convergence of the motion detection process is slow. That is, when the number of effective pixels is equal to or smaller than a predetermined threshold value, if both the detection vector and the initial candidate vector are set to 0 vectors as in the vector detection unit 52 in FIG. It will occur.
  • the vector detection unit 52 in Fig. 45 performs effective pixel determination using two threshold values in order to suppress this, and the detected motion vector is determined according to the result of the effective pixel determination.
  • Force Switchable according to the application used force used in the allocation process in the subsequent stage, and force used in the vector detection unit 52. That is, when comparing the number of effective pixels in the calculation block of the detection target block with a predetermined threshold value ⁇ , a threshold value j8 (j8 ⁇ ) slightly lower than the predetermined threshold value ⁇ is set.
  • the number of valid pixels immediately before the motion vector is set to the 0 vector
  • the force whose number of effective pixels is equal to or greater than a predetermined threshold value j8 is also determined.
  • the detection vector Ve is set to the 0 vector SO
  • the initial candidate vector Vic is set to the motion vector V2 which is the detection result detected by the gradient method calculation.
  • the motion vector V2 which is the detection result detected by the gradient method calculation, is used as the initial candidate vector Vic, and as shown in the example of FIG.
  • the initial candidate vector Vic (V2) is the initial vector V0
  • the initial vector V0 is a true motion vector compared to the zero vector SO force initial vector V0 (in the example of FIG. 52).
  • the motion vector V 3 obtained by performing the gradient method calculation using the initial vector V0 (motion vector V2) is There is a higher possibility of approaching the true motion vector VI than the initial vector V0.
  • the detection used in the subsequent allocation process even when a true motion vector VI with a small number of effective pixels cannot be obtained yet.
  • the vector Ve is changed to the 0 vector SO, and the motion vector V3, which is the detection result detected by the gradient method calculation, is set as the initial candidate vector Vic.
  • the effective pixel count of the calculation block of block A2 is equal to the predetermined threshold! /, Value ⁇ .
  • the reliability of the gradient method calculation result is improved, and the true motion vector VI may be detected by performing gradient method calculation using the initial vector V0 (motion vector V3) in the detection target block ⁇ 2. Get higher.
  • the correct true motion vector VI is detected as the motion between the corresponding blocks (block ⁇ 2 and block B2) between the frame t and the frame t + 1, and the interpolation frame F1 and the interpolation frame F2 are detected.
  • the above image blocks el and e2 are generated correctly.
  • steps S551 to S558 in FIG. 63 perform the same processing as steps S301 to S308 in FIG. 32, and thus detailed description thereof will be omitted as appropriate.
  • step S551 the selector 401 selects the offset vector Vn-1 and sends the selected offset vector Vn-1 to the memory control signal generation unit 402, the gradient method calculation unit 405, and the evaluation value calculation unit 61B. Output.
  • step S552 the memory control signal generation unit 402 is stored in the memory 403 in accordance with a control signal from a control unit (not shown) of the signal processing device 1 and an offset vector Vn ⁇ 1 from the selector 401.
  • the target pixel value of the operation block to be processed is read out from the frame t of the image at time t and the frame t + 1 of the image at time t + 1, and the read target pixel value is converted into an effective pixel determination unit 531.
  • step S553 When the effective pixel determination unit 531 receives the target pixel value supplied from the memory 403, in step S553, the effective pixel determination process is executed.
  • This effective pixel determination process is the same process as the effective pixel determination process described above with reference to FIG. 33, and a description thereof will be omitted because it will be repeated.
  • the pixel difference between the operation blocks of frame t and frame t + 1 is calculated using the target pixel value supplied from the memory 403 by the effective pixel determination processing in step S553, so that the gradient is added to the operation block.
  • the number of pixels effective for the arithmetic operation is counted by the effective pixel number counter 441. For pixels determined to be valid pixels in the computation block, the horizontal and vertical gradient states are determined, and the number of pixels without horizontal gradient and the number of pixels without vertical gradient are respectively horizontal. It counts in the gradual counter 442 and the vertical gradual counter 443.
  • step S555 executes the gradient method execution determination process.
  • This gradient method execution determination process is the same as the gradient method execution determination process described above with reference to FIG. 35, and will not be described because it will be repeated.
  • the number of effective pixels of the effective pixel number counter 441, the number of pixels having no horizontal gradient of the horizontal gradient non-counter 442, and the vertical gradient of the counter 443 having no vertical gradient are absent.
  • the integrated gradient method calculation processing or the independent gradient method calculation processing is selected according to the determination result.
  • the gradient flag (gladflg) for switching the gradient method calculation processing performed by the gradient method calculation unit 405 is set, and the set gradient flag is output to the gradient method calculation unit 405 and the evaluation determination unit 541. Proceed to step S556.
  • This gradient method calculation processing is the same as the gradient method calculation processing described above with reference to FIG. 36, and the description thereof will be omitted because it will be repeated.
  • the gradient is calculated in the horizontal direction among the effective pixels or the integrated gradient method calculation process using effective pixels according to the gradient flag from the calculation execution determination unit 425. At least one of the horizontal independent gradient method computation processing using a pixel and the vertical independent gradient method computation processing using a pixel having a gradient in the vertical direction is executed and the motion is performed. The vector Vn is obtained, and the obtained motion vector Vn is output to the vector evaluation unit 523, and the process proceeds to step S557.
  • step S557 the vector evaluation unit 523 executes vector evaluation processing.
  • This vector evaluation process is the same as the vector evaluation process described above with reference to FIG. 39, and a description thereof will be omitted because it will be repeated.
  • the evaluation value dfv of the motion vector Vn, the offset vector Vn—1, and the 0 vector is obtained from the gradient method computing unit 405, and based on the gradient flag from the computation execution judging unit 425, Motion vector Vn and offset vector Vn—l
  • the 0 vector evaluation value dfv is compared and modified according to the comparison result to obtain the motion vector V. For example, if the evaluation value dfv of the motion vector Vn and the offset vector Vn— 1 is compared and the reliability of the evaluation value dfv of the motion vector Vn is high, the motion vector Vn becomes the motion vector V and the gradient The number of legal iterations is counted once.
  • the delay unit 406 holds the motion vector V input from the evaluation determination unit 541 until the next processing cycle of the effective pixel determination unit 531 and the gradient method calculation unit 405, and in the next processing cycle, The motion vector V is output to the selector 401. As a result, the process proceeds to step S551, and the subsequent processes are repeated.
  • the evaluation determination unit 541 determines that the gradient flag is other than a flag for executing the integrated gradient method arithmetic processing, or the maximum number of iterations in which the iteration number of the gradient method computation is set (for example, In step S558, it is determined that the gradient method calculation is not repeated (that is, it is terminated), and in step S565, the obtained motion vector V is associated with the detection target block.
  • the detection vector Ve is stored in the detection vector memory 53, and the initial candidate vector Vic is stored in the initial candidate vector memory 524. At this time, the detection vector Ve and its evaluation value dfv are also output to the shifted initial vector allocation unit 105.
  • step S554 determines whether the number of effective pixels is less than the predetermined threshold value ⁇ . determines whether the number of effective pixels is greater than the predetermined threshold value j8. Determine whether.
  • step S559 if the gradient method continuation determination unit 551 determines that the number of effective pixels is greater than the predetermined threshold ⁇ 8, the gradient method calculation is executed, but the detection vector Ve is determined to be a zero vector and the initial value is determined.
  • Counter flag (countflg 10) force gradient method calculation unit 40 that determines candidate vector Vic as motion vector V obtained by gradient method calculation 40 5 and the evaluation determination unit 541, and the process proceeds to step S560.
  • operation execution determination unit 425 executes gradient method execution determination processing in step S560.
  • This gradient method execution determination process is the same as the gradient method execution determination process in step S555 described above, and a description thereof will be omitted because it will be repeated.
  • the number of effective pixels of the effective pixel number counter 441, the number of pixels without the horizontal gradient of the counter 442 of the horizontal gradient, and the vertical gradient of the counter 443 without the vertical gradient are absent.
  • the integrated gradient method calculation processing or the independent gradient method calculation processing is selected according to the determination result.
  • the gradient flag (gladflg) for switching the gradient method calculation processing performed by the gradient method calculation unit 405 is set, and the set gradient flag is output to the gradient method calculation unit 405 and the evaluation determination unit 541. Proceed to step S561.
  • the gradient is calculated in the horizontal direction among the effective pixels or the integrated gradient method calculation process using the effective pixels according to the gradient flag from the calculation execution determination unit 425. At least one of the horizontal independent gradient method computation processing using a pixel and the vertical independent gradient method computation processing using a pixel having a gradient in the vertical direction is executed and the motion is performed. The vector Vn is obtained, the obtained motion vector Vn is output to the evaluation value calculation unit 61B, and the process proceeds to step S562.
  • step S562 the vector evaluation unit 523 executes vector evaluation processing.
  • This vector evaluation process is the same as the vector evaluation process in step S559 described above, and a description thereof will be omitted because it will be repeated.
  • the gradient method computing unit 405 obtains the motion vector Vn, the offset vector Vn—1, and the 0 vector evaluation value dfv, and the computation execution judging unit 425 based on the gradient flag.
  • Motion vector Vn and offset vector Vn—l The 0 vector evaluation value dfv is compared and modified according to the comparison result to obtain the motion vector V.
  • the motion vector Vn is a result of calculation with effective pixels smaller than the predetermined threshold value ⁇ , and a predetermined threshold! / , More than the value a !, and the quality as high as the result calculated with the effective pixel is not expected, so no iteration is performed.
  • the evaluation determination unit 541 determines only the detection vector Ve as 0 vector in step S563, and in step S565, associates it with the detection target block.
  • the vector is stored in the detection vector memory 53 as the detection vector Ve, and the obtained motion vector V is stored in the initial candidate vector memory 524 as the initial candidate vector Vic in correspondence with the detection target block.
  • the detection vector Ve and its evaluation value dfv are also output to the shifted initial vector allocation unit 105.
  • step S554 if it is determined in step S554 that the number of effective pixels is less than the predetermined threshold value j8, the gradient method continuation determination unit 551 causes the gradient method calculation to be terminated, and the detection vector V e and the initial candidate are determined.
  • step S565 the evaluation value determination unit 541 determines the detection target block.
  • the zero vector is stored in the detection vector memory 53 as the detection vector Ve, and is stored in the initial candidate vector memory 524 as the initial candidate vector Vic.
  • the detection vector Ve and its evaluation value dfv are also output to the shift initial vector allocation unit 105.
  • the ratio of the number of effective pixels in the calculation block is determined by using the threshold value j8 which is smaller than the predetermined threshold value ⁇ , not just the predetermined threshold value a, and calculating If the number of effective pixels in the block is greater than the predetermined threshold value j8 which is less than the predetermined threshold value ⁇ , the gradient method calculation result without terminating the gradient method calculation is set as the initial candidate vector, and 0 Since the vector is used as the detection vector, it is possible to improve the convergence speed of the vector detection process based on the gradient method while maintaining the accuracy of the detection vector used in the subsequent allocation process at the same level as before.
  • the predetermined threshold value ⁇ is determined before the predetermined threshold value j8 has been described.
  • the predetermined threshold value 8) may be compared and determined first. it can.
  • the evaluation value determination unit 541 shows a process in which the detection vector Ve and the initial candidate vector Vic are determined based on the values of the counter flag and the gradient flag.
  • the vector obtained by the integrated gradient method operation is referred to as the integrated operation result vector gv
  • the vector obtained by the independent gradient method operation is referred to as the independent operation result vector s gv
  • the detection vector A vector temporarily set as Ve will be described as a temporarily set detection vector tve
  • a vector temporarily set as an initial candidate vector Vic will be described as a temporarily set initial candidate vector tvi.
  • step S601 selector 401 selects offset vector Vn-1, and outputs the selected offset vector to memory control signal generation unit 402, gradient method computing unit 405, and evaluation computing unit 61B.
  • Memory control signal generation section 402 is an image at time t stored in memory 403 in accordance with a control signal from a control section (not shown) of signal processing apparatus 1 and offset vector Vn ⁇ 1 from selector 401.
  • the target pixel value of the operation block to be processed is read out from the frame t and the frame t + 1 of the image at time t + 1.
  • the memory control signal generation unit 402 determines that the target pixel of the calculation block in frame t + 1 is out of the frame. It is determined whether or not.
  • the process proceeds to step S615 in FIG.
  • step S606 the memory control signal generation unit 402 uses the target pixel value of the calculation block read from the memory 403 as the effective pixel. It is supplied to the judgment unit 531 and the gradient method computing unit 405.
  • step S606 the effective pixel determination process is executed.
  • This effective pixel determination process is the same process as the effective pixel determination process described above with reference to FIG. 33, and a description thereof will be omitted because it will be repeated.
  • the pixel difference between the operation blocks of frame t and frame t + 1 is calculated by using the target pixel value supplied from the memory 403 by the effective pixel determination process in step S553, so that the gradient is added to the operation block.
  • the number of pixels effective for the arithmetic operation is counted by the effective pixel number counter 441.
  • the horizontal and vertical gradient states are determined, and the number of pixels without horizontal gradient and the number of pixels without vertical gradient are respectively horizontal. No gradient counter 442 and no vertical gradient power Counted as 443.
  • calculation execution determination unit 425 and the gradient method calculation unit 405 do not perform each process when the value of the counter flag from the gradient method continuation determination unit 424 is 0.
  • the process goes to step S615 in Fig. 65. Proceed to
  • step S610 If it is determined in step S607 that the number of effective pixels is greater than the predetermined threshold value j8, in step S610, the gradient method continuation determination unit 551 determines an equation (14 ) Denominator is 0 or not. If all the effective pixels do not have a horizontal gradient, or if all the effective pixels do not have a horizontal gradient, the denominator of Equation (14) used for the integrated gradient method calculation is zero.
  • the gradient method continuation determination unit 551 refers to the horizontal gradient no-counter 442 and the vertical gradient no-counter 443 in addition to the effective pixel number counter 441, and determines the value of the effective pixel number counter 441 and the horizontal
  • the integrated gradient is determined by determining whether or not the value of the non-gradient counter 442 is the same number and whether or not the value of the effective pixel counter 441 and the vertical gradient non-counter 443 are the same number. It is used for modulo operation to determine whether or not the denominator of equation (14) is zero.
  • step S610 when it is determined that the value of the effective pixel number counter 441 is equal to the value of the horizontal gradient non-counter 442 or the vertical gradient non-counter 443, the integrated type It is determined that the denominator of the equation (14) used for the gradient method calculation is 0, and the gradient method continuation determination unit 551 sets the counter flag value to 2 in step S611, and cancels the gradient method calculation.
  • the gradient method computing unit 405 and the evaluation determining unit 541 execute gradient method computation and provisional setting processing in step S614.
  • This gradient method calculation and provisional setting processing will be described with reference to the flowchart of FIG.
  • the effective pixel determination unit 471 controls each unit of the gradient method calculation unit 405 in step S631, and performs integrated gradient method calculation. Execute the process. Since this integrated gradient method computing process has been described above with reference to the flowchart of FIG. 37, its description is omitted.
  • step S631 By the integrated gradient method calculation processing in step S631, effective pixels are subject to gradient method calculation.
  • the pixel difference ⁇ in the horizontal direction of the effective pixels, the pixel difference Ay in the vertical direction, and the pixel difference ⁇ t in the time direction are accumulated, and the accumulated gradient and the least square sum of Equation (14) are used.
  • the integrated operation result vector gv is obtained and output to the vector calculation unit 464.
  • step S632 the vector calculation unit 464 adds the integrated calculation result vector gv obtained by the integrated gradient calculation unit 463-1 to the offset vector Vn-1 from the selector 401, The result is output to the vector evaluation unit 104.
  • step S633 the effective pixel determination unit 471 controls each unit of the gradient method calculation unit 405 to execute horizontal independent gradient method calculation processing. Since this independent gradient method calculation process has been described above with reference to the flowchart of FIG. 38, the description thereof will be omitted.
  • step S633 By the independent gradient method calculation process in the horizontal direction in step S633, the pixels having the gradient in the horizontal direction among the effective pixels are subjected to the gradient method calculation, and the horizontal pixel difference ⁇ , And the pixel difference At in the time direction are integrated, and the horizontal component (sgv.x) of the independent operation result vector sgv is obtained using the integrated gradient and Equation (23), and the beta calculation unit Is output to 464.
  • step S634 the effective pixel determination unit 471 controls each unit of the gradient method calculation unit 405, and executes vertical independent gradient method calculation processing. This independent gradient method computation processing has been described above with reference to the flowchart in FIG.
  • step S634 pixels having a gradient in the vertical direction among the effective pixels are subjected to the gradient method computation, and the pixel difference ⁇ in the vertical direction of the effective pixels and The pixel difference At in the time direction is accumulated, and the vertical component (sgv.y) of the independent operation result vector sgv is obtained using the accumulated gradient and equation (23). Is output.
  • the vector calculation unit 464 receives at least one of the horizontal direction component and the vertical direction component of the independent calculation result vector sgv from the independent gradient calculation unit 463-2.
  • the vector calculation unit 464 was obtained by the target direction component (at least one of the horizontal direction component and the vertical direction component) of the offset vector Vn-1 from the selector 401 and the independent gradient calculation unit 463-2.
  • the target direction component of the independent operation result vector sgv is added and output to the vector evaluation unit 104.
  • the direction component that is not input from the independent gradient calculation unit 463-2 is a zero vector.
  • temporary setting initial candidate vector tvi is temporarily added to the value obtained by adding integrated operation result vector gv to offset vector Vn—1.
  • the horizontal component of the temporary initial candidate vector: tv ix Vn-lx + gv.x
  • the vertical component of the temporary initial candidate vector: tvi.y Vn-ly + gv.y).
  • the calculation execution determination unit 425 outputs the gradient method execution determination processing in step S639.
  • This gradient method execution determination process is the same process as the gradient method execution determination process described above with reference to FIG. 35, and the description thereof will be omitted.
  • step S639 By the gradient method execution determination process in step S639, the number of effective pixels of the effective pixel counter 441, the number of pixels without the horizontal gradient of the horizontal gradient counter 442, and the vertical gradient of the vertical gradient non-counter 443 are absent. With reference to the number of pixels, it is determined whether the number of one-sided gradient pixels in the effective pixel is large or not, and the integrated gradient method calculation processing or the independent gradient method calculation processing is selected according to the determination result.
  • the gradient flag (gladflg) for switching the gradient method calculation processing performed by the gradient method calculation unit 405 is set, and the set gradient flag is output to the gradient method calculation unit 405 and the evaluation determination unit 541. Proceed to step S640.
  • horizontal component of temporary initial candidate vector: tvix Vn-lx + sgv.x
  • vertical component of temporary initial candidate vector: tvi. y 0.0 is temporarily set.
  • step S615 the evaluation determination unit 541 determines the limit of each temporarily set vector (the temporarily set detection vector tve and the temporarily set initial candidate vector tvi). If it is determined that the value of each vector does not exceed the predetermined vector value, it is left as the temporarily set vector, but if it is determined that the value exceeds the predetermined vector value, 0 It is assumed to be a vector.
  • step S616 the evaluation determination unit 541 performs vector evaluation processing of the temporary setting detection vector tve and the temporary setting initial candidate vector tvi based on the value of the counter flag and the value of the gradient flag.
  • the evaluation determining unit 541 evaluates the offset vector Vn ⁇ 1, 0 vector, the temporary setting detection vector tve, and the temporary setting initial candidate vector tvi according to the value of the counter flag and the value of the gradient flag.
  • the evaluation value dfv of the temporary detection vector tve, the offset vector Vn the evaluation value dfv of 1, or the evaluation value dfv of the zero vector, the evaluation value dfv of the temporary initial candidate vector tvi, and the offset vector Vn —
  • the evaluation value of 1 dfv or the evaluation value of the 0 vector dfv is compared, and the evaluation value dfv is a small value (ie, high reliability). Update (change) the vector tvi.
  • step S617 the evaluation determination unit 541 determines whether or not it is possible to end the gradient method calculation based on the value of the counter flag, the value of the gradient flag, and the number of iterations. If the value of the counter flag is 1 and the value of the gradient flag does not exceed the specified number of iterations, it is determined in step S617 that the iteration is to be performed, and the processing returns to step S601 in FIG. 64, and the subsequent processing. repeat.
  • the evaluation determination unit 541 supplies the temporary setting detection vector tve updated based on the vector evaluation result of step S616 to the delay unit 406.
  • the evaluation determination unit 541 determines the detection vector Ve as the provisional detection vector tve in step S618, and uses the determined detection vector Ve as the detection target block. Is stored in the detection vector memory 53, and the initial candidate vector Vic is determined as the provisional initial candidate vector tvi. The initial candidate vector Vic is stored in the initial candidate vector memory 524 in association with the detection target block.
  • Fig. 67 shows a comparison target of vector evaluation for each flag value and an iterative determination result.
  • the gradient flag is set only when the value of the counter flag is “1”.
  • step S616 When the value of the counter flag is "1" and the gradient flag is "1", the comparison target in the vector evaluation in step S616 is "0 vector", and the iterative determination in step S617 is "No" Determined.
  • step S616 When the value of the counter flag is “1” and the gradient flag is “2”, the comparison target in the vector evaluation in step S616 is “0 vector”, and the iterative determination in step S617 is “No”. Determined.
  • step S616 When the counter flag value is "1" and the gradient flag is "4", the comparison target in the vector evaluation in step S616 is "offset vector (Vn—1)", and the repeat determination in step S617 is Determined to be “comparison result dependent”. That is, if the predetermined number of iterations is not satisfied, a vector corresponding to the comparison result is repeated as an offset vector.
  • step S616 the value of the counter flag “l” and the gradient flag “0” are not shown, but as in the case of the gradient flag “1, 2, 3”.
  • the comparison target in the vector evaluation in step S616 is “0 vector”, and the iterative determination in step S617 is determined as “no”.
  • both the integrated gradient method calculation and the independent gradient method calculation are performed as necessary, and the detection vector and the initial candidate vector are provisionally set based on the counter flag. Based on the flag and the gradient flag, it is possible to finally determine the detection vector and the initial candidate vector.
  • the initial candidate vector memory 524 is added separately from the detection vector memory 53 in order to hold the detection vector and the initial candidate vector as different vectors. It is structured as a key. Therefore, when compared with the vector detection unit 52 in FIG. 17, the amount of memory in the vector detection unit 52 in FIG. 45 is doubled. Therefore, a configuration example in which the detection vector and the initial candidate vector without adding the initial candidate vector memory 524 are held as different vectors will be described with reference to FIG.
  • FIG. 68 is a block diagram showing another configuration example of the vector detection unit 52 in FIG.
  • the vector detection unit 52 of FIG. 68 includes prefilters 102-1 and 102-2, a shifted initial beta allocation unit 105, an evaluation value memory 106, a shifted initial vector memory 107, and an iterative gradient method computing unit 522.
  • Point force provided Force common to vector detection unit 52 in FIG. 17 Initial vector selection unit 521 is replaced with initial vector selection unit 101 in FIG. 17, vector evaluation unit 523 is replaced with vector evaluation unit 561, and initial point The difference from the vector detection unit 52 of FIG. 45 is that the candidate vector memory 524 is removed.
  • the detection vector memory 53 of FIG. 68 includes a 0 vector flag area 571 in which the vector evaluation unit 561 writes a 1-bit zero vector flag (zflg) to one block to be detected.
  • the vector evaluation unit 561 includes an evaluation value calculation unit 61B.
  • the evaluation value calculation unit 61B includes the motion vector Vn-1 (or the initial vector VO) from the iterative gradient method calculation unit 522 and the motion.
  • the evaluation value dfv of the vector Vn is obtained, the iterative gradient method calculation unit 522 is controlled based on the evaluation value dfv obtained by the evaluation value calculation unit 61B, and the gradient method calculation is repeatedly executed.
  • a highly reliable one based on the evaluation value dfv is selected.
  • the vector evaluation unit 56 moves the motion vector Vn—1 (or the initial vector VO), the motion vector Vn, or the 0 vector from the iterative gradient method calculation unit 522.
  • the detection vector Ve used for the allocation process in the subsequent stage and the initial vector selection unit 101 at the time of initial vector selection is obtained.
  • the vector evaluation unit 561 sets the 0 vector flag to 0 and detects the detection vector Ve when the detection vector Ve and the initial candidate vector Vic are the same.
  • the vector evaluation unit 561 determines that the detection vector Ve and the initial candidate vector Vic are different according to the counter flag from the iterative gradient method calculation unit 522 (that is, when the detection vector Ve is a 0 vector).
  • the vector allocating unit 54 in the subsequent stage reads the detection vector from the detection vector memory 53 based on the 0 vector flag. That is, when the 0 vector flag is 0, the vector allocating unit 54 reads the detection vector from the position of the corresponding block in the detection vector memory 53. When the 0 vector flag is 1, the corresponding block in the detection vector memory 53 The detection vector is not read from the position of, and the 0 vector is used as the detection vector.
  • the initial vector selection unit 101 reads the initial candidate vector from the position of the corresponding block in the detection vector memory 53, as in the case of the detection vector 53 in FIG. That is, the 0 vector flag can be said to be a flag necessary for the vector allocating unit 54 to read the detection vector.
  • FIG. 69 is a block diagram showing the configuration of the iterative gradient method computing unit 522 and the vector evaluation unit 561.
  • the vector evaluation unit 561 in FIG. 69 includes the evaluation value calculation unit 61B in that the force evaluation determination unit 541 in common with the vector evaluation unit 523 in FIG. 46 is replaced with the evaluation determination unit 581 in FIG. Unlike the vector evaluation part 523!
  • the evaluation value determination unit 581 determines whether or not it is possible to repeat the gradient method calculation process, and the detection value Ve Find the initial candidate vectors Vic.
  • the evaluation value determination unit 581 selects a highly reliable one and obtains the motion vector V by comparing the evaluation value dfv calculated by the evaluation value calculation unit 61B as necessary. .
  • the evaluation value determination unit 581 stores the obtained motion vector V in the detection vector memory 53 as the detection vector Ve or the initial candidate vector Vic according to the value of the counter flag. , 0 vector flag is stored. That is, when the value of the counter flag from the effective pixel determination unit 531 is 1 (when the number of effective pixels is larger than the predetermined threshold value ex), the detection vector Ve and the initial candidate vector Vic are the same. Is a vector.
  • the detection vector Ve and the initial candidate vector Vic are , The same vector (ie 0 vector).
  • the vector Ve is a 0 vector, which is a different vector from the initial candidate vector Vic.
  • the evaluation value determination unit 581 stores both the initial vector selection unit 101 and the vector allocation unit 54 in the detection vector memory 53.
  • the detection vector memory 53 can be expanded by adding the 0 vector flag area to 1 block by 1 bit. The same effect can be expected as when the memory for the initial candidate vector Vic is provided.
  • FIG. 70 shows another example of the process of storing the detection vector and the initial candidate vector in step S565 of FIG. That is, the gradient method calculation processing of the vector detection unit 52 in FIG. 68 is different only in the storage control processing of the detection vector and the initial candidate vector by the evaluation value determination unit 581 in step S565.
  • the processing is basically the same as the gradient method calculation processing of the vector detection unit 52 of FIG. 45 described above with reference to 63, and the description thereof is omitted.
  • step S660 the evaluation determination unit 581 determines whether the value of the counter flag from the effective pixel determination unit 531 is 10 or not.
  • the detection vector memory 53 is simply expanded by 1 bit for the 0 vector flag area by 1 block. Thus, the same effect as when the memory for the initial candidate vector Vic is provided can be expected.
  • the ratio of the number of effective pixels in the calculation block is determined by using only a predetermined threshold !, a value ex, and a threshold j8 that is smaller than the predetermined threshold ⁇ . If the number of effective pixels is less than the predetermined threshold, less than the value oc, and more powerful than the value ⁇ , the gradient method calculation result without terminating the gradient method calculation is set as the initial candidate vector, As a result, the convergence speed of the vector detection process by gradient method calculation can be improved while maintaining the accuracy of the detection vector used in the subsequent allocation process at the same level as before.
  • FIG. 71 is a block diagram showing the configuration of the vector assignment unit 54.
  • the vector allocating unit 54 having the configuration shown in FIG. 71 uses a frame t of an image at time t to which a 24 ⁇ signal is input and a frame t + 1 of an image at time t + 1 to detect a motion vector detected on the frame t. Is assigned to the pixel on the interpolation frame of the 60P signal to be interpolated on the allocation vector memory 55.
  • the frame t of the image at time t and the frame t + 1 of the image at time t + 1 are the pixel information calculation unit 701, the evaluation value calculation unit 61 described above with reference to FIG. This is input to the target pixel difference calculation unit 703.
  • the pixel information calculation unit 701 acquires the motion vector detected in the pixel on the frame t in the detection vector memory 53 in the raster scan order from the upper left pixel, and acquires the acquired motion vector in the frame t + of the next time. Extend in one direction and calculate the intersection of the extended motion vector and the interpolated frame. The pixel information calculation unit 701 then calculates the motion vector and the interpolation block. From the intersection with the frame, a pixel to which the motion vector is to be allocated (hereinafter referred to as the allocation target pixel) is set on the interpolated frame, and the information on the position of the motion vector and the allocation target pixel is set to the vector selection unit 705. Output to.
  • the allocation target pixel a pixel to which the motion vector is to be allocated
  • the image information calculation unit 701 calculates the position P of the frame t and the position Q on the frame t + 1 associated with the allocation target pixel by the motion vector, and the calculated position information on the frame t and the frame t + 1 Is output to the evaluation value calculation unit 61 and the target pixel difference calculation unit 703.
  • the evaluation value calculation unit 61 receives the position information on the frame t and the frame t + 1 associated with the allocation target pixel and the motion vector from the pixel information calculation unit 701, and then receives the position P and the frame t + of the frame t. In order to calculate the evaluation value DFD of position Q of 1, set a certain range of DFD calculation range (m X n) centered on position P and position Q, and the force that these DFD calculation ranges are within the image frame. Determine whether or not. When the evaluation value calculation unit 61 determines that the DFD calculation range is within the image frame, the evaluation value calculation unit 61 calculates the evaluation value DFD of the allocation target pixel for the motion vector by calculating using the DFD calculation range. The evaluation value DFD is output to the vector evaluation unit 704.
  • the pixel-of-interest calculation unit 703 receives the position information on the frame t and the frame t + 1 associated with the allocation target pixel and the motion vector from the pixel information calculation unit 701, and receives the position P of the frame t. Then, using the position Q of frame t + 1, the luminance difference absolute value for the allocation target pixel is obtained, and the obtained luminance difference absolute value is output to the vector evaluation unit 704.
  • the vector evaluation unit 704 includes a pixel difference determination unit 711 and an evaluation value determination unit 712.
  • the pixel difference determination unit 711 determines whether the luminance difference absolute value for the allocation target pixel input from the target pixel difference calculation unit 703 is smaller than a predetermined threshold value.
  • the evaluation value determination unit 712 calculates the evaluation value when the pixel difference determination unit 711 determines that the luminance difference absolute value for the allocation target pixel input from the target pixel difference calculation unit 703 is smaller than a predetermined threshold value. It is determined whether or not the evaluation value DFD of the allocation target pixel input from the unit 61 is smaller than the minimum evaluation value of the DFD table included in the vector selection unit 705.
  • the evaluation value determination unit 712 determines that the evaluation value DFD of the allocation target pixel is smaller than the minimum evaluation value in the DFD table! / ⁇ , the reliability of the motion vector corresponding to the allocation target pixel is high.
  • the evaluation value DFD of the pixel to be allocated is output to the vector selection unit 705.
  • the vector selection unit 705 has a DFD table that holds the minimum evaluation value of each pixel on the interpolation frame, and assigns a 0 vector to each pixel on the interpolation frame.
  • the evaluation value DFDO is stored in advance in the DFD table as the minimum evaluation value for each pixel on the interpolation frame.
  • the vector selection unit 705 receives the evaluation value DFD of the allocation target pixel from the vector evaluation unit 704, the vector selection unit 705 sets the flag of the allocation flag memory 56 to l (based on the position information of the allocation target pixel from the pixel information calculation unit 701. Rewrite to true) and rewrite the minimum evaluation value in the DFD table of the pixel to be assigned to the evaluation value DFD of the pixel to be assigned. Further, the vector selection unit 705 allocates the motion vector from the pixel information calculation unit 701 to the allocation target pixel in the allocation vector memory 55 based on the position information of the allocation target pixel from the pixel information calculation unit 701.
  • the pixel information calculation unit 701 uses the detection vector memory 53 of the example of FIG. When acquiring a motion vector, the motion vector (detection vector) detected at the pixel on frame t, depending on the value of the 0-bit flag written corresponding to the pixel on frame t, or Get a 0 vector.
  • FIG. 72 is a diagram showing the concept of the four-point interpolation process of the present invention.
  • the arrow X force indicates the horizontal direction in the frame t + 1
  • the arrow Y indicates the vertical direction in the frame t + 1.
  • a white circle represents a pixel position on the frame t + 1
  • a black dot represents a (granularity) position below the pixel.
  • the black dot p + v on the upper left and the four surrounding pixels on frame t + 1 are shown enlarged in window E.
  • the alphabets in white circles indicate the luminance values of the surrounding four pixels.
  • the luminance value F (p + v) is expressed by the following equation (31).
  • the DFD evaluation is performed using the luminance value F (p + v) obtained by the 4-point interpolation process.
  • the frame t of the image at time t and the frame t + 1 of the image at time t + 1, which are the original frames of the P signal, are a pixel information calculation unit 701, an evaluation value calculation unit 61, and a target pixel difference calculation unit 703. Is input.
  • the pixel information calculation unit 701 controls the vector selection unit 705 to initialize the allocation flag in the allocation flag memory 56 with O (False) in step S701, and in step S702.
  • the allocation vector memory 55 is initialized with the 0 vector. As a result, a zero vector is assigned to a pixel to which no motion vector is assigned.
  • the pixel information calculation unit 701 controls the evaluation value calculation unit 61 to calculate the evaluation value DFD0 using the 0 vector for all the pixels on the interpolation frame.
  • the selection unit 705 is controlled to store the evaluation value DFD0 of the 0 vector calculated by the evaluation value calculation unit 61 in the DFD table as the minimum evaluation value for each pixel of the interpolation frame. That is, in step S703, the evaluation value calculation unit 61 calculates the evaluation value DFD0 using the 0 vector for all the pixels of the interpolation frame, and the calculated evaluation value DFD0 is passed through the vector evaluation unit 704. To the vector selection unit 705. Then, the vector selection unit 705 stores the evaluation value DFD0 input via the vector evaluation unit 704 as the minimum evaluation value of the corresponding pixel in the DFD table.
  • the pixel information calculation unit 701 selects a pixel from the original frame on the detection vector memory 53 in step S704. In this case, the pixels are selected in the raster scan order from the upper left of the frame.
  • step S705 the pixel information calculation unit 701 executes pixel position calculation processing.
  • the pixel information calculation unit 701 calculates the intersection of the acquired motion vector and the interpolation frame, and sets the allocation target pixel from the intersection of the motion vector and the interpolation frame force. At this time, if the intersection point coincides with the pixel position on the interpolation frame, the pixel information calculation unit 701 sets the intersection point as an allocation target pixel. On the other hand, when the intersection does not coincide with the pixel position on the interpolation frame, the pixel information calculation unit 701 sets the four pixels near the intersection on the interpolation frame as allocation target pixels as described above.
  • the pixel information calculation unit 701 was acquired based on each allocation target pixel, which is necessary for the evaluation value calculation unit 61 and the target pixel difference calculation unit 703 to obtain the evaluation DFD and the luminance difference absolute value.
  • the position of the original frame associated with the motion vector is shifted (translated) from the acquired motion vector to the set target pixel, and the shifted motion vector And calculating the position of the intersection on the original frame.
  • step S706 the pixel information calculation unit 701 selects the calculated allocation target pixel, and outputs the selected allocation target pixel and its motion vector to the vector selection unit 705. Based on the selected allocation target pixel, the information calculation unit 701 outputs information on the position on the original frame associated with the motion vector to the evaluation value calculation unit 61 and the target pixel calculation unit 703. In step S706, when there are a plurality of allocation target pixels, the pixel information calculation unit 701 selects from the upper left pixels.
  • step S707 the pixel information calculation unit 701 executes an allocation vector evaluation process for the selected allocation target pixel. Details of the allocation vector evaluation process will be described later with reference to FIG. 74.
  • the motion vector evaluation value DFD and the luminance difference absolute value in the allocation target pixel are obtained, and the motion in the allocation target pixel is determined.
  • the reliability of the vector is determined, and the motion vector in the allocation vector memory 55 is rewritten with the motion vector determined to have high reliability as a result of these determinations.
  • step S708 the pixel information calculation unit 701 determines whether or not the processing has been completed for all the allocation target pixels. If it is determined in step S708 that the processing of all allocation target pixels has not been completed yet, the processing returns to step S706, the next allocation target pixel is selected, and the subsequent processing is repeated. It is.
  • step S708 If it is determined in step S708 that the processing of all the allocation target pixels has been completed, the pixel information calculation unit 701 performs the processing of all the pixels of the original frame on the detection vector memory 53 in step S709. It is determined whether or not it has been completed. If it is determined in step S709 that the processing of all pixels of the original frame on the detection vector memory 53 has not been completed, the process returns to step S704, and the next frame of the original frame on the detection vector memory 53 is detected. A pixel is selected, and the subsequent processing is repeated. If it is determined in step S709 that the processing for all the pixels in the detection vector memory 53 has been completed, the vector allocation processing is ended.
  • FIG. 74 shows an example of the allocation vector evaluation process in step S707 of FIG.
  • step S706 of FIG. 73 the pixel information calculation unit 701 obtains the position on the original frame associated with the motion vector on the basis of the selected allocation target pixel, and on the obtained original frame. Is input to the evaluation value calculation unit 61 and the target pixel difference calculation unit 703.
  • the evaluation value calculation unit 61 obtains the motion vector evaluation value D FD in the allocation target pixel in step S741.
  • DFD calculation range (m X n) centering on the position on frame t and frame t + 1 is obtained, and in step S742, it is determined whether or not the obtained DFD calculation range is within the image frame. .
  • step S742 If it is determined in step S742 that the DFD calculation range is out of the image frame, the motion vector is determined not to be an allocation candidate vector to be allocated to the allocation target pixel, and the processing in steps S743 to S749 is performed. Are skipped, the allocation vector evaluation process is terminated, and the process returns to step S708 in FIG. For this reason, if the DFD calculation range centering on the point P on the frame t and the point Q on the frame t + 1 is out of the image frame, the movement margin is excluded from the candidates.
  • step S742 when it is determined that the obtained DFD calculation range is within the image frame, the evaluation value calculation unit 61 determines the DFD calculation range determined to be within the image frame in step S743. Then, the evaluation value DFD of the allocation target pixel is calculated, and the obtained evaluation value DFD is output to the evaluation value determination unit 712. At this time, if the position on the original frame is less than or equal to the pixel, the luminance value of the intersection on the original frame is obtained using the above-described four-point interpolation, so that the evaluation value of the allocation target pixel is calculated. DFD is calculated.
  • the target pixel difference calculation unit 703 obtains the absolute value dp of the luminance difference in the allocation target pixel in step S744.
  • the obtained luminance difference absolute value dp is output to the pixel difference determination unit 711.
  • the pixel-of-interest difference calculation unit 703 obtains the luminance value of the intersection on the original frame using the above-described four-point interpolation.
  • the luminance difference absolute value dp in the allocation target pixel is calculated.
  • the pixel difference determination unit 711 determines whether the luminance difference absolute value dp of the pixel to be allocated from the target pixel difference calculation unit 703 is equal to or less than a predetermined threshold! /. .
  • step S745 If it is determined in step S745 that the luminance difference absolute value dp of the pixel to be allocated is larger than a predetermined threshold value, it is determined that the intersection of frame t and frame t + 1 is likely to belong to different objects. That is, the motion vector is determined not to be an allocation candidate vector to be allocated to an allocation target pixel with low reliability in the allocation target pixel, and the process skips steps S746 to S749 and ends the allocation vector evaluation process. Then, return to step S708 in FIG.
  • step S745 when it is determined that the luminance difference absolute value dp of the allocation target pixel is equal to or smaller than the predetermined threshold value, the process proceeds to step S746.
  • the evaluation value determination unit 712 refers to the DFD table of the vector selection unit 705, and the evaluation value DFD of the pixel to be allocated from the evaluation value calculation unit 61 is stored in the DFD table. It is determined whether or not the pixel is smaller than the minimum evaluation value (in this case, evaluation value DFDO of 0 vector).
  • step S746 when it is determined that the evaluation value DFD of the allocation target pixel from the evaluation value calculation unit 61 is equal to or greater than the minimum evaluation value of the allocation target pixel stored in the DFD table, the motion vector is In the pixel to be allocated, it is determined that the reliability is not high, the processing in steps S747 to S749 is skipped, the allocation vector evaluation processing is terminated, and the processing returns to step S708 in FIG.
  • step S746 the evaluation value DFD of the allocation target pixel from the evaluation value calculation unit 61 is stored in the DFD table, and is determined to be smaller than the minimum evaluation value of the allocation target pixel!
  • the evaluation value determination unit 712 determines that the motion vector has the highest reliability based on the evaluation value DFD among the motion vectors compared so far in the allocation target pixel, and the reliability is high.
  • the evaluation value DFD of the determined allocation target pixel is output to the vector selection unit 705.
  • the vector selection unit 705 receives the evaluation value DFD of the allocation target pixel from the evaluation value determination unit 712.
  • step S747 the allocation flag of the allocation target pixel in the allocation flag memory 56 is rewritten to l (True) in step S747.
  • step S748 the minimum evaluation value corresponding to the allocation target pixel in the DFD table is changed to the evaluation value determination unit 712. Rewrite the evaluation value DFD determined to be high by
  • step S749 the vector selection unit 705 assigns the motion vector assigned to the pixel to be assigned in the assignment vector memory 55 to the motion vector corresponding to the evaluation value DFD determined to have high reliability. rewrite. Thereby, the allocation vector evaluation process is terminated, and the process returns to step S708 of FIG.
  • the motion vector when selecting a motion vector to be allocated to the pixel to be allocated in the interpolation frame, the motion vector is mapped to the position on the original frame that is associated with the motion vector based on the pixel to be allocated only by the evaluation value DFD. Since the absolute value of the luminance difference of the pixel to be allocated, which is obtained based on this, is treated separately and evaluated, it is most probable from among the allocation candidate vectors than when only the conventional evaluation value DFD is used. A motion vector can be selected and assigned to the target pixel. As a result, the accuracy of vector assignment is improved, the discontinuity of the generated image can be suppressed in the subsequent image interpolation processing, and the quality of the image can be improved.
  • FIG. 75 is a block diagram showing the configuration of the allocation compensator 57.
  • the allocation compensator 57 whose configuration is shown in FIG. 75 includes an allocated vector determination unit 801 and a vector compensation unit 802. It performs the process of assigning the motion vectors of the surrounding pixels to the pixels on the interpolation frame of the 60P signal, to which the motion vector is not assigned by the tuttle assignment unit 54.
  • the motion vector is allocated to the pixel of the interpolation frame on the allocation vector memory 55 by the vector allocation unit 54 in the previous stage. Also, l (True) is written in the allocation flag of the pixel allocation flag memory 56 to which the motion vector is allocated by the vector allocation unit 54, and the pixel allocation flag memory 56 of the powerful pixel to which the motion vector is not allocated is written. O (False) is written in the allocation flag.
  • the allocation vector determination unit 801 refers to the allocation flag in the allocation flag memory 56 and determines whether or not a motion vector is allocated to the pixel of interest by the vector allocation unit 54. Then, the allocation vector determination unit 801 selects a target pixel to which a motion vector is not allocated by the vector allocation unit 54, controls the vector compensation unit 802 for the selected target pixel, and The motion vector of the peripheral pixel of the target pixel is selected and allocated on the interpolation frame of the allocation vector memory 55.
  • the vector compensation unit 802 includes a compensation processing unit 811 and the evaluation value calculation unit 61 described above with reference to FIG.
  • the compensation processing unit 811 has a memory 821 that stores the minimum evaluation value DFD and the motion vector of the minimum evaluation value DFD as candidate vectors (hereinafter also referred to as compensation candidate vectors), and an allocation vector determination unit 801 As the initial value of the pixel of interest selected by the above, the zero vector evaluation value DFD is stored in the memory 821 as the minimum evaluation value, and the zero vector is stored in the memory 821 as a compensation candidate vector.
  • the compensation processing unit 811 refers to the allocation flag memory 56, determines the presence / absence of motion vectors of the peripheral pixels of the pixel of interest, acquires the motion vectors allocated to the peripheral pixels from the allocation vector memory 55, and evaluates them.
  • the value calculation unit 61 is controlled to calculate the motion vector evaluation value DFD.
  • the compensation processing unit 811 determines whether the evaluation value DFD calculated by the evaluation value calculation unit 61 is stored in the memory 821, and is smaller than the minimum evaluation value! When it is determined that the calculated evaluation value DF D is smaller than the minimum evaluation value, the compensation candidate vector and the minimum evaluation value in the memory 821 are rewritten to the calculated evaluation value DFD and its motion vector, and finally the evaluation value D Focus on the motion vectors (compensation candidate vectors) of the surrounding pixels for which the FD was determined to be the smallest. The motion vector of the pixel is allocated to the pixel of interest in the allocation vector memory 55. Further, the compensation processing unit 811 rewrites the allocation flag of the allocation flag memory 56 of the target pixel to which the motion vector is allocated to l (True).
  • the evaluation value calculator 61 Upon obtaining the motion vectors of the surrounding pixels from the allocation vector memory 55, the evaluation value calculator 61 receives the frame t of the 24P signal image at time t and the frame t + 1 of the image at time t + 1. Is used to calculate the evaluation value DFD of the motion vector from the allocation vector memory 55 and output the calculated evaluation value DFD to the compensation processing unit 811.
  • the motion vector is allocated to the pixel of the interpolation frame on the allocation vector memory 55 by the vector allocation unit 54 in the previous stage.
  • l (True) is written in the allocation flag of the pixel allocation flag memory 56 to which the motion vector is allocated by the vector allocation unit 54, and the pixel allocation flag memory 56 to which the motion vector is not allocated is assigned.
  • 0 (Fals e) is written in the allocation flag.
  • step S801 the allocation vector determination unit 801 selects a pixel in the inner frame of the allocation flag memory 56 as a target pixel. At this time, the allocation vector determination unit 801 selects pixels from the upper left pixel of the frame in the raster scan order.
  • step S802 the allocation vector determination unit 801 determines whether or not the allocation flag force O (False) of the pixel of interest in the allocation flag memory 56 is a force, and allocates the allocation flag of the pixel of interest in the allocation flag memory 56. If it is determined that the force is O (False), it is determined that no motion vector is allocated, and in step S803, the compensation processing unit 811 is controlled to execute vector compensation processing. The details of this vector compensation processing will be described later with reference to FIG. 77. By this vector compensation processing, among the motion vectors assigned to surrounding pixels, the smallest motion vector of the evaluation value DFD is used as a compensation candidate vector. Stored in memory 821.
  • step S804 the compensation processing unit 811 allocates the compensation candidate vector in the memory 821 as the motion vector of the target pixel to the allocation vector memory 55, and in step S805, allocates the target pixel in the allocation flag memory 56. Rewrite the flag to l (True).
  • step S802 determines whether the allocation flag of the target pixel in the allocation flag memory 56 is l (True) or a motion vector has already been allocated to the target pixel. Therefore, the processing skips steps S803 to S805 and proceeds to step S806.
  • Allocation vector determination unit 801 determines whether or not the processing of all pixels in the inner frame of allocation flag memory 56 has been completed in step S806. If it is determined in step S806 that the processing of all the pixels has not been completed, the processing returns to step S801, is selected as the pixel of interest for the next pixel in the interpolated frame of the allocation flag memory 56, and thereafter. Processing is executed. If it is determined in step S806 that the processing of all the pixels in the interpolation frame in the allocation flag memory 56 has been completed, the allocation compensation processing is terminated.
  • FIG. 77 shows an example of the vector compensation process in step S803 of FIG.
  • step S821 the compensation processing unit 811 controls the evaluation value calculation unit 61 to calculate the evaluation value DFDO using a zero value. Specifically, the evaluation value calculation unit 61 uses the frame t of the image at time t and the frame t + 1 of the image at time t + 1 in step S821, for example, with reference to FIG. As described above, for the pixel of interest, the evaluation value DFDO at 0 is calculated, and the calculated evaluation value DFDO is output to the compensation processing unit 811.
  • step S822 the compensation processing unit 811 stores the evaluation value DFDO as a minimum evaluation value in the memory 821, and in step S823, stores the 0 vector as a compensation candidate vector in the memory 821.
  • step S824 the compensation processing unit 811 selects one peripheral pixel among the eight peripheral pixels of the pixel of interest selected by the assigned vector determination unit 801. At this time, the compensation processing unit 811 selects the peripheral pixels in the raster scan order for the pixel power at the upper left among the eight peripheral pixels.
  • step S825 the compensation processing unit 811 refers to the allocation flag memory 56, and determines whether or not the motion vector of the selected peripheral pixel exists. If the allocation flag of the peripheral pixels in the allocation flag memory 56 is l (True), it is determined in step S825 that there is a motion vector allocated to the selected peripheral pixel, and the process proceeds to step S826, where compensation processing is performed.
  • the unit 811 extracts the motion vectors of the surrounding pixels from the allocated vector memory 55. To get. At this time, the motion vector of peripheral pixels is also output from the allocation vector memory 55 to the evaluation value calculation unit 61.
  • the evaluation value calculation unit 61 receives the input frame t of the image at time t and the frame of the image at time t + 1 in step S827. Using t + 1, the motion vector evaluation value DFD from the allocation vector memory 55 is calculated for the pixel of interest, and the calculated evaluation value DFD is output to the compensation processing unit 811.
  • the compensation processing unit 811 When the evaluation value DFD is input from the evaluation value calculation unit 61, the compensation processing unit 811 is smaller than the minimum evaluation value of the pixel of interest stored in the evaluation value DFD force memory 821 in step S828. Determine whether or not. If it is determined in step S828 that the evaluation value is smaller than the minimum evaluation value of the target pixel stored in the DFD force memory 821, the compensation processing unit 811 determines that the minimum evaluation value in the memory 821 is in step S829. Is rewritten to the evaluation value DFD determined to be smaller than the minimum evaluation value, and in step S830, the compensation candidate vector in the memory 821 is rewritten to the motion vector of the minimum evaluation value.
  • step S825 if the allocation flag of the peripheral pixel in the allocation flag memory 56 is 0 (false) in step S825, it is determined that there is no motion vector allocated to the selected peripheral pixel, and steps S826 to S830 are performed. This process is skipped, and the process proceeds to step S831. If it is determined in step S828 that the evaluation value is greater than or equal to the minimum evaluation value of the pixel of interest stored in the DFD force memory 821, the processing in steps S829 and S830 is skipped, and the processing proceeds to step S831 ⁇ . Go ahead.
  • step S831 the compensation processing unit 811 determines whether or not the processing has been completed for all eight pixels around the pixel of interest. If it is determined in step S831 that the processing has not been completed for all eight pixels around the pixel of interest, the process returns to step S824, the next peripheral pixel is selected, and the subsequent processing is repeated. . If it is determined in step S831 that the process has been completed for all eight pixels around the pixel of interest, the vector compensation process is terminated, and the process returns to step S804 in FIG.
  • the allocation flag of the pixel to which the motion vector is allocated by the allocation compensation processing described above is rewritten to l (True), and the motion vector allocated by the allocation compensation processing is also used as a compensation candidate vector for the next pixel. Since it is used, almost the same motion vector is selected for pixels that move substantially the same in the object, and a stable motion vector with few errors can be obtained. As a result, block noise, powder noise, etc. of the image generated in the subsequent stage can be suppressed and the quality can be improved.
  • the force vector detection unit 52 that performs vector compensation processing on the pixels that have not been assigned by the vector assignment unit 54 has not been detected (zero vector).
  • Vector compensation processing may be performed on a powerful pixel for which a motion vector is not obtained in some processing, such as a pixel from which detection has been performed.
  • vector compensation processing may be performed on pixels for which the detected motion vector or the assigned motion vector is not accurate (reliability is low).
  • the allocation compensation processing in units of pixels has been described.
  • the correct one of the motion vectors allocated to the pixels located in the vicinity thereof in units of predetermined blocks. May be assigned to all pixels of the predetermined block. If there is a pixel that has already been assigned a motion vector in a given block, it may be assigned only to other pixels!
  • FIG. 78 is a block diagram showing the configuration of the image interpolation unit 58. As shown in FIG. The image interpolator 58 shown in FIG. 78 interpolates the pixel value of the interpolation frame using the motion vector allocated to the interpolation frame of the allocation vector memory 55 and the pixel value of frame t and frame t + 1. And processing to output 60P signal image.
  • the frame t of the image at time t is input to the spatial filter 92-1, and the frame t + 1 of the image at time t + 1 is input to the spatial filter 92-2 and the buffer 95. It is.
  • the interpolation control unit 91 selects the pixel of the interpolation frame in the allocation vector memory 55, and based on the motion vector allocated to the selected pixel, the interpolation frame 91 and the two frames t In other words, the interpolation control unit 91 obtains the positional relationship (spatial shift amount) with the pixel of the frame t + 1 and the position on the frame t associated with the motion vector with reference to the pixel of the interpolation frame. From the position of the pixel on the frame t corresponding to the pixel of the interpolation frame, the spatial shift amount thereof is obtained, and the obtained spatial shift amount is supplied to the spatial filter 92-1.
  • the interpolation control unit 91 uses the pixel of the interpolation frame as a reference, the position on the frame t + 1 associated with the motion vector, and the pixel on the frame t + 1 corresponding to the pixel of the interpolation frame.
  • the spatial shift amount is obtained from the position, and the obtained spatial shift amount is supplied to the spatial filter 92-2.
  • the interpolation control unit 91 obtains an interpolation weight between the frame t and the frame t + 1 based on a preset time phase (time) of the interpolation frame, Set to multipliers 93-1 and 93-2.
  • the time force of the interpolation frame is the time that is “k” away from the time t + 1 of the frame t + 1 and the time that is “1 k” away from the time t of the frame t (that is, the interpolation frame is t and time t + 1 are generated at a time that is divided into “1—k”: “k”)
  • the interpolation control unit 91 sets the interpolation weight of “1—k” to the multiplier 93-1. Then, an interpolation weight of “k” is set to the multiplier 93-2.
  • the spatial filters 92-1 and 92-2 are configured by, for example, a cubic filter.
  • the spatial filter 92-1 is based on the input pixel value of the pixel on the frame t and the spatial shift amount supplied from the interpolation control unit 91.
  • the spatial filter 92-1 corresponds to the pixel of the interpolation frame on the frame t.
  • the pixel value is obtained, and the obtained pixel value is output to the multiplier 93-1.
  • the spatial filter 9 2-2 is based on the input pixel value of the pixel on the frame t + 1 and the spatial shift amount supplied from the interpolation control unit 91, and corresponds to the pixel of the interpolation frame on the frame t + 1.
  • the pixel value is obtained and the obtained pixel value is output to the multiplier 93-2.
  • the pixel position force frame t or frame t + 1 of the interpolation frame does not match the pixel position on the frame t or frame t + 1 (ie, the pixel position force frame t or frame of the interpolation frame).
  • the spatial filters 92-1 and 92-2 use the pixel values of the four pixels around the pixel position of the interpolated frame in frame t or frame t + 1.
  • the pixel value on the frame corresponding to the pixel of the interpolated frame is obtained by calculating the sum of the inverse ratio of the distances of the four surrounding pixels. In other words, the pixel value below the pixel is obtained by linear interpolation based on the distance to the surrounding four pixels described above with reference to FIG.
  • the multiplier 93-1 multiplies the pixel value on the frame t input from the spatial filter 92-1 by the interpolation weight "1-k” set by the interpolation control unit 91, and performs weighting.
  • the pixel value is output to the adder 94.
  • the multiplier 93-2 multiplies the pixel value on the frame t + 1 input from the spatial filter 92-2 by the interpolation weight “k” set by the interpolation control unit 91, and obtains the weighted pixel value. And output to the adder 94.
  • the adder 94 adds the pixel value input from the multiplier 93-1 and the pixel value input from the multiplier 93-2 to generate the pixel value of the pixel of the interpolation frame,
  • the pixel value of the generated interpolation frame is output to the buffer 95.
  • the buffer 95 buffers the input frame t + 1.
  • the buffer 95 outputs the generated interpolated frame, and then outputs a frame t + 1 that is notffered as necessary based on a preset time phase (time) of the 60P frame. As a result, the 60P signal image is output to the subsequent stage (not shown).
  • step S901 the interpolation control unit 91 interpolates interpolation weights (eg, “k” and “1—” between frames t and t + 1 based on the time phase of the interpolation frame to be processed. k ”) and set the obtained interpolation weights to the multipliers 93-1 and 93-2, respectively.
  • step S902 the interpolation control unit 91 selects a pixel of the interpolation frame in the allocation vector memory 55. Note that the pixels on the interpolated frame are selected in the pixel power raster scan order at the upper left of the frame.
  • step S903 the interpolation control unit 91, based on the motion vector assigned to the selected pixel, the pixels on the interpolation frame, two frames t and t + The positional relationship (spatial shift amount) with one pixel is obtained, and the obtained spatial shift amount is supplied to the spatial filters 92-1 and 92-2, respectively.
  • the interpolation control unit 91 uses the pixel of the interpolation frame as a reference, the position on the frame t associated with the motion vector, and the frame t corresponding to the pixel of the interpolation frame.
  • the spatial shift amount is obtained from the pixel position, and the obtained spatial shift amount is supplied to the spatial filter 92-1.
  • the interpolation control unit 91 uses the pixel of the interpolation frame as a reference, the position on the frame t + 1 associated with the motion vector, and the pixel on the frame t + 1 corresponding to the pixel of the interpolation frame.
  • the spatial shift amount is obtained from the position, and the obtained spatial shift amount is supplied to the spatial filter 92-2.
  • the pixel value of frame t of the image at time t is input to the spatial filter 92-1, and the pixel value of frame t + 1 of the image at time t + 1 is input to the spatial filter 92-2.
  • the spatial filters 92-1 and 92-2 are interpolated based on the pixel values of the pixels on the input frames t and t + 1 and the spatial shift amount supplied from the interpolation control unit 91.
  • the pixel value on each frame corresponding to this pixel is obtained, and the obtained pixel value is output to multipliers 93-1 and 93-2, respectively.
  • the multipliers 93-1 and 93-2 in step S905, set the interpolation weight set by the interpolation control unit 91 to the pixel value on each frame input from the spatial filter 92-1 or 92-2. And weighted pixel values are output to the adder 94. That is, the multiplier 93-1 multiplies the pixel value on the frame t input from the spatial filter 92-1 by the interpolation weight “1-k” set by the interpolation control unit 91, and weighted pixels. The value is output to the adder 94.
  • the multiplier 93-2 multiplies the pixel value on the frame t + 1 input from the spatial filter 92-2 by the interpolation weight “k” set by the interpolation control unit 91, and obtains the weighted pixel value. And output to the adder 94.
  • step S906 the adder 94 adds the pixel value weighted by the multiplier 93-1 and the pixel value weighted by the multiplier 92-2 to thereby obtain the pixel value of the pixel of the interpolation frame. And the generated pixel value is output to the buffer 95.
  • step S907 the interpolation control unit 91 determines whether or not the processing for all the pixels on the interpolation frame has been completed. In step S907, all images on the interpolation frame If it is determined that the processing for the element has not ended, the processing returns to step S902, and the subsequent processing is repeated. If it is determined in step S907 that the processing has been completed for all the pixels on the interpolation frame, the image interpolation processing is terminated.
  • step S86 the interpolation frame is output by the notifier 95, and then, if necessary, the frame t + 1 is output to be output to the subsequent stage of the image power of the 60P signal. Therefore, since the most probable motion vector is assigned to the pixel of the interpolation frame, a V ⁇ interpolation frame can be generated with high accuracy.
  • the force evaluation value DFD and evaluation described using the evaluation value DFD that is the sum of absolute differences, the evaluation value mDFD, and the evaluation value dfv as evaluation values when selecting a motion vector It is not limited to the value mDFD and the evaluation value dfv, but if you want to evaluate the reliability of the motion vector, you can use another one.
  • each block to be processed is configured by, for example, 8 pixels x 8 pixels, 9 pixels x 9 pixels, etc.
  • the number of pixels constituting the block for performing each process is not limited to the above number of pixels.
  • the 24P signal power has been described as an example of the signal conversion to the 60P signal.
  • the present invention provides, for example, an interlace signal or a frame frequency conversion of a moving image, It can also be applied to other frame rate conversions.
  • the series of processes described above can also be executed by force software that can be executed by hardware.
  • various functions can be executed by installing a computer built in dedicated hardware or various programs that make up the software. It is installed from the program storage medium to a general-purpose personal computer, for example.
  • a program storage medium that stores a program that is installed in a computer and is ready to be executed by the computer has a magnetic disk 31 (frame).
  • Optical disc 32 (including CD-ROM (compact disc-read only memory), DVD (digital versatile disc)), magneto-optical disc 33 (including MD (mini-disc) (trademark)), Alternatively, it is composed of a removable recording medium (package media) composed of a semiconductor memory 34 or the like, or a ROM 12 in which a program is temporarily or permanently stored.

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computing Systems (AREA)
  • Television Systems (AREA)
  • Image Analysis (AREA)
  • Compression Or Coding Systems Of Tv Signals (AREA)
  • Compression, Expansion, Code Conversion, And Decoders (AREA)

Abstract

本発明は、フレーム間の平均輝度レベルが大きく変化する場合にも、動きベクトルの信頼度の評価を行うことができるようにする画像処理装置および方法、プログラム、並びに記録媒体に関する。フレームt+1上には、フレームt上の画素p0が対応する画素p1から、正しい動きベクトルv1のベクトル量ずらした位置のブロックB1と、画素p0が対応する画素p1から誤った動きベクトルv2のベクトル量ずらした位置のブロックB2が示されている。ここで、ブロックB1にだけ光源の移動などがあり、ブロックB1の輝度レベルが全体的に下がったとしても、フレーム毎に演算ブロック内の輝度値平均をオフセットとして差し引いた輝度値の自乗和を評価値として用いることにより、ブロックB1の評価値の方が、ブロックB2の評価値よりも信頼度が高いと判定される。本発明は、24P信号から60P信号へのフレーム周波数変換処理を行う信号処理装置に適用できる。

Description

明 細 書
画像処理装置および方法、プログラム、並びに記録媒体
技術分野
[0001] 本発明は、画像処理装置および方法、プログラム、並びに記録媒体に関し、特に、 評価に用いる 2フレーム間の輝度値の平均値を差し引いた評価値を用いることで、フ レーム間の平均輝度レベルが大きく変化する場合にも、動きベクトルの信頼度の評 価を行うことができるようにした画像処理装置および方法、プログラム、並びに記録媒 体に関する。
背景技術
[0002] 動画像のフレーム周波数変換処理や動画像圧縮処理を行う画像処理装置にお!/ヽ ては、動画像上で動き検出処理を行い、検出された動きベクトルを用いて処理を行う ことが多い (特許文献 1参照)。この動き検出処理において、一般的に用いられる方 法として、ブロックマッチングや反復勾配法などがある。
[0003] これらの動き検出方法にお!、ては、その検出処理過程にお!/、て、 1つある 、は複数 個のベクトルを選択するために、予め定義された動きベクトルの精度に対する評価値 を用いて、複数のベクトルの評価値を比較することにより、ベクトルが評価される。
[0004] 例えば、ブロックマッチングにおいては、探索範囲の中から最適な対応点を決定す る際に、各対応点 (ブロック)候補に対して、着目点 (ブロック)との間の評価値を演算 し、評価値の比較により最適な対応点の選択を行う。
[0005] また、反復勾配法にお!、ては、初期オフセットとなるベクトルを着目点(ブロック)の 周辺画素(ブロック)のベクトル群の中から選択する処理や、勾配法の演算を複数回 反復して得られる反復段階毎の処理結果の中から最終的な検出ベクトルを選択する 処理において、各ベクトルに対する評価値を演算し、評価値の比較'選択を行う。す なわち、この評価値の信頼性は、ベクトルの信頼性に直結するものである。
[0006] 特許文献 1 :特開平 9 172621号公報
発明の開示
発明が解決しょうとする課題 [0007] し力しながら、光源の移動や影の通過などにより、評価値を求めるフレーム間で平 均輝度レベルが大きく変化する場合、対象ベクトルが同一オブジェクトを正しく結ぶも のであっても、評価値が正しい値にならないことがあった。例えば、小さいほどべタト ルの精度が高いと判定される評価値を用いた場合に、対象ベクトルが同一オブジェ タトを正しく結ぶものであっても、その評価値力 大きくなつてしまう場合があった。
[0008] したがって、この評価値によるベクトル評価の信頼度は低くなつてしま 、、この影響 として、例えば、ベクトルの比較や選択処理で誤ったベクトルが選択されてしまう恐れ かあつた。
[0009] 本発明は、このような状況に鑑みてなされたものであり、フレーム間の平均輝度レべ ルが大きく変化する場合にも、動きベクトルの信頼度の評価を行うことができるように するものである。
課題を解決するための手段
[0010] 本発明の一側面の画像処理装置は、動きベクトルを検出し、検出された動きべタト ルに基づいて、画素値を生成する画像処理装置において、フレーム上の着目ブロッ クの動きベクトルを検出する過程にぉ 、て用いられる動きベクトルの精度の信頼度を 表す評価値を、対象となる動きベクトルの始点と終点をそれぞれ含む 2フレームのブ ロックの輝度値力 各ブロック内の輝度値の平均をそれぞれ差し引いた値を用いて 演算する評価値演算手段と、前記評価値演算手段により演算された評価値を用いて 、前記動きベクトルの精度の信頼度を評価するベクトル評価手段とを備える。
[0011] 前記評価値演算手段は、前記 2フレームのブロックのブロック間の輝度値差分の二 乗和を演算する第 1の演算手段と、前記第 1の演算手段による演算と並列して、前記 ブロック間の輝度値差分和の二乗を演算する第 2の演算手段とを備えることができる
[0012] 勾配法により着目ブロックの動きベクトルを求める勾配法演算手段をさらに備え、前 記評価値演算手段は、前記勾配法演算手段により求められる反復段階毎の動きべ タトルの評価値を演算し、前記ベクトル評価手段は、前記評価値演算手段により演算 された前記反復段階毎の動きベクトルの評価値のうち、最も小さい評価値の動きべク トルを精度の信頼度が高いと評価し、前記着目ブロックの動きベクトルとして後段に 出力することができる。
[0013] 前記フレーム上の着目ブロックの動きベクトルを検出するための勾配法の初期値と して用いられる初期ベクトルを選択する初期ベクトル選択手段をさらに備え、前記評 価値演算手段は、前記フレームの過去フレームにおいて検出された前記動きべタト ルの終点である終点ブロックと同じ位置にある前記フレーム上の着目ブロックを始点 とした、前記動きベクトルと同じ大きさ、かつ、同じ向きの動きベクトルである前記着目 ブロックのシフト初期ベクトル、および、前記フレームまたは前記過去フレームにおい て検出された前記着目ブロックの所定の周辺ブロックの動きベクトルの評価値を演算 し、前記ベクトル評価手段は、前記評価値演算手段により演算された前記着目ブロッ クのシフト初期ベクトル、および前記所定の周辺ブロックの動きベクトルの評価値のう ち、最も小さい評価値の動きベクトルを精度の信頼度が高いと評価し、前記初期べク トル選択手段は、前記ベクトル評価手段により精度の信頼度が高いと評価された動き ベクトルを、前記着目ブロックの初期ベクトルとして選択することができる。
[0014] 前記フレームの過去フレームにおいて検出された前記動きベクトルの終点である終 点ブロックと同じ位置にある前記フレーム上のブロックを始点とした、前記動きべタト ルと同じ大きさ、かつ、同じ向きの動きベクトルを、前記ブロックのシフト初期ベクトルと して設定するシフト初期ベクトル設定手段をさらに備え、前記ベクトル評価手段は、前 記過去フレームにおいて検出された前記動きベクトルの前記終点ブロックと同じ位置 にある前記フレーム上の前記ブロックにおいて検出された前記動きベクトルの評価値 のうち、最も小さい評価値の動きベクトルを精度の信頼度が高いと評価し、前記シフト 初期ベクトル設定手段は、前記ベクトル評価手段により精度の信頼度が高いと評価さ れた前記動きベクトルと同じ大きさ、かつ、同じ向きの動きベクトルを、前記ブロックの 前記シフト初期ベクトルとして選択することができる。
[0015] 本発明の一側面の画像処理方法は、動きベクトルを検出し、検出された動きべタト ルに基づいて、画素値を生成する画像処理装置の画像処理方法において、フレー ム上の着目ブロックの動きベクトルを検出する過程において用いられる動きベクトル の精度の信頼度を表す評価値を、対象となる動きベクトルの始点と終点をそれぞれ 含む 2フレームのブロックの輝度値力 各ブロック内の輝度値の平均をそれぞれ差し 引いた値を用いて演算する評価値演算ステップと、前記評価値演算ステップの処理 により演算された評価値を用いて、前記動きベクトルの精度の信頼度を評価するべク トル評価ステップとを含む。
[0016] 本発明の一側面のプログラムは、動きベクトルを検出し、検出された動きベクトルに 基づいて、画素値を生成する処理をコンピュータに行わせるプログラムであって、フレ ーム上の着目ブロックの動きベクトルを検出する過程にぉ 、て用いられる動きべタト ルの精度の信頼度を表す評価値を、対象となる動きベクトルの始点と終点をそれぞ れ含む 2フレームのブロックの輝度値から各ブロック内の輝度値の平均をそれぞれ差 し引いた値を用いて演算する評価値演算ステップと、前記評価値演算ステップの処 理により演算された評価値を用いて、前記動きベクトルの精度の信頼度を評価する ベクトル評価ステップとを含む。
[0017] 本発明の一側面の記録媒体に記録されているプログラムは、動きベクトルを検出し 、検出された動きベクトルに基づいて、画素値を生成する処理をコンピュータに行わ せるプログラムであって、フレーム上の着目ブロックの動きベクトルを検出する過程に お!ヽて用いられる動きベクトルの精度の信頼度を表す評価値を、対象となる動きべク トルの始点と終点をそれぞれ含む 2フレームのブロックの輝度値から各ブロック内の 輝度値の平均をそれぞれ差し引いた値を用いて演算する評価値演算ステップと、前 記評価値演算ステップの処理により演算された評価値を用いて、前記動きベクトルの 精度の信頼度を評価するベクトル評価ステップとを含む。
[0018] 本発明の一側面においては、フレーム上の着目ブロックの動きベクトルを検出する 過程にお!、て用いられる動きベクトルの精度の信頼度を表す評価値が、対象となる 動きベクトルの始点と終点をそれぞれ含む 2フレームのブロックの輝度値から各ブロッ ク内の輝度値の平均をそれぞれ差し引いた値を用いて演算され、演算された評価値 を用いて、前記動きベクトルの精度の信頼度が評価される。
発明の効果
[0019] 本発明の一側面によれば、特に、フレーム間の平均輝度レベルが大きく変化する 場合にお 、て、動きベクトルの検出精度を向上させることができる。
図面の簡単な説明 圆 1]本発明の信号処理装置の構成例を示すブロック図である。
[図 2]信号処理装置の構成を示すブロック図である。
[図 3]本発明の処理の原理を説明する図である。
[図 4]本発明の処理を具体的に説明する図である。
圆 5]信号処理装置において用いられる動きベクトルの評価値を説明する図である。
[図 6]評価値 DFDを演算する評価値演算部の構成例を示すブロック図である。 圆 7]図 6の評価値演算部の評価値演算処理を説明するフローチャートである。
[図 8]平均輝度レベル変化時の評価値 DFDについて説明する図である。
[図 9]平均輝度レベル変化時の評価値 DFDについて説明する図である。
圆 10]平均輝度レベル変化時の差分分散について説明する図である。
[図 11]評価値 mDFDを演算する評価値演算部の構成例を示すブロック図である。 圆 12]図 11の評価値演算部の評価値演算処理を説明するフローチャートである。 圆 13]図 11の評価値演算部の評価値演算処理を説明するフローチャートである。
[図 14]評価値 dfvを演算する評価値演算部の構成例を示すブロック図である。
圆 15]図 14の評価値演算部の評価値演算処理を説明するフローチャートである。 圆 16]信号処理装置のフレーム周波数変換処理を説明するフローチャートである。
[図 17]図 2のベクトル検出部の構成を示すブロック図である。
[図 18]ベクトル検出部で用いられる勾配法を説明する図である。
圆 19]初期ベクトルを用いた反復勾配法を説明する図である。
[図 20]図 16のステップ S82の動きベクトル検出処理を説明するフローチャートである
[図 21]図 17のシフト初期ベクトル割付部の構成を示すブロック図である。
[図 22]図 20のステップ S104のシフト初期ベクトル割付処理を説明するフローチヤ一 トである。
[図 23]図 17の初期ベクトル選択部の構成を示すブロック図である。
[図 24]図 20のステップ S102の初期ベクトル選択処理を説明するフローチャートであ る。
[図 25]図 17の反復勾配法演算部およびベクトル評価部の構成を示すブロック図であ る。
[図 26]図 25の有効画素判定部の構成を示すブロック図である。
[図 27]図 25の勾配法演算部の構成を示すブロック図である。
[図 28]動きベクトルの検出対象ブロックと演算ブロックを説明する図である。
[図 29]有効画素判定方法を説明する図である。
圆 30]演算ブロックにおける有効画素の構成を説明する図である。
圆 31]片側勾配領域を説明する図である。
[図 32]図 20のステップ S103の反復勾配法演算処理を説明するフローチャートであ る。
[図 33]図 32のステップ S303の有効画素判定処理を説明するフローチャートである。
[図 34]図 33のステップ S323の有効画素演算処理を説明するフローチャートである。
[図 35]図 32のステップ S305の勾配法実行判定処理を説明するフローチャートであ る。
[図 36]図 32のステップ S306の勾配法演算処理を説明するフローチャートである。
[図 37]図 36のステップ S403の統合型勾配法演算処理を説明するフローチャートで ある。
[図 38]図 36のステップ S406の独立型勾配法演算処理を説明するフローチャートで ある。
[図 39]図 32のステップ S307のベクトル評価処理を説明するフローチャートである。
[図 40]図 26の画素判定部、カウンタ、演算実行判定部の他の構成を示すブロック図 である。
[図 41]図 27の演算判定部の他の構成を示すブロック図である。
[図 42]図 32のステップ S303の有効画素判定処理の他の例を説明するフローチヤ一 トである。
[図 43]図 32のステップ S305の勾配法実行判定処理の他の例を説明するフローチヤ ートである。
[図 44]図 36のステップ S406の独立型勾配法演算処理の他の例を説明するフローチ ヤートである。 [図 45]図 2のベクトル検出部の他の構成を示すブロック図である。
[図 46]図 45の反復勾配法演算部およびベクトル評価部の構成を示すブロック図であ る。
[図 47]図 46の有効画素判定部の構成を示すブロック図である。
[図 48]図 17のベクトル検出部により検出された動きベクトルを用いて生成される内挿 フレームを説明する図である。
[図 49]図 17のベクトル検出部により検出された動きベクトルを用いて生成される内挿 フレームを説明する図である。
[図 50]図 17のベクトル検出部により検出された動きベクトルを用いて生成される内挿 フレームを説明する図である。
[図 51]図 17のベクトル検出部による初期ベクトルの選択方法を説明する図である。
[図 52]図 17のベクトル検出部による初期ベクトルの選択方法を説明する図である。
[図 53]図 17のベクトル検出部による初期ベクトルの選択方法を説明する図である。
[図 54]図 17のベクトル検出部による初期ベクトルの選択方法を説明する図である。
[図 55]図 17のベクトル検出部による初期ベクトルの選択方法を説明する図である。
[図 56]図 45のベクトル検出部により検出された動きベクトルを用いて生成される内挿 フレームを説明する図である。
[図 57]図 45のベクトル検出部により検出された動きベクトルを用いて生成される内挿 フレームを説明する図である。
[図 58]図 45のベクトル検出部による初期ベクトルの選択方法を説明する図である。
[図 59]図 45のベクトル検出部による初期ベクトルの選択方法を説明する図である。
[図 60]図 45のベクトル検出部により検出された動きベクトルを用いて生成される内挿 フレームを説明する図である。
[図 61]図 45のベクトル検出部による初期ベクトルの選択方法を説明する図である。
[図 62]図 45のベクトル検出部により検出された動きベクトルを用いて生成される内挿 フレームを説明する図である。
[図 63]図 20のステップ S103の反復勾配法演算処理の他の例を説明するフローチヤ ートである。 [図 64]図 20のステップ S103の反復勾配法演算処理のさらに他の例を説明するフロ 一チャートである。
[図 65]図 20のステップ S103の反復勾配法演算処理のさらに他の例を説明するフロ 一チャートである。
[図 66]図 64のステップ S614の勾配法演算および仮設定処理を説明するフローチヤ ートである。
圆 67]各フラグの値毎のベクトル評価の比較対象と反復判定結果を説明する図であ る。
[図 68]図 2のベクトル検出部のさらに他の構成を示すブロック図である。
[図 69]図 68の反復勾配法演算部およびベクトル評価部の構成を示す図である。
[図 70]図 63のステップ S565のベクトル記憶制御の他の例を説明するフローチャート である。
[図 71]図 2のベクトル割付部の構成を示すブロック図である。
圆 72]本発明の 4点補間処理の概念を説明する図である。
[図 73]図 16のステップ S83のベクトル割付処理を説明するフローチャートである。
[図 74]図 73のステップ S707の割付ベクトル評価処理を説明するフローチャートであ る。
[図 75]図 2の割付補償部の構成を示すブロック図である。
[図 76]図 16のステップ S84の割付補償処理を説明するフローチャートである。
[図 77]図 76のステップ S803のベクトル補償処理を説明するフローチャートである。
[図 78]図 2の画像補間部の構成を示すブロック図である。
[図 79]図 16のステップ S85の画像補間処理を説明するフローチャートである。
符号の説明
1 信号処理装置, 51 フレームメモリ, 52 ベクトル検出部, 53 検出ベクトルメモ リ, 54 ベクトル割付部, 55 割付ベクトルメモリ, 56 割付フラグメモリ, 57 割付補 償部, 58 画像補間部, 61, 61A, 61B 評価値演算部, 101 初期ベクトル選択 部, 103 反復勾配法演算部, 104 ベクトル評価部, 105 シフト初期ベクトル割付 部, 106 評価値メモリ, 107 シフト初期ベクトルメモリ, 404 有効画素判定部, 40 5 勾配法演算部, 412 評価判定部, 421 画素差分算出部, 422 画素判定部, 423 カウンタ, 424 勾配法継続判定部, 425 演算実行判定部, 461 画素差分 算出部, 462 演算判定部, 463— 1 統合型勾配演算部, 463— 2 独立型勾配演 算部, 464 ベクトル算出部, 521 初期ベクトル選択部, 522 反復勾配法演算部, 523 ベクトル評価部, 524 初期候補ベクトルメモリ, 531 有効画素判定部, 541 評価判定部, 551 勾配法継続判定部, 561 ベクトル評価部, 571 0ベクトルフラ グ領域, 581 評価判定部
発明を実施するための最良の形態
[0022] 以下、図を参照して本発明の実施の形態について説明する。
[0023] 図 1は、本発明を適用した信号処理装置 1の構成例を表している。信号処理装置 1 は、例えば、パーソナルコンピュータなどで構成される。図 1において、 CPU (Central Processing Unit) 11は、 ROM (Read Only Memory) 12、または記憶部 18に記憶さ れているプログラムに従って各種の処理を実行する。 RAM (Random Access Memory ) 13には、 CPU11が実行するプログラムやデータなどが適宜記憶される。これらの C PU11、 ROM12、および RAM13は、バス 14により相互に接続されている。
[0024] CPU11にはまた、バス 14を介して入出力インタフェース 15が接続されている。
入出力インタフェース 15には、キーボード、マウス、マイクロフォンなどよりなる入力部 16、ディスプレイ、スピーカなどよりなる出力部 17が接続されている。 CPU11は、入 力部 16から入力される指令に対応して各種の処理を実行する。そして、 CPU11は、 処理の結果、得られた画像や音声等を出力部 17に出力する。
[0025] 入出力インタフェース 15に接続されている記憶部 18は、例えばノヽードディスクなど で構成され、 CPU11が実行するプログラムや各種のデータを記憶する。通信部 19 は、インターネット、その他のネットワークを介して外部の装置と通信する。また、通信 部 19を介してプログラムを取得し、記憶部 18に記憶してもよ 、。
[0026] 入出力インタフェース 15に接続されているドライブ 20は、磁気ディスク 31、光デイス ク 32、光磁気ディスク 33、或いは半導体メモリ 34などが装着されたとき、それらを駆 動し、そこに記録されているプログラムやデータなどを取得する。取得されたプロダラ ムゃデータは、必要に応じて記憶部 18に転送され、記憶される。 [0027] なお、信号処理装置 1は、例えば、テレビジョン受像機、光ディスクプレーヤなど、ま たは、それらの信号処理部とすることもできる。
[0028] 図 2は、信号処理装置 1を示すブロック図である。
[0029] なお、信号処理装置 1の各機能をハードウェアで実現するか、ソフトウェアで実現す るかは問わない。つまり、本明細書の各ブロック図は、ハードウェアのブロック図と考 えても、ソフトウェアによる機會ブロック図と考えてもよい。
[0030] 図 2に構成を示す信号処理装置 1においては、例えば、フレーム周波数 24Hzのプ ログレツシブ画像信号 (以下、 24P信号と称する)の画像が入力され、入力された画 像 (入力画像)力 フレーム周波数 60Hzのプログレッシブ画像信号 (以下、 60P信号 と称する)の画像に変換されて、出力される。すなわち、図 2は、画像処理装置である 信号処理装置の構成を示す図である。
[0031] 信号処理装置 1に入力された 24P信号の入力画像は、フレームメモリ 51、ベクトル 検出部 52、ベクトル割付部 54、割付補償部 57、および画像補間部 58に供給される 。フレームメモリ 51は、入力画像をフレーム単位で記憶する。フレームメモリ 51は、時 刻 t+ 1の入力画像の 1つ前の時刻 tのフレームを記憶する。フレームメモリ 51に記憶 される時刻 tのフレームは、ベクトル検出部 52、ベクトル割付部 54、割付補償部 57、 および画像補間部 58に供給される。なお、以下、フレームメモリ 51上の時刻 tのフレ ームをフレーム tと称し、時刻 t+ 1の入力画像のフレームを、フレーム t+ 1と称する。
[0032] ベクトル検出部 52は、フレームメモリ 51上のフレーム tの着目ブロックと、入力画像 のフレーム t+ 1の対象ブロックの間で動きベクトルを検出し、検出した動きベクトルを 、検出ベクトルメモリ 53に記憶する。この 2フレーム間の動きベクトルの検出方法には 、勾配法またはブロックマッチング法などが用いられる。ベクトル検出部 52の構成の 詳細は、図 17を参照して後述する。検出ベクトルメモリ 53は、フレーム tにおいて、ベ タトル検出部 52により検出された動きベクトルを記憶する。
[0033] ベクトル割付部 54は、 24P信号のフレーム t上において求められた動きベクトルを、 割付ベクトルメモリ 55上の、補間する 60P信号のフレーム(以下、 60P信号のフレー ムは、 24P信号のフレームと区別するため、内挿フレームとも称する)上の画素に割り 付け、動きベクトルが割り付けられた画素の割付フラグメモリ 56の割付フラグを l(True )に書き換える。ベクトル割付部 54の構成の詳細は、図 71を参照して後述する。
[0034] 割付ベクトルメモリ 55は、ベクトル割付部 54により割り付けられた動きベクトルを、内 挿フレームの各画素に対応させて記憶する。割付フラグメモリ 56は、内挿フレームの 画素毎に、割り付けられる動きベクトルの有無を示す割付フラグを記憶している。例え ば、 True(l)である割付フラグは、対応する画素に動きベクトルが割り付けられている ことを示し、 False(O)である割付フラグは、対応する画素に動きベクトルが割り付けられ ていないことを示す。
[0035] 割付補償部 57は、割付フラグメモリ 56の割付フラグを参照し、ベクトル割付部 54に より動きベクトルが割り付けられな力つた着目画素に対して、その着目画素の周辺画 素の動きベクトルを補い、割付ベクトルメモリ 55の内挿フレーム上に割り付ける。この とき、割付補償部 57は、動きベクトルを割り付けた着目画素の割付フラグを l(True)に 書き換える。割付補償部 57の構成の詳細は、図 75を参照して後述する。
[0036] 画像補間部 58は、割付ベクトルメモリ 55の内挿フレームに割り付けられた動きべク トルと、フレーム tおよび次のフレーム t+ 1の画素値を用いて、内挿フレームの画素 値を補間生成する。そして、画像補間部 58は、生成された内挿フレームを出力し、そ の次に、必要に応じて、フレーム t+ 1を出力することにより、 60P信号の画像を、図 示せぬ後段に出力する。画像補間部 58の構成の詳細は、図 78を参照して後述する
[0037] なお、以下においては、画素値を、適宜、輝度値とも称する。
[0038] 図 3は、本発明に係る信号処理装置 1における処理の原理を説明する図である。図 3の例においては、点線が、信号処理装置 1に入力される、時刻 t, t+ 1,および t+ 2における 24P信号のフレームを表しており、実線が、入力された 24P信号力も信号 処理装置 1により、生成される時刻 t, t+O. 4, t+O. 8, t+ 1. 2, t+ 1. 6,および t + 2における 60P信号の内挿フレームを表して!/、る。
[0039] 一般に、 24P信号を、 60P信号に変換するためには、 5Z2倍のフレームが必要に なる。すなわち、 2枚の 24P信号の画像から 5枚の 60P信号の画像が生成されなけれ ばならない。このとき、生成される 60P信号の内挿フレームは、そのフレーム間隔を等 しくするために、 24P信号上での時間位ネ目カ SO. 0, 0. 4, 0. 8, 1. 2,および 1. 6と なる位置に配置される。この中で、時間位相が 0. 0である時刻 tの 1フレームを除く 4 フレーム(t+O. 4, t+O. 8, t+ 1. 2,および t+ 1. 6のフレーム)は、 24P信号上に は存在しない画像である。したがって、信号処理装置 1は、 24P信号の画像が入力さ れると、 24P信号の時刻 tおよび時刻 t+ 1の 2枚のフレームから、 4つの内挿フレーム を生成する。したがって、信号処理装置 1からは、時刻 t, t+O. 4, t+0. 8, t+ 1. 2 ,および t+ 1. 6の 5枚のフレームからなる 60P信号の画像が出力される。
[0040] 以上のようにして、信号処理装置 1は、 24P信号の画像から 60P信号の画像に、フ レーム周波数を変換する処理を実行する。
[0041] なお、原理的には、上述したように、 24P信号の時刻 tおよび時刻 t+ 1の 2枚のフレ ームから、時刻 t, t+O. 4, t+O. 8, t+ 1. 2,および t+ 1. 6の 5枚の 60P信号のフ レームが新しく生成される力 実際には、図 3の例の場合、 24P信号の時刻 tおよび 時刻 t+ 1の 2枚のフレームに基づいて、 t, t+O. 4, t+O. 8の 60P信号のフレーム が生成され、 24P信号の時刻 t+ 1および t+ 2の 2枚のフレームに基づいて、 t+ 1. 2 , t+ 1. 6,および t+ 2の 60P信号のフレームが生成される。
[0042] 図 4は、本発明の処理をより具体的に説明する図である。図 4の例においては、太 線矢印は、各状態への遷移を表しており、矢印 Tは、状態 J1乃 ¾[5における時間の 経過方向を表している。また、状態 J1乃 ¾[5は、信号処理装置 1を構成する各部へ の入出力時の、 24P信号の時刻 tのフレーム t、時刻 tの次の時刻 t+ 1のフレーム t+ 1、または、フレーム tおよびフレーム t+ 1の間に生成される 60P信号の内挿フレーム Fの状態を概念的に表している。すなわち、実際には、例えば、状態 J2に示されるよう な動きベクトルが検出されたフレームがベクトル割付部 54に入力されるわけではなく 、フレームと動きベクトルは、別々にベクトル割付部 54に入力される。
[0043] また、図 4の例にぉ ヽては、ベクトル検出部 52、ベクトル割付部 54、および割付補 償部 57は、動きベクトルの精度の信頼度を評価するための評価値を演算する評価 値演算部 61をそれぞれ有して ヽる。
[0044] 状態 J1は、ベクトル検出部 52に入力される、 24P信号のフレーム tおよびフレーム t
+ 1の状態を表している。状態 J1のフレーム t上の黒点は、フレーム t上の画素を表し ている。 [0045] ベクトル検出部 52は、状態 J1のフレーム t上の画素力 次の時刻のフレーム t+ 1に おいて、どの位置に移動するかを検出し、その動きを、状態 82のフレーム t上に示さ れるように、各画素に対応する動きベクトルとして出力する。この 2フレーム間の動き ベクトルの検出方法には、ブロックマッチング法または勾配法などが用いられる。なお 、このとき、画素に複数の動きベクトルが検出された場合、ベクトル検出部 52は、各 動きベクトルについて、内蔵する評価値演算部 61に評価値を演算させ、演算された 評価値に基づ 、て動きベクトルを選択する。
[0046] 状態 J2は、ベクトル割付部 54に入力される、フレーム tおよびフレーム t+ 1の状態 を表している。状態 J2において、フレーム tの各画素の矢印は、ベクトル検出部 52に より検出された動きベクトルを表している。
[0047] ベクトル割付部 54は、状態 J2のフレーム tの各画素に対して検出された動きべタト ルを、次のフレーム t+ 1まで延長させ、予め設定されている時間位相(例えば、図 3 の t+O. 4)にある内挿フレーム F上のどの位置を通過するかを求める。これは、フレ ーム tおよびフレーム t+ 1の間が一定動きであると仮定すると、動きベクトルが内揷フ レーム Fを通過した点力 そのフレームでの画素位置となるためである。したがって、 ベクトル割付部 54は、この通過する動きベクトルを、状態 J3の内挿フレーム F上の近 傍 4画素に割り付ける。
[0048] また、このとき、内挿フレームの画素によっては、動きベクトルが存在しない場合、あ るいは、複数の動きベクトル力 割付候補となりうる場合がある。後者のような場合に は、ベクトル割付部 54は、ベクトル検出部 52と同様に、内蔵する評価値演算部 61に 各動きベクトルにつ 、ての評価値を演算させ、演算された評価値に基づ 、て割り付 ける動きベクトルを選択する。
[0049] 状態 J3は、割付補償部 57に入力される、フレーム tおよびフレーム t+ 1、並びに動 きベクトルが割り付けられた内挿フレーム Fの状態を表している。状態 J3の内挿フレ ーム Fにおいては、ベクトル割付部 54により動きベクトルが割り付けられている画素と 、動きベクトルが割り付けられな力つた画素が示されて 、る。
[0050] 割付補償部 57は、状態 J3の動きベクトルが割り付けられていない画素に対して、そ の画素の周辺画素に割り付けられている動きベクトルを用いて補う。これは、ある着目 画素の近傍領域が同じ動きであるという仮定が成り立つならば、着目画素の周辺画 素の動きベクトルと、その着目画素の動きベクトルは似たものであるからである。これ により、動きベクトルが割り付けられな力つた画素にも、ある程度正確な動きベクトル が与えられ、状態 84の内挿フレーム F上のすべての画素に動きベクトルが割り付けら れる。
[0051] なお、この場合にも、複数の周辺画素の動きベクトルが候補として存在するため、割 付補償部 57は、ベクトル割付部 54と同様に、内蔵する評価値演算部 61に各動きべ タトルにつ 、ての評価値を演算させ、演算された評価値に基づ!/、て割り付ける動きべ タトルを選択する。
[0052] 状態 J4は、画像補間部 58に入力される、フレーム tおよびフレーム t+ 1、並びに、 すべての画素に動きベクトルが割り付けられた内挿フレーム Fの状態を表している。こ れらのすベての画素に割り付けられた動きベクトルにより、画像補間部 58は、内挿フ レーム F上の画素と、 2枚のフレーム tおよびフレーム t+ 1の画素の位置関係を決定 することができる。
[0053] したがって、画像補間部 58は、内挿フレーム F上に割り付けられた動きベクトルと、 フレーム tおよびフレーム t+ 1の画素値を用いて、状態 J5の内挿フレーム Fの黒点に 示されるように、内挿フレーム F上の画素値を補間生成する。そして、画像補間部 58 は、生成された内挿フレームを出力し、その次に、必要に応じて、フレーム t+ 1を出 力することにより、 60P信号の画像を、図示せぬ後段に出力する。
[0054] 次に、図 5を参照して、本発明に係る信号処理装置 1において用いられる動きべタト ルの評価値を説明する。図 4を参照して上述したように、信号処理装置 1の各部(ベタ トル検出部 52、ベクトル割付部 54、および割付補償部 57)において、後段の処理に 最適な動きベクトルが選択される。
[0055] このとき、信号処理装置 1の各部においては、動きベクトルに対する評価値として、 2つのフレームの注目するベクトル量分ずらしたブロック間の相関値を表す差分絶対 値和(DFD(Displaced Frame Difference))が各部の評価値演算部 61により演算され て、用いられる。
[0056] 図 5の例においては、時刻 tのフレーム t上の画素位置 pを中心とした m X nのブロッ ク、および、時刻 t+ 1のフレーム t+ 1上の画素位置 pから注目する動きベクトル vの ベクトル量分ずらした画素位置 p+vを中心とした mX nのブロックの 2つのブロックが 示されている。これら 2つのブロック間において求められる差分絶対値和 DFDt (p)は 、次の式(1)で表される。
[0057] [数 1]
m x n
DFDt (p) =∑ | Ft+1 (px, y+v) - Ft (px, y) |
χ, y
•••(l)
[0058] ここで、 Ft (p)は、時刻 tにおける画素位置 pの輝度値を表しており、 mX nは、差分 絶対値和を求めるための DFD演算範囲(ブロック)を表して 、る。この差分絶対値和 は、 2つのフレームにおける DFD演算範囲(ブロック)間の相関値を表しているため、 一般的には、この差分絶対値和が小さいほどフレーム間のブロックの波形が一致し ており、差分絶対値和が小さいほど、動きベクトル Vの信頼度が高いと判定される。
[0059] これにより、この差分絶対値和(以下、評価値 DFDと称する)は、複数の候補の中 から、最も確からし 、動きベクトルを選ぶ場合などに用いられる。
[0060] さらに、評価値 DFDについて詳しく説明する。
[0061] 図 6は、評価値 DFDを演算する評価値演算部 61の構成例を示すブロック図である 図 6の例において、時刻 tの画像のフレーム tは、および、フレームメモリ 51からの時 刻 t+ 1の画像のフレーム t+ 1は、輝度値取得部 72に入力されている。
[0062] 評価値演算部 61は、ブロック位置演算部 71、輝度値取得部 72、差分絶対値演算 部 73、および積和演算部 74により構成されている。
[0063] 評価値演算部 61には、前段から、フレーム tのブロック(DFD演算範囲)位置と評 価対象となる動きベクトルとが入力される。フレーム tのブロック位置は、ブロック位置 演算部 71および輝度値取得部 72に入力され、動きベクトルは、ブロック位置演算部 71に入力される。
[0064] ブロック位置演算部 71は、入力されたフレーム tのブロック位置と動きベクトルを用 いて、フレーム t+ 1のブロック位置を算出し、輝度値取得部 72に出力する。輝度値 取得部 72は、図示せぬフレーム tのフレームメモリから、入力されたフレーム tのブロッ ク位置に対応する輝度値を取得し、フレーム t+ 1のフレームメモリ 51から、入力され たフレーム t+ 1のブロック位置に対応する輝度値を取得し、取得した各輝度値を、差 分絶対値演算部 73に出力する。
[0065] 差分絶対値演算部 73は、輝度取得部 72からのフレーム tおよび t+ 1の各ブロック 内の輝度値を用いて、輝度差分絶対値を演算し、演算した輝度差分絶対値を、積和 演算部 74に出力する。積和演算部 74は、差分絶対値演算部 73により演算された輝 度差分絶対値を積算することで、評価値 DFDを取得し、取得した評価値 DFDを後 段に出力する。
[0066] 次に、図 7のフローチャートを参照して、図 6の評価値演算部 61の評価値演算処理 を説明する。
[0067] 評価値演算部 61には、前段から、フレーム tのブロック(DFD演算範囲)位置と評 価対象となる動きベクトルとが入力される。ブロック位置演算部 71は、フレーム tのブ ロック位置と評価対象となる動きベクトルが入力されると、ステップ S11において、入 力されたフレーム tのブロック位置と動きベクトルを用いて、フレーム t+ 1のブロック位 置を算出し、輝度値取得部 72に出力する。
[0068] 輝度値取得部 72は、ステップ S12において、入力されたフレーム tおよびフレーム t
+ 1のブロック位置に基づいて、各フレームのブロック(DFD演算範囲)の画素の輝 度値を取得し、取得した各輝度値を差分絶対値演算部 73に出力する。なお、輝度 値取得部 72は、ブロックの左上の画素の輝度値から取得する。
[0069] 差分絶対値演算部 73は、ステップ S13において、輝度値取得部 72からのフレーム tおよびフレーム t+ 1の画素の輝度値を用いて、輝度差分絶対値を演算し、演算し た輝度差分絶対値を積和演算部 74に出力する。
[0070] 積和演算部 74は、ステップ S14において、差分絶対値演算部 73からの輝度差分 絶対値を積算し、ステップ S15において、ブロック内の全画素に対して処理が終了し たか否かを判定する。ステップ S15において、ブロック内の全画素に対して処理が終 了していないと判定された場合、処理は、ステップ S12に戻り、それ以降の処理が繰 り返される。すなわち、ブロックの次の画素に対しての処理が行われる。 [0071] 一方、ステップ S15において、ブロック内の全画素に対して処理が終了したと判定 された場合、積和演算部 74は、ステップ S16において、輝度差分絶対値を積算した 結果である DFDを取得し、評価値 DFDとして後段に出力する。これにより、評価値 演算処理は終了される。
[0072] 以上のように、評価値 DFDは、ブロック(DFD演算範囲)内の輝度値の差分絶対 値を積算することで求められるため、一般的には、評価値 DFDが小さいほど、フレー ム間のブロックの波形が一致し、動きベクトル Vの信頼度が高いと判定される。
[0073] し力しながら、光源の移動や影の通過などで、評価値を求めるフレーム間で平均輝 度値レベルが大きく変化する場合、評価値 DFDでは、動きベクトルを正しく評価する ことが難しい。
[0074] 次に、図 8および図 9を参照して、平均輝度レベル変化時の評価値 DFDについて 説明する。図 8の例においては、矢印 Tは、図中、左手前の時刻 tのフレーム tから、 右奥の時刻 t+ 1のフレーム t+ 1への時間の経過を示して!/、る。
[0075] フレーム t上には、画素 ρθを中心とした mX nのブロック BOが示されている。
[0076] フレーム t+ 1上には、フレーム tおよび t+ 1間における画素 ρθの正しい動きべタト ルである動きベクトル vlが示されており、フレーム t上の画素 ρθが対応する画素 piか ら動きベクトル vlのベクトル量ずらした(シフトさせた)位置の画素 pl +vlを中心とし た m X nのブロック B1が示されている。フレーム t+ 1上には、また、フレーム tおよび t + 1間における画素 ρθの誤った動きベクトルである動きベクトル v2が示されており、フ レーム t上の画素 ρθが対応する画素 piから動きベクトル v2のベクトル量ずらした位置 の画素 pi + v2を中心とした m X nのブロック B2が示されて 、る。
[0077] 図 9の左側のグラフには、一般的な場合 (すなわち、フレーム間において、光源の 移動や影の通過などが無い場合)における図 8のブロック B0、ブロック Bl、およびブ ロック B2のそれぞれの(画素)位置における輝度値の波形 Y0、 Yl、および Υ2が示さ れており、右側のグラフには、フレーム t+ 1上のブロック B1に光源の移動や影の通 過などがあり、ブロック B1がそれらの影響を受けた場合における図 8のブロック B0、 ブロック Bl、およびブロック B2のそれぞれの(画素)位置における輝度値の波形 Y0、 Yl l、および Υ2が示されている。 [0078] すなわち、ブロック BOおよび B2は、光源の移動や影の通過の影響を受けていない ため、左右のグラフにおける輝度値の波形 YOおよび Y2は変わらず、同じである。
[0079] 図 9の左側のグラフに示されるように、一般的な場合には、ブロック B1の輝度値の 波形 Y1は、波形 Y0と波形 Y1の間の斜線の部分に示されるように、ブロック B2の輝 度値の波形 Y2よりも、ブロック BOの輝度値の波形 YOに類似しているため、ブロック B 0とブロック B1間の評価値 DFD (Yl)は、ブロック BOとブロック B2間の評価値 DFD ( Y2)よりも小さくなる。したがって、正しい動きベクトルである動きベクトル vlの信頼度 は、誤った動きベクトル v2の信頼度より高いと判定される。
[0080] しかしながら、図 9の右側のグラフに示されるように、フレーム t+ 1上のブロック B1 に光源の移動や影の通過などがあり、ブロック B1のみがそれらの影響を受けた場合 、波形 Y1であったブロック B1の輝度値は、波形 Y11に示されるように、輝度レベル が全体的に(平均的に)大きく変化してしまう。すなわち、ブロック B1の輝度値の波形 Y11は、左側のグラフの波形 Y1から平均輝度値レベルの変化量だけ離れてしまい、 結果的に、波形 YOと波形 Y11の間の斜線の部分に示されるように、ブロック B2の輝 度値の波形 Y2よりも、ブロック BOの輝度値の波形 YOから離れてしまう。
[0081] したがって、平均輝度値レベルの変化量がオフセットとして重畳されてしまい、この 場合のブロック BOとブロック B1間の評価値 DFD (Yl l)は、ブロック BOとブロック B2 間の評価値 DFD (Y2)よりも大きくなつてしま 、、正し 、動きベクトルである動きべタト ル vlの信頼度は、誤った動きベクトル v2の信頼度より低いと判定されてしまう。
[0082] 以上のように、光源の移動や影の通過などにより、動き Vを持つ物体の平均輝度レ ベルが大きく変化する場合には、平均輝度レベルの変化量がオフセットとして評価値 DFDに重畳されるため、評価値 DFDが大きくなつてしまい、真の動き量 Vに対する信 頼度が低くなつてしまう。
[0083] そこで、評価値 DFDの代わりに、信号処理装置 1のベクトル検出部 52においては 、動きベクトルに対する評価値の他の例として、評価値 DFDと同様に評価対象となる ベクトルの始点と終点を含むブロック間で演算される差分分散(dfv: difference varian ce)が用いられて、後段の処理に最適な動きベクトルが選択される。評価対象となる 動きベクトルを Vとすると、差分分散は、次の式(2)で表される。 dfvt (p) =∑ { Ft+i ( χ, y+v)一 Ft+i (Ρχ, y+v) J - Ft Cpx, y)一 Ft (px
[0085] ここで、
[数 3]
Ft (P)
は、 m X n画素の差分分散の演算範囲における輝度値の平均を表して 、る。
[0086] なお、差分分散は、実際には、式(2)からもわかるように、時刻 t+ 1における画素位 置 p +vの輝度値および時刻 t+ 1における画素位置 p +vの演算範囲における輝度 値の平均の差分から、時刻 tにおける画素位置 pの輝度値および時刻 tにおける画素 位置 Pの演算範囲における輝度値の平均の差分を引いたものの自乗和である力 式 (2)を展開していくことにより、演算ブロック内の輝度値差分の分散の式 (後述する式 (5) )になることから、差分分散と称される。
[0087] 差分分散も、評価値 DFDと同様に、フレーム間のブロックの波形の一致度をべタト ルの信頼度とする評価値であり、値が小さ 、ほどベクトル Vの信頼度が高 、と判定す ることがでさる。
[0088] 図 10は、平均輝度レベル変化時の差分分散について説明する図である。なお、図 10は、図 9を参照して説明した評価値 DFDの例に対応する差分分散 dfvの例が示さ れており、図 10の例においては、図 9の例の場合と同様に、図 8のブロック BO、ブロッ ク Bl、およびブロック B2を用いて説明する。
[0089] 図 10の左側のグラフには、図 9の場合と同様に、一般的な場合 (すなわち、フレー ム間において、光源の移動や影の通過などが無い場合)における図 8のブロック BO、 ブロック Bl、およびブロック B2のそれぞれの(画素)位置における輝度値の波形 YO、 Yl、および Υ2が示されており、右側のグラフには、フレーム t+ 1上のブロック B1に 光源の移動や影の通過などがあり、ブロック B1がそれらの影響を受けた場合におけ る図 8のブロック BO、ブロック Bl、およびブロック B2のそれぞれの(画素)位置におけ る輝度値の波形 YO、 Yl l、および Υ2が示されている。 [0090] 図 10の左側のグラフに示されるように、一般的な場合には、ブロック B1の輝度値の 波形 Y1は、波形 Y0と波形 Y1の間の斜線の部分に示されるように、ブロック B2の輝 度値の波形 Y2よりも、ブロック BOの輝度値の波形 YOに類似しているため、図 9の評 価値 DFDの場合と同様に、ブロック BOとブロック B1間の差分分散である dfv(Yl)は 、ブロック BOとブロック B2間の差分分散である dfv(Y2)よりも小さくなる。したがって、 正し 、動きベクトルである動きベクトル vlの信頼度は、誤った動きベクトル v2の信頼 度より高いと判定される。
[0091] 一方、図 10の右側のグラフに示されるように、フレーム t+ 1上のブロック B1に光源 の移動や影の通過などがあり、ブロック B1のみがそれらの影響を受けた場合、波形 Y 1であったブロック B1の輝度値は、波形 Y11に示されるように、輝度レベルが全体的 に(平均的に)大きく変化してしまう。すなわち、ブロック B1の輝度値の波形 Y11は、 波形 Y1から平均輝度値レベルの変化量だけ離れてしまい、結果的に、ブロック B2の 輝度値の波形 Y2よりも、ブロック BOの輝度値の波形 YO力も離れてしまう。
[0092] ここで、図 10の右のグラフには、さら〖こ、点線で示される波形 Z1と、波形 Z2が示さ れている。波形 Z1は、波形 Y11から、波形 Y11および波形 YOの差分の平均を差し 引いた輝度値の波形を表しており、波形 Z2は、波形 Y2から、波形 Y2および波形 YO の差分の平均を差し引 、た輝度値の波形を表して 、る。
[0093] 式(2)で示されるように、差分分散は、各フレーム毎に演算ブロック内の輝度値平 均をオフセットとして差し引いた輝度値の自乗和、すなわち、各フレーム毎に演算ブ ロック内の輝度値平均をオフセットとして差し引 、た統計量である。
[0094] したがって、図 10の右のグラフにおける斜線部分である波形 YOと波形 Z1の差分は 、波形 YOから、波形 Y11と、波形 Y11および波形 YOの差分の平均との差分を引い たもの、すなわち、ブロック BOとブロック B1間の差分分散である dfv(Yl l)を求める 式(2)の自乗和の括弧内の部分を表しており、波形 YOから、波形 Y2と、波形 Y2お よび波形 YOの差分の平均との差分を引いたもの、すなわち、ブロック BOとブロック B 2間の差分分散である dfv(Y2)を求める式(2)の自乗和の括弧内の部分を表す、波 形 YOと波形 Z2の差分よりも値が小さ 、。
[0095] このように、光源の移動や影の通過などにより、動き Vを持つ物体の平均輝度レべ ルが大きく変化する場合であっても、ブロック BOとブロック B1間の差分分散である df v (Yl l)は、ブロック BOとブロック B2間の差分分散である dfv (Y2)よりも小さい。した がって、正しい動きベクトルである動きベクトル vlの信頼度は、誤った動きベクトル v2 の信頼度より高いと判定される。
[0096] 以上により、 DFDを評価値として用いたときに対応することが困難であった、フレー ム間の平均輝度レベルが変化する場合であっても、差分分散 (以下、評価値 dfvとも 称する)を評価値として用いることにより、ベクトルの信頼度の評価を正しく行うことが 可會 になる。
[0097] なお、評価値 dfvは、式(2)に示されるように、二乗和の式であるため、乗算器を用 いる必要があり、評価値 DFDを演算する場合よりもハードウェア上の回路規模が大き くなつてしまう。
[0098] そこで、二乗を用いな!/、評価値、かつ、差分分散 (評価値 dfv)の特徴である、平均 輝度レベル変化に対応した動きベクトルの評価値として、輝度平均オフセットを考慮 した DFD (以下、 mDFD (mean DFD)と称する)も挙げられる。 mDFDは、式(3)で 表される。
[0099] [数 4]
m x n
mDFDt Cp) = 2 (Ft+1 χ y+v) - Ft+i (ρχ y+v)J - Ft (px y) - Ft ^px y)j
•••(3)
[0100] mDFDも、差分分散と同様に、平均輝度レベルを考慮した波形の一致度を表して おり、フレーム間で平均輝度レベルが大きく変化する場合に対応した動きベクトルの 評価値となる。したがって、以下、 mDFDを評価値 mDFDとも称する。
[0101] さらに、評価値 mDFDについて詳しく説明する。
[0102] 図 11は、評価値 mDFDを演算する評価値演算部 61 Aの構成例を示すブロック図 である。
[0103] なお、図 11の例は、ブロック位置演算部 71、輝度値取得部 72、差分絶対値演算 部 73および積和演算部 74が設けられている点で図 6の評価値演算部 61と共通して いるが、積和演算部 81— 1および 81— 2、平均値算出部 82— 1および 82— 2、並び に、差分演算部 83— 1および 83— 2が追加されている点で図 6の評価値演算部 61と 異なっている。
[0104] 図 11の例において、輝度値取得部 72は、図示せぬフレーム tのフレームメモリから 、入力されたフレーム tのブロック位置に対応する輝度値を取得し、取得したフレーム tの輝度値を積和演算部 81— 1および差分演算部 83— 1に出力する。また、輝度値 取得部 72は、フレーム t+ 1のフレームメモリ 51から、入力されたフレーム t+ 1のブロ ック位置に対応する輝度値を取得し、取得したフレーム t+ 1の輝度値を、積和演算 部 81— 2および差分演算部 83— 2に出力する。
[0105] 積和演算部 81— 1は、フレーム tのブロック内の全画素の輝度値を積算し、積算し た輝度値を平均値算出部 82— 1に出力する。平均値算出部 82— 1は、積和演算部 81— 1からの積算された輝度値を用いて、ブロック内の輝度平均値を算出し、算出し たブロック内の輝度平均値を差分演算部 83— 1に出力する。
[0106] 差分演算部 83— 1は、輝度値取得部 72からの輝度値と平均値算出部 82— 1から のブロック内の輝度平均値を用いて、フレーム tのブロック内の各画素とブロック内の 輝度平均値の差分を算出し、算出したフレーム tの差分を差分絶対値演算部 73に出 力する。
[0107] 積和演算部 81— 2、平均値算出部 82— 2、および差分演算部 83— 2は、フレーム t
+ 1に対して、積和演算部 81— 1、平均値算出部 82— 1、および差分演算部 83— 1 と同様の処理を行う。
[0108] すなわち、積和演算部 81— 2は、フレーム t+ 1のブロック内の全画素の輝度値を 積算し、積算した輝度値を平均値算出部 82— 2に出力する。平均値算出部 82— 2 は、積和演算部 81— 2からの積算された輝度値を用いて、ブロック内の輝度平均値 を算出し、算出したブロック内の輝度平均値を差分演算部 83— 2に出力する。
[0109] 差分演算部 83— 2は、輝度値取得部 72からの輝度値と平均値算出部 82— 2から のブロック内の輝度平均値を用いて、フレーム t+ 1のブロック内の各画素とブロック 内の輝度平均値の差分を算出し、算出したフレーム t+ 1の差分を差分絶対値演算 部 73に出力する。
[0110] 図 11の例において、差分絶対値演算部 73は、差分演算部 83— 1からのフレーム t のブロック内の輝度値、および差分演算部 832からの t+ 1のブロック内の輝度値 を用いて、輝度差分絶対値を演算し、演算した輝度差分絶対値を、積和演算部 74 に出力する。積和演算部 74は、差分絶対値演算部 73により演算された輝度差分絶 対値を積算することで、評価値 mDFDを取得し、取得した評価値 mDFDを後段に出 力する。
[0111] 次に、図 12および図 13のフローチャートを参照して、図 11の評価値演算部 61Aの 評価値演算処理を説明する。
[0112] 評価値演算部 61 Aには、前段から、フレーム tのブロック (DFD演算範囲)位置と評 価対象となる動きベクトルとが入力される。ブロック位置演算部 71は、フレーム tのブ ロック位置と評価対象となる動きベクトルが入力されると、ステップ S31において、入 力されたフレーム tのブロック位置と動きベクトルを用いて、フレーム t+ 1のブロック位 置を算出し、輝度値取得部 72に出力する。
[0113] 輝度値取得部 72は、ステップ S32において、入力されたフレーム tおよびフレーム t
+ 1のブロック位置に基づ 、て、各ブロック(DFD演算範囲)の画素の輝度値を取得 し、取得したフレーム tの画素の輝度値を積和演算部 81— 1に出力し、取得したフレ ーム t+ 1の画素の輝度値を積和演算部 81—2に出力する。なお、このとき、輝度値 取得部 72は、取得したフレーム tの画素の輝度値を差分演算部 83— 1にも出力し、 フレーム t+ 1の画素の輝度値を差分演算部 83— 2にも出力する。
[0114] 積和演算部 81—1は、ステップ S33において、輝度値取得部 72からのフレーム tの 画素の輝度値を積算し、ステップ S34において、ブロック内の全画素に対して処理が 終了したか否かを判定する。ステップ S34において、ブロック内の全画素に対して処 理が終了していないと判定された場合、処理は、ステップ S32に戻り、それ以降の処 理が繰り返される。すなわち、ブロックの次の画素に対しての処理が行われる。
[0115] ステップ S34において、ブロック内の全画素に対して処理が終了したと判定された 場合、積和演算部 81— 1は、フレーム tのブロック内の全画素の輝度値を積算した値 を、平均値算出部 82— 1に出力する。
[0116] 平均値算出部 82— 1は、ステップ S35において、積和演算部 81— 1からの積算さ れた輝度値を用いて、フレーム tのブロック内の輝度平均値を算出し、算出したブロッ ク内の輝度平均値を差分演算部 83— 1に出力する。
[0117] 差分演算部 83— 1は、図 13のステップ S36において、輝度値取得部 72からの輝 度値と平均値算出部 82— 1からのブロック内の輝度平均値を用いて、フレーム tのブ ロック内の各画素とブロック内の輝度平均値の差分を算出し、算出したフレーム tの差 分を差分絶対値演算部 73に出力する。
[0118] なお、説明は繰り返しになるので便宜上、省略するが、上述したステップ S32乃至 S 36の処理は、積和演算部 81— 2、平均値算出部 82— 2、および差分演算部 83— 2 においても、フレーム t+ 1に対して同様に実行される。したがって、ステップ S37にお V、て、差分演算部 83— 1によりフレーム tのブロック内の各画素とブロック内の輝度平 均値の差分が算出され、差分絶対値演算部 73に出力される。
[0119] 差分絶対値演算部 73は、ステップ S38において、差分演算部 83— 1および差分 演算部 83— 2からの輝度差分絶対値を積算し、ステップ S39において、ブロック内の 全画素に対して処理が終了したか否かを判定する。ステップ S38において、ブロック 内の全画素に対して処理が終了していないと判定された場合、処理は、ステップ S3 6に戻り、それ以降の処理が繰り返される。すなわち、ブロックの次の画素に対しての 処理が行われる。
[0120] 一方、ステップ S39において、ブロック内の全画素に対して処理が終了したと判定 された場合、積和演算部 74は、ステップ S40において、輝度差分絶対値を積算した 結果である輝度平均オフセットを考慮した DFD (すなわち、 mDFD)を取得し、評価 値 mDFDとして後段に出力する。
[0121] 以上により、評価値演算処理は終了され、フレーム間で平均輝度レベルが大きく変 化する場合に対応した動きベクトルの評価値としての、評価値 mDFDが求められる。
[0122] このように、評価値 mDFDを演算する図 11の評価値演算部 61Aは、乗算器を必要 としないため、ハードウェア上、回路規模を大きくする必要がない。
[0123] しかしながら、評価値 mDFDの演算処理においては、式(3)および図 12からも明ら かなように、ー且、各ブロック内の平均輝度値を演算し、各ブロック内の平均輝度値 が確定した後で、ブロック内の各画素の輝度値から、対応する平均輝度値を減じて、 その差分を積算するという順序を取らなければならない。すなわち、評価値 mDFDの 演算処理においては、各ブロック内の平均輝度値が確定するまで、次の処理を行うこ とができない。
[0124] ここで、再度、式 (2)で表される差分分散について説明する。次の式 (4)は、画素 位置 Px,yにおける Vによるフレーム間差分を表している。
[0125] [数 5]
Dt (PX, y, V) = Ft + 1 χ, γ + V) " Ft (PX, y)
•••(4)
[0126] 上述した差分分散 dfvの式 (2)を、上述した式 (4)を用いて変形すると、差分分散 は、次の式(5)で表される。
[0127] [数 6]
Figure imgf000027_0001
•••(5)
[0128] 式 (5)は、差分分散が評価値演算ブロック内の輝度値 Dtの分散であることを示して いる。したがって、式(5)は、分散の式の展開から、式 (6)のように変形できる。
[0129] [数 7]
Figure imgf000027_0002
•••(6)
[0130] この式 (6)に示されるように、差分分散は、差分自乗和 (差分二乗和)の項と差分和 の二乗の項に分離することが可能である。すなわち、差分分散を演算する際には、 各項を並列に演算させるように、差分分散の演算部を構成することができる。
[0131] 図 14は、差分分散 (すなわち、評価値 dfv)を演算する評価値演算部 61Bの構成 例を示すブロック図である。
[0132] なお、図 14の例は、ブロック位置演算部 71、および輝度値取得部 72が設けられて いる点で図 6の評価値演算部 61と共通しているが、差分絶対値演算部 73および積 和演算部 74の代わりに、差分演算部 91、差分和二乗演算部 92、差分二乗和演算 部 93、乗算器 94、および差分演算部 95が追加されている点で図 6の評価値演算部 61と異なって!/ヽる。
[0133] 図 14の例において、輝度値取得部 72は、図示せぬフレーム tのフレームメモリから 、入力されたフレーム tのブロック位置に対応する輝度値を取得し、フレーム t+ 1のフ レームメモリ 51から、入力されたフレーム t+ 1のブロック位置に対応する輝度値を取 得し、取得した各輝度値を、差分演算部 91に出力する。
[0134] 差分演算部 91は、対象となる画素の輝度値差分を演算し、演算した輝度値差分を 、差分和二乗演算部 92、および差分二乗和演算部 93に出力する。
[0135] 差分和二乗演算部 92は、積和演算部 92aおよび乗算器 92bにより構成される。積 和演算部 92aは、差分演算部 91からの輝度値差分をブロック分積算し、積算した輝 度値差分 (輝度値差分和)を乗算器 92bに出力する。乗算器 92bは、積和演算部 92 aからの輝度値差分和を二乗し、輝度値差分和二乗を差分演算部 95に出力する。
[0136] 差分二乗和演算部 93は、乗算器 93aおよび積和演算部 93bにより構成される。乗 算器 93aは、差分演算部 91からの輝度値差分の二乗を演算し、演算した輝度差分 二乗を積和演算部 93bに出力する。積和演算部 93bは、輝度差分二乗をブロック分 積算し、積算した輝度値差分二乗 (輝度値差分二乗和)を、乗算器 94に出力する。
[0137] 乗算器 94には、図示せぬ制御部などから予めブロック内画素数が入力されている 。乗算器 94は、ブロック内画素数と輝度差分値二乗和を乗算し、差分演算部 95に出 力する。
[0138] 差分演算部 95は、乗算器 92bからの輝度値差分和二乗から、乗算器 94からの、ブ ロック内画素数を乗算した輝度差分値二乗和を減算することで、差分分散を取得し、 評価値 dfvとして後段に出力する。
[0139] 次に、図 15のフローチャートを参照して、図 14の評価値演算部 61Bの評価値演算 処理を説明する。
[0140] 評価値演算部 61Bには、前段から、フレーム tのブロック (DFD演算範囲)位置と評 価対象となる動きベクトルとが入力される。ブロック位置演算部 71は、フレーム tのブ ロック位置と評価対象となる動きベクトルが入力されると、ステップ S51において、入 力されたフレーム tのブロック位置と動きベクトルを用いて、フレーム t+ 1のブロック位 置を算出し、輝度値取得部 72に出力する。
[0141] 輝度値取得部 72は、ステップ S52において、入力されたフレーム tおよびフレーム t
+ 1のブロック位置に基づいて、各フレームのブロック(DFD演算範囲)の画素の輝 度値を取得し、取得した各輝度値を差分演算部 91に出力する。
[0142] 差分演算部 91は、ステップ S53において、対象となる画素の輝度値差分を演算し
、演算した輝度値差分を、差分和二乗演算部 92および差分二乗和演算部 93に出 力する。
[0143] ステップ S54においては、輝度値差分が演算され、輝度値差分二乗が積算される。
すなわち、差分和二乗演算部 92の積和演算部 92aは、ステップ S54において、差分 演算部 91からの輝度値差分を積算する。このとき、並行して、差分二乗和演算部 93 の積和演算部 93bは、差分演算部 91からの輝度差分が乗算器 93aにより演算され た輝度値差分二乗を積算する。
[0144] 積和演算部 92aおよび積和演算部 93bは、ステップ S55において、ブロック内の全 画素に対して処理が終了したか否かを判定する。ステップ S55において、ブロック内 の全画素に対して処理が終了していないと判定された場合、処理は、ステップ S52に 戻り、それ以降の処理が繰り返される。すなわち、ブロックの次の画素に対しての処 理が行われる。
[0145] 一方、ステップ S55において、ブロック内の全画素に対して処理が終了したと判定 された場合、積和演算部 92aは、積算した輝度値差分 (輝度値差分和)を乗算器 92 bに出力し、積和演算部 93bは、積算した輝度値差分二乗 (輝度値差分二乗和)を、 乗算器 94に出力する。
[0146] ステップ S56においては、輝度値差分和二乗が演算され、ブロック内画素数と、輝 度値差分二乗和が演算される。すなわち、差分和二乗演算部 92の乗算器 92bは、 ステップ S56において、積和演算部 92aからの輝度値差分和を二乗し、輝度値差分 和二乗を差分演算部 95に出力する。このとき、並行して、乗算器 94は、ブロック内画 素数と輝度差分値二乗和を乗算し、差分演算部 95に出力する。 [0147] 差分演算部 95は、ステップ S57において、乗算器 92bからの輝度値差分和二乗か ら、ブロック内画素数を乗算した輝度差分値二乗和を減算し、ステップ S58において 、減算した結果である差分分散を取得し、評価値 dfvとして後段に出力する。
[0148] 以上により、評価値演算処理は終了され、フレーム間で平均輝度レベルが大きく変 化する場合に対応した動きベクトルの評価値としての、評価値 dfvが求められる。
[0149] したがって、差分分散を評価値として用いることにより、フレーム間の平均輝度レべ ルが大きく変化する場合にも、信頼度の高いベクトルの評価を行うことが可能になる。
[0150] また、この差分分散を演算する評価値演算処理にお!、ては、ステップ S54およびス テツプ S56において、差分和二乗演算部 92と差分二乗和演算部 93が並列で演算 処理を行うことができる。したがって、図 14の評価値演算部 61Bに示されるように、差 分分散は、乗算器を必要とするため、ハードウ ア実装が大きくなつてしまうが、その 反面、回路を並列化することができるので、 mDFDと比較して演算処理時間を短縮 することが可能になる。
[0151] 以上より、以降、信号処理装置 1のベクトル検出部 52においては、動きベクトルが 選択される場合の評価値として、評価値 DFDの代わりに評価値 dfvが用いられ、そ の他のベクトル割付部 54、および割付補償部 57においては、動きベクトルが選択さ れる場合の評価値として、特に言及しない場合には、差分絶対値和(以下、評価値 D FDと称する)が用いられることとする。
[0152] したがって、ベクトル検出部 52は、内部に評価値演算部 61Bを有することとして説 明し、ベクトル割付部 54、および割付補償部 57は、内部に評価値演算部 61を有す ることとして説明していく。
[0153] なお、もちろん、ベクトル検出部 52に限らず、ベクトル割付部 54、または割付補償 部 57にお 、ても評価値 DFDの代わりに評価値 dfvが用いられるように構成してもよ い。
[0154] 次に、図 16のフローチャートを参照して、信号処理装置 1のフレーム周波数を変換 する処理を説明する。
[0155] ステップ S81において、ベクトル検出部 52は、時刻 t+ 1の入力画像のフレーム t+ 1と、フレームメモリ 51の入力画像の 1つ前の時刻 tのフレーム tの画素値を入力する 。なお、このとき、ベクトル割付部 54、割付補償部 57および画像補間部 58も、時刻 t + 1の入力画像のフレーム t+ 1と、フレームメモリ 51の入力画像の 1つ前の時刻 tの フレーム tの画素値を入力する。
[0156] ステップ S82において、ベクトル検出部 52は、動きベクトル検出処理を実行する。
すなわち、ベクトル検出部 52は、フレームメモリ 51上のフレーム tの着目ブロックと、 入力画像である次のフレーム t+ 1の対象ブロックの間で動きベクトルを検出し、検出 した動きベクトルを、検出ベクトルメモリ 53に記憶する。この 2フレーム間の動きべタト ルの検出方法には、勾配法またはブロックマッチング法などが用いられる。
[0157] また、動きベクトルの候補が複数ある場合には、ベクトル検出部 52においては、評 価値演算部 61Bにより、各動きベクトルに対して、評価値 dfv (差分分散)が求められ 、求められた評価値 dfvに基づいた信頼度の高い動きベクトルが検出される。すなわ ち、この場合、動きベクトルを検出する着目ブロックにおいて、最も確力もしい動きべ タトルが選択され、検出される。ステップ S82における、動きベクトル検出処理の詳細 は、図 20を参照して後述する。
[0158] ステップ S83にお 、て、ベクトル割付部 54は、ベクトル割付処理を実行する。すな わち、ベクトル割付部 54は、ステップ S83において、フレーム t上において求められた 動きベクトルを、割付ベクトルメモリ 55上の、補間する内挿フレーム上の着目画素に 割り付け、動きベクトルが割り付けられた画素の割付フラグメモリ 56の割付フラグを 1( True)に書き換える。例えば、 Trueである割付フラグは、対応する画素に動きベクトル が割り付けられていることを示し、 Falseである割付フラグは、対応する画素に動きべク トルが割り付けられて 、な 、ことを示す。
[0159] なお、各画素において、動きベクトルの候補が複数ある場合には、ベクトル割付部 5 4においては、評価値演算部 61により、各動きベクトルに対して、評価値 DFDが求め られ、求められた評価値 DFDに基づ 、た信頼度の高!、動きベクトルが割り付けられ る。すなわち、この場合、動きベクトルを割り付ける着目画素において、最も確カゝらし い動きベクトルが選択され、割り付けられる。ステップ S83における、ベクトル割付処 理の詳細は、図 73を参照して後述する。
[0160] ステップ S84にお ヽて、割付補償部 57は、割付補償処理を実行する。すなわち、 割付補償部 57は、ステップ S84において、割付フラグメモリ 56の割付フラグを参照し 、ベクトル割付部 54により動きベクトルが割り付けられな力つた着目画素に対して、そ の着目画素の周辺画素の動きベクトルを補い、割付ベクトルメモリ 55の内挿フレーム 上に割り付ける。このとき、割付補償部 57は、動きべ外ルを補い、割付けた着目画 素の割付フラグを l(True)に書き換える。
[0161] なお、周辺画素の動きベクトルが複数ある場合には、割付補償部 57においては、 各動きベクトルに対して、評価値演算部 61により、評価値 DFDが求められ、求めら れた評価値 DFDに基づいた、信頼度の高い動きベクトルが割り付けられる。すなわ ち、この場合、動きベクトルを割り付ける着目画素において、最も確からしい動きべク トルが選択され、割り付けられる。ステップ S84における、割付補償処理の詳細は、図 76を参照して後述する。
[0162] ステップ S85にお ヽて、画像補間部 58は、画像補間処理を実行する。すなわち、 画像補間部 58は、ステップ S85において、割付ベクトルメモリ 55の内挿フレームに割 り付けられた動きベクトルと、フレーム tおよびフレーム t+ 1の画素値を用いて、内挿 フレームの画素値を補間生成する。ステップ S85〖こおける、画像補間処理の詳細は 、図 79を参照して後述する。画像補間部 58は、ステップ S86において、生成された 内挿フレームを出力し、その次に、必要に応じて、フレーム t+ 1を出力することにより 、 60P信号の画像を、図示せぬ後段に出力する。
[0163] ステップ S87において、ベクトル検出部 52は、すべてのフレームの処理が終了した か否かを判定し、すべてのフレームの処理がまだ終了していないと判定した場合、ス テツプ S81に戻り、それ以降の処理を繰り返す。一方、ベクトル検出部 52は、ステツ プ S87において、すべてのフレームの処理が終了したと判定した場合、フレーム周波 数を変換する処理を終了する。
[0164] 以上のように、本発明に係る信号処理装置 1は、 24P信号の入力画像のフレームか ら動きベクトルを検出し、検出した動きベクトルを、 60P信号のフレーム上の画素に割 付け、割付けられた動きベクトルに基づいて、 60P信号のフレーム上の画素値を生成 する。
[0165] このとき、信号処理装置 1は、ベクトル検出処理において、評価値 dfv (差分分散) に基づぐより信頼度の高い動きベクトルを選択し、後段に出力する。したがって、信 号処理装置 1においては、動きベクトルを求めるフレーム間で平均輝度レベルが大き く変化してしまっても、動きベクトルの信頼度の評価を正しく行うことが可能になる。こ れにより、動きが破綻することなどが抑制され、より精度のよい画像を生成することが できる。
[0166] 次に、ベクトル検出部 52の構成の詳細について説明する。
[0167] 図 17は、ベクトル検出部 52の構成を示すブロック図である。図 17に構成を示すベ タトル検出部 52は、入力される時刻 tの画像のフレーム tと、時刻 t+ 1の画像のフレ ーム t+ 1を用いて、フレーム t上の動きベクトルを検出し、検出した動きベクトルを、検 出ベクトルメモリ 53に記憶する。この動きベクトルを検出する処理は、複数の画素から なる所定のブロック毎に実行される。
[0168] 初期ベクトル選択部 101は、所定のブロック毎に、過去の動きベクトルの検出結果 力も求められる信頼度が高い動きベクトルを、勾配法に用いられる初期値となる初期 ベクトル VOとして、反復勾配法演算部 103に出力する。具体的には、初期ベクトル選 択部 101は、検出ベクトルメモリ 53に記憶される過去に求められた周辺のブロックの 動きベクトルや、シフト初期ベクトルメモリ 107に記憶されるシフト初期ベクトルを、初 期ベクトルの候補ベクトルとして選択する。そして、初期ベクトル選択部 101は、図 14 を参照して上述した評価値演算部 61Bを有しており、評価値演算部 61Bに、フレー ム tとフレーム t+ 1を用いて、候補ベクトルの評価値 dfvを求めさせ、候補ベクトルの 中から、評価値演算部 61Bにより求められた評価値 dfvに基づぐ最も信頼度が高い ものを選択し、初期ベクトル VOとして出力する。なお、初期ベクトル選択部 101の構 成の詳細は、図 23を参照して後述する。
[0169] プリフィルタ 102—1および 102— 2は、ローパスフィルタやガウシアンフィルタにより 構成され、それぞれ、入力される画像のフレーム tおよびフレーム t+ 1のノイズ成分を 除去し、反復勾配法演算部 103に出力する。
[0170] 反復勾配法演算部 103は、初期ベクトル選択部 101から入力された初期ベクトル V 0と、プリフィルタ 102—1および 102— 2を介して入力されるフレーム tおよびフレーム t+ 1を用いて、所定のブロック毎に、勾配法により、動きベクトル Vnを算出する。反 復勾配法演算部 103は、初期ベクトル VOと、算出された動きベクトル Vnをベクトル評 価部 104に出力する。また、反復勾配法演算部 103は、ベクトル評価部 104による動 きベクトルの評価結果に基づいて、勾配法の演算を繰り返し行い、動きベクトル Vnを 算出する。
[0171] ベクトル評価部 104も、評価値演算部 61Bを有しており、評価値演算部 61Bに、反 復勾配法演算部 103からの動きベクトル Vn— 1 (または初期ベクトル V0)と、動きべク トル Vnの評価値 dfvを求めさせ、評価値演算部 61Bにより求められた評価値 dfvに 基づいて、反復勾配法演算部 103を制御し、勾配法の演算を繰り返し実行させ、最 終的に、評価値 dfvに基づぐ信頼性の高いものを選択し、選択した動きベクトル Vを 、検出ベクトルメモリ 53に記憶させる。
[0172] このとき、ベクトル評価部 104は、動きベクトル Vとともに、その動きベクトル Vに対し て求められた評価値 dfvを、シフト初期ベクトル割付部 105に供給する。なお、反復 勾配法演算部 103およびベクトル評価部 104の構成の詳細は、図 25を参照して後 述する。
[0173] シフト初期ベクトル割付部 105は、ベクトル評価部 104より動きベクトル Vおよびその 評価値 dfvが供給されると、次のフレーム上の着目ブロックを通過する動きベクトルを 、その着目ブロックにシフトさせた、シフト初期ベクトルとして設定する。換言すると、シ フト初期ベクトル割付部 105は、動きベクトル Vの終点のブロックと同じ位置の次のフ レーム上の着目ブロックを始点とした、動きベクトル Vと同じ大きさで同じ向きの動きべ タトルを、シフト初期ベクトルとして設定する。そして、シフト初期ベクトル割付部 105 は、設定したシフト初期ベクトルを、着目ブロックに対応させて、シフト初期ベクトルメ モリ 107に割り付ける。
[0174] 具体的には、シフト初期ベクトル割付部 105は、シフト初期ベクトルとして割り付けら れた動きベクトル Vの評価値 dfvを、着目ブロックに対応させて、評価値メモリ 106に 記憶させておき、同じ着目ブロックを通過する(すなわち、着目ブロックと同じ位置の 過去のフレームのブロックを終点とする)他の動きベクトル Vの評価値 dfvと比較する。 そして、シフト初期ベクトル割付部 105は、評価値 dfvに基づぐ信頼度が高いとされ た動きベクトル Vを、着目ブロックにシフトさせ、着目ブロックのシフト初期ベクトルとし て、シフト初期ベクトルメモリ 107に割り付ける。なお、シフト初期ベクトル割付部 105 の構成の詳細は、図 21を参照して後述する。
[0175] 次に、ベクトル検出部 52において用いられる勾配法の原理について説明する。ま ず、動画像中において、水平、垂直、時間軸を用いた座標 (X, y, t)で表される画素 の輝度値を g (X, y, t)とする。ここで、着目画素 (X , y , t )が、微小時間中に、 (dx,
0 0 0
dy, dt)だけ変位したとき、水平、垂直、時間軸の勾配 (差分差)を、それぞれ gx (x ,
0 y , t ) , gy (x , y , t ) , gt (x , y , t )と表すと、変位後の画素の輝度値は、 Taylor展
0 0 0 0 0 0 0 0
開近似を用いて、次の式(7)で表される。
[0176] [数 8]
g (xo+dx, yo+dy, t0+dt)
- g (xo, Υο, to) +gx (xo, y。, to) dx+gy (xo, y。, t0) dy+gt (x0, y0, t0) dt
•••(7)
[0177] ここで、動画像中のある着目画素が 1フレーム後に水平 vx,垂直 vyだけ移動した場 合 (以降、(vx, vy)と表す)、その画素の輝度値は、次の式 (8)で表される。
[0178] [数 9]
g (xo+vx, yo+vy, to+1 ) =g (xo, yo, to)
•••(8)
[0179] 式(7)を式 (8)に代入すると、次の式(9)で表される。
[0180] [数 10] gx ίχο, Yo- to) vx+gv (xo, y0, to) vy+gt (xo, y0, to) =0
•••(9)
[0181] 式(9)は、 vx, vyの 2変数の式であるので、着目 1画素に対する単独の式では、そ の解を求めることができない。そこで、次に説明するように、着目画素の周辺領域で あるブロックを 1つの処理単位として考え、ブロック (周辺領域)内の全画素が同じ動き (vx, vy)をすると仮定し、各画素について同様の式を立てる。仮定が前提となるが、 2変数に対して周辺画素の個数の式が得られる。したがって、それらの式を連立させ 、ブロック内全画素の動き補償フレーム差分の自乗和が最小になるような (vx, vy)を 求める。 [0182] 画素 (x, y, t)カ^フレーム間に (vx, vy)だけ移動したとき、その動き補償フレーム 間差分 dは、次の式(10)で表される。
[0183] [数 11]
d=g ix+vx, y+vy, t+1 )— g (x, y, t)
•••do)
[0184] 式(10)において、 A x=gx (x, y, t)であり、水平方向の勾配を表し、 Ay=gy(x, y , t)であり、垂直方向の勾配を表し、 A t=gt (x, y, t)であり、時間方向の勾配を表 す。これらを用いて、動き補償フレーム間差分の自乗和を Eとすると、式(11)で表さ れる。
[0185] [数 12]
E=∑d2
=∑(Δχ2νχ2+Δγ2νγ2+2ΔχΔγ νχ vy
+2ΔχΔί νχ+2Δγ At vy+Δί;つ
-νχ2∑ Ax2+vy2∑ Δγ2+2νχ vy∑AxAy
+2vx∑AxAt+2vy∑AyAt+∑At2
•••(11)
[0186] ここで、 Εが最小となる (νχ, vy)は、各変数における偏微分値が 0になるとき、すな わち、
Figure imgf000036_0001
δ ΕΖ δ νγ=0の条件が成立するときなので、式(11)から、次 の式(12)および式(13)となる。
[0187] [数 13] νχ∑Δχ2+νγ∑ΔχΔγ+∑ΔχΔΐ=0
[0188] [数 14] vy∑Ay^+vx∑AxAy+∑ΔγΔΐ=0 •••(13)
[0189] これらの式(12)および式(13)から、求めたい動きである(vx, vy)は、次の式(14) を演算することにより求めることができる。
[0190] [数 15]
(∑Δν2)(∑ΔΐΔχ)-(∑ΛχΔγ)(∑ΛίΛγ)
VX =
(∑Δχ2)(∑Δγ2)-(∑ΛχΛγ)2
_ (∑Δχ2)(∑ΔΐΔγ)-(∑ΛχΔγ)(∑ΛΐΛχ) (∑Δχ2)(∑Δγ2)-(∑ΛχΛγ)2
•••(14)
[0191] ここで、図 18を参照して、具体的に説明する。図 18の例において、矢印 Xは、水平 方向を示しており、矢印 Υは、垂直方向を示している。また、矢印 Τは、図中、右奥の 時刻 tのフレーム tから、左手前の時刻 t+ 1のフレーム t+ 1への時間の経過方向を 示している。なお、図 18の例においては、各フレームは、着目画素 pの周辺領域 (ブ ロック)として、勾配法演算に用いられる 8画素 X 8画素の領域のみ示されて 、る。
[0192] フレーム tにお!/、て、左上の画素から下に 5番目、右に 5番目の画素である着目画 素 Pの動きベクトル V(vx, vy)を、上述した勾配法を用いて求める場合、動きベクトル V(vx, vy)は、着目画素 pの x, y方向のそれぞれについて求められる隣接画素 pxお よび pyとの輝度の差分差 (すなわち、勾配) Δχおよび Ay、フレーム t+1において求 められる着目画素 Pの同位相に位置する画素 qとの時間方向の輝度の差分差 (勾配) Atを、着目画素 pの周辺領域(8画素 X 8画素)のすベての画素について求め、それ らの差分差を、式(14)を用いて演算することにより、求めることができる。
[0193] すなわち、勾配法とは、 2フレーム間において、勾配 Δχ, Δγ,および Atを求め、 求められた Δχ, Δγ,および Atから、差分自乗和を用いて、統計的に、動きベクトル V(vx, vy)を算出するものである。
[0194] 一般的に、このような勾配法を用いた動きベクトル検出方法においては、微小動き に対して精度の高い結果が得られる。ただし、実際の動画像の中で動きを求めようと するとする場合、この勾配法は、その動き量が大きすぎるため実用的とはいえない。 これに対応して、この勾配法を複数回反復する方法が考えられる。勾配法を反復し て実行することにより、各演算で求められる動き量が収束するため、徐々に正しい動 きが求められる。
[0195] し力しながら、ただ、勾配法を反復するだけでは、リアルタイム処理を行おうとした場 合、演算時間の面から実用的ではない。そこで、ベクトル検出部 52においては、過 去フレームと現在フレームでの周辺画素の動きに基づいて求められる初期ベクトルを
、初期値として用いることで、勾配法の繰り返し回数を軽減している。すなわち、動き の起点となる着目画素から、初期ベクトルが指す先へオフセットを予め加えることで大 ま力な動きを算出し、オフセットが加えられたその位置力も勾配法を用いた演算を行 うようにすれば、画素以下動きを含めた微調整を行うことができる。これにより、演算 時間を増大させることなぐ精度のよい動きベクトルを検出することができる。
[0196] 図 19は、初期ベクトルを用いて実行される反復勾配法について具体的に説明する 図である。図 19の例においては、矢印 Tは、図中、左手前の時刻 tのフレーム tから、 右奥の時刻 t+ 1のフレーム t+ 1への時間の経過を示している。なお、各画素 p, qO , ql, q2,および q3を中心としたブロックは、その画素の、勾配法演算に用いられる 周辺領域 (ブロック)を表して!/ヽる。
[0197] 図 19の例の場合、フレーム tにおける着目画素 pに対して、フレーム t+ 1において は、着目画素 pの同位相に位置する画素 qOではなぐ予め求めておいた初期べタト ル νθをオフセット (移動)して計算した位置 (画素) qlを開始点として 1回目の勾配法 演算が行われ、その結果、動きベクトル vlが得られる。
[0198] 次に、画素 qOから vO+vlをオフセットして計算した位置 (画素) q2を開始点として、 2回目の勾配法演算が行われ、その結果、動きベクトル v2が得られる。これにより、最 終的に動きベクトル Vは、式(15)として求められる。
[0199] V = v0+vl +v2
•••(15)
[0200] 以上のようにして、初期ベクトルを用いて、反復勾配法の演算を実行することにより 、演算時間を短縮させつつ、精度の高い動きベクトルを求めることができる。 [0201] 次に、図 20のフローチャートを参照して、動きベクトル検出処理の詳細について説 明する。ベクトル検出部 52には、入力される時刻 tの画像のフレーム tと、時刻 t+ 1の 画像のフレーム t+ 1が入力される。
[0202] 初期ベクトル選択部 101は、ステップ S101において、フレーム t上の処理の対象と なるブロックを、着目ブロックとして選択する。なお、フレーム上においては、左上のブ ロック力 ラスタスキャン順に処理が実行される。
[0203] ステップ S102において、初期ベクトル選択部 101は、初期ベクトル選択処理を実 行する。初期ベクトル選択部 101は、ステップ S102において、所定のブロック毎に、 過去の動きベクトルの検出結果から、信頼度が高い動きベクトルを選択し、選択した 動きベクトルを、勾配法に用いられる初期値となる初期ベクトル VOとして、反復勾配 法演算部 103に出力する。
[0204] すなわち、初期ベクトル選択部 101は、過去の勾配法演算評価処理 (後述するステ ップ S103)において求められ、検出ベクトルメモリ 53に記憶された周辺ブロックの動 きベクトルや、過去のシフト初期ベクトル割付処理(後述するステップ S 104)において シフト初期ベクトルメモリ 107に記憶されたシフト初期ベクトルを、初期ベクトルの候補 ベクトルとして選択する。そして、初期ベクトル選択部 101は、評価値演算部 61Bに、 フレーム tとフレーム t+ 1を用いて、候補ベクトルの評価値 dfvを求めさせ、候補べタト ルの中から、評価値演算部 61Bにより求められた評価値 dfvに基づいた信頼度が高 いものを選択し、選択された候補ベクトルを、初期ベクトル VOとして出力する。なお、 ステップ S102における、初期ベクトル選択処理の詳細は、図 24を参照して後述する
[0205] ステップ S 103において、反復勾配法演算部 103およびベクトル評価部 104は、反 復勾配法演算評価処理 (なお、反復勾配法演算処理とも称する)を実行する。具体 的には、ステップ S103において、反復勾配法演算部 103は、初期ベクトル選択部 1 01から入力された初期ベクトル VOと、プリフィルタ 102— 1および 102— 2を介して入 力されるフレーム tおよびフレーム t+ 1を用いて、ベクトル評価部 104による動きべク トルの評価結果に基づいて、勾配法の演算を繰り返し行い、動きベクトル Vnを算出 する。また、ベクトル評価部 104は、評価値演算部 61Bに、反復勾配法演算部 103 力 の動きベクトル Vn— 1と、動きベクトル Vnの評価値 dfvを求めさせ、評価値演算 部 61Bにより求められた評価値 dfvに基づぐ最も信頼性の高いものを選択し、動き ベクトル Vとして、検出ベクトルメモリ 53に記憶させる。このとき、ベクトル評価部 104 は、動きベクトル Vとともに、その動きベクトル Vに対して求められた評価値 dfvを、シ フト初期ベクトル割付部 105に供給する。なお、ステップ S103における、反復勾配法 演算処理の詳細は、図 32を参照して後述する。
[0206] ステップ S104において、シフト初期ベクトル割付部 105は、シフト初期ベクトル割付 処理を実行する。シフト初期ベクトル割付部 105は、ベクトル評価部 104より動きべク トル Vおよびその評価値 dfvが供給されると、ステップ S104において、次のフレーム 上の着目ブロックを通過する動きベクトルを、その着目ブロックにシフトさせた、シフト 初期ベクトルとして設定する。すなわち、換言すると、動きベクトル Vの終点のブロック と同 Cf立置の次のフレーム上の着目ブロックを始点とした、動きベクトル Vと同じ大きさ で同じ向きの動きベクトル力 シフト初期ベクトルとして設定される。そして、シフト初 期ベクトル割付部 105は、設定したシフト初期ベクトルを、着目ブロックに対応させて 、シフト初期ベクトルメモリ 107に割り付ける。
[0207] なお、具体的には、シフト初期ベクトル割付部 105は、シフト初期ベクトルとして割り 付けられた動きベクトル Vの評価値 dfvを、着目ブロックに対応させて、評価値メモリ 1 06に記憶させておき、同じ着目ブロックを通過する(すなわち、着目ブロックと同じ位 置の過去のフレームのブロックを終点とする)他の動きベクトル Vの評価値 dfvと比較 し、評価値 dfvに基づぐ信頼度が高いとされた動きベクトル Vを、そのブロックにシフ トさせてシフト初期ベクトルと設定し、シフトさせたブロックに対応させて、シフト初期べ タトルメモリ 107に割り付ける。なお、シフト初期ベクトル割付部 105の構成の詳細は 、図 22を参照して後述する。
[0208] ステップ S105において、初期ベクトル選択部 101は、フレーム tにおいて、すべて のブロックの処理が終了したか否かを判定する。ステップ S105において、すべての ブロックの処理が終了していないと判定された場合、処理は、ステップ S101に戻り、 それ以降の処理が繰り返される。また、ステップ S 105において、フレーム tにおいて、 すべてのブロックの処理が終了したと判定された場合、すなわち、フレーム t上のす ベてのブロックにおいて、動きベクトル Vが検出されたと判定され、動きベクトル検出 処理は、終了される。
[0209] 以上のように、過去に検出された動きベクトル力 初期ベクトルが選択され、選択さ れた初期ベクトルに基づいて、反復勾配法の演算が用いられて、繰り返し動きべタト ルが算出され、算出された動きベクトルの中から、評価値 dfvに基づぐ信頼度が高 い(すなわち、最も確からしい)動きベクトルが検出される。この結果、検出ベクトルメ モリ 53に、フレーム t上のすべてのブロックに対応する動きベクトル Vが記憶される。
[0210] 次に、シフト初期ベクトル割付部 105の構成の詳細について説明する。
[0211] 図 21は、シフト初期ベクトル割付部 105の構成を示すブロック図である。図 21に構 成を示すシフト初期ベクトル割付部 105は、前 (過去)フレームにおいて、ベクトル評 価部 104より検出された動きベクトル Vに基づいて、初期ベクトルの候補ベクトルとな るシフト初期ベクトルを設定し、シフト初期ベクトルメモリ 107に割り付ける処理を行う。 シフト初期ベクトル割付部 105には、ベクトル評価部 104より検出された動きベクトル V、および、その動きベクトル Vの評価値 dfvが入力される。
[0212] 割付対象位置演算部 201は、ベクトル評価部 104より検出された動きベクトル Vが、 次の時刻のフレーム上において通過するブロックの位置(すなわち、現在のフレーム 上において検出された動きベクトル Vの終点のブロックと同じ位置にある次のフレー ム上のブロックの位置)を演算し、演算されたブロックの位置を、評価値メモリ 106お よびシフト初期ベクトル置換部 203に供給する。
[0213] 評価値比較部 202は、動きベクトル V、および、その動きベクトル Vの評価値 dfvが 入力されると、割付対象位置演算部 201からのブロックの位置の評価値 dfvを、評価 値メモリ 106から読み出す。そして、評価値比較部 202は、評価値メモリ 106から読 み出された評価値 dfvと、ベクトル評価部 104により検出された動きベクトル Vの評価 値 dfvとを比較判定する。
[0214] 評価値比較部 202は、検出された動きベクトル Vの評価値 dfvの方が小さ 、(すな わち、信頼度が高い)と判定した場合、シフト初期ベクトル置換部 203を制御し、シフ ト初期ベクトルメモリ 107の、シフト初期ベクトル割付部 105により供給されたブロック の位置のシフト初期ベクトルを、評価値 dfvに基づぐ信頼度が高いと判定した動きべ タトル Vで書き換えさせる。また、それと同時に、評価値比較部 202は、評価値置換 部 204を制御し、評価値メモリ 106において、割付対象位置演算部 201により選択さ れたブロックの位置の評価値 dfvを、動きベクトル Vの評価値 dfvで書き換えさせる。
[0215] シフト初期ベクトル置換部 203は、シフト初期ベクトルメモリ 107の、割付対象位置 演算部 201により供給されたブロックの位置のシフト初期ベクトルを、評価値比較部 2 02から供給される動きベクトル V (すなわち、動きベクトル Vと同じ大きさで同じ向きの 動きベクトル)で書き換える。評価値置換部 204は、評価値比較部 202の制御のもと 、評価値メモリ 106において、割付対象位置演算部 201により選択されたブロックの 位置の評価値 dfvを、動きベクトル Vの評価値 dfvで書き換える。
[0216] 評価値メモリ 106は、次のフレーム上における、各ブロックに割り当てられるシフト初 期候補ベクトルの評価値 dfvをブロック毎に記憶する。シフト初期ベクトルメモリ 107は 、次のフレームにおける各ブロックにおいて最も評価値 dfvが小さい(すなわち、最も 信頼度がある)動きベクトルを、シフト初期ベクトルとして、そのブロックに対応させて feす。。
[0217] 次に、図 22のフローチャートを参照して、シフト初期ベクトル割り付け処理の詳細に ついて説明する。前段において、ベクトル評価部 104は、フレーム t—1上の着目ブロ ックの動きベクトル Vを検出すると、検出された動きベクトル Vとともに、その動きべタト ル Vに対して求めた評価値 dfvを、シフト初期ベクトル割付部 105に供給する。
[0218] ステップ S201において、評価値比較部 202は、ベクトル評価部 104から、動きべク トル Vとともに、その動きベクトル Vの評価値 dfvを入力する。また、このとき、割付対象 位置演算部 201も、動きベクトル Vを入力する。割付対象位置演算部 201は、ステツ プ S202において、動きベクトル Vのフレーム tにおけるオフセット(動き補償)先の割 付対象ブロックの位置を求める。すなわち、割付対象位置演算部 201は、フレーム t 1上において検出された動きベクトル Vの終点のブロックと同 Cf立置にあるフレーム t上のブロックの位置を求める。
[0219] 割付対象位置演算部 201は、ステップ S203において、求められた割付対象ブロッ クのうち、 1つの割付対象ブロックを選択し、選択した割り付け対象ブロックの位置を、 評価値メモリ 106およびシフト初期ベクトル置換部 203に供給する。なお、ステップ S 203においては、割付対象ブロックのうち、フレーム t上において左上のブロックから 順に選択される。
[0220] ステップ S204にお ヽて、評価値比較部 202は、評価値メモリ 106から、割付対象 位置演算部 201により選択された割付対象ブロックの評価値 dfvを取得し、ステップ S 205において、ステップ S 201において入力された動きベクトル Vの評価値 dfv力 評 価値メモリ 106の評価値 dfvよりも小さ!/、か否か(すなわち、動きベクトル Vの評価値 d fvが、評価値メモリ 106の評価値 dfvよりも信頼度が高いか否力 を判定する。ステツ プ S205において、動きベクトル Vの評価値 dfvが、評価値メモリ 106の評価値 dfvより も小さいと判定された場合、処理は、ステップ S206に進む。
[0221] 評価値比較部 202は、ステップ S206において、シフト初期ベクトル置換部 203を制 御し、割付対象位置演算部 201により選択されたシフト初期ベクトルメモリ 107の割 付対象ブロックのシフト初期ベクトルを、動きベクトル V (すなわち、動きベクトル Vと同 じ大きさで同じ向きの動きベクトル)に書き換えさせ、ステップ S 207において、評価値 置換部 204を制御し、割付対象位置演算部 201により選択された割付対象ブロック の評価値 dfvを、動きベクトル Vの評価値 dfvで書き換えさせる。
[0222] また、ステップ S205において、ステップ S201において入力された動きベクトル Vの 評価値 dfvが、評価値メモリ 106に記憶される評価値 dfvよりも小さくな 、と判定され た場合、処理は、ステップ S206および S207をスキップし、ステップ S208に進む。す なわち、この場合、評価値メモリ 106の評価値 dfvが、動きベクトル Vの評価値 dfvより も信頼度が高いと判定されるので、評価値メモリ 106およびシフト初期ベクトルメモリ 1 07の値は、書き換えられることはない。
[0223] 割付対象位置演算部 201は、ステップ S208において、動きベクトル Vの割り付け対 象ブロックすべての処理が終了したか否かを判定する。ステップ S208において割り 付け対象ブロックすべての処理が終了していないと判定された場合、処理は、ステツ プ S203に戻り、それ以降の処理が繰り返される。また、ステップ S208において、動 きベクトル Vの割り付け対象ブロックすべての処理が終了したと判定された場合、シフ ト初期ベクトル割付処理は終了される。
[0224] なお、初回の処理にぉ 、ては、選択された割付対象ブロックに対応するシフト初期 ベクトル力 シフト初期ベクトルメモリ 107にまだ記憶されていない。したがって、その シフト初期ベクトルの評価値 dfvが、評価値メモリ 106の対応する割付対象ブロックに 、まだ記憶されていない場合には、ステップ S204において、選択された割付対象ブ ロック力も評価値 dfvは、取得されないので、ステップ S205においては Yesと判定さ れることとし、ステップ S206および S207の処理が実行される。
[0225] 以上のように、シフト初期ベクトルを割り付ける際にも、評価値 dfvを用いるようにし たので、光源の移動や影の通過などにより、フレーム間の平均輝度レベルが変化す る場合であっても、ベクトルの信頼度の評価を正しく行うことができ、勾配法演算によ る動きベクトル検出に、より適切な初期ベクトルの候補を得ることができる。
[0226] また、シフト初期ベクトルを求める際に、前の時刻のフレームにおいて検出された動 きベクトルが次の時刻のフレームにおいて通過するブロック(すなわち、フレーム t 1 上において検出された動きベクトル Vの終点のブロックと同じ位置にあるフレーム t上 のブロック)を求め、次の時刻のフレーム上の着目ブロックにおけるシフト初期べタト ルとして割り付けるようにし、さらに、その際に、評価値 dfvも前の時刻のフレームにお V、て検出された動きベクトルを求める際に算出されるものを用いるようにしたので、再 度評価値 dfvを求める必要がなぐ着目ブロックを通過する動きベクトルを、前の時刻 のフレームの全ブロックの動きベクトル力も探索する場合よりも、処理の演算量が削減 されるため、膨大な演算量により実現が困難であったハードウ ア化を実現すること ができる。
[0227] 次に、初期ベクトル選択部 101の構成の詳細について説明する。
[0228] 図 23は、初期ベクトル選択部 101の構成を示すブロック図である。図 23に構成を 示す初期ベクトル選択部 101は、前 (過去)フレームにおいて検出された動きベクトル や、シフト初期ベクトルなどの候補ベクトル (以下、初期候補ベクトルとも称する)から、 信頼度の高い動きベクトルを、初期ベクトルとして選択する処理を行う。初期ベクトル 選択部 101には、時刻 tの画像のフレーム tと、時刻 t+ 1の画像のフレーム t+ 1が入 力される。
[0229] 候補ベクトル位置演算部 251は、フレーム tが入力されると、フレーム t上の処理の 対象となる着目ブロックを選択し、着目ブロックの周辺領域から、着目ブロックの初期 候補ベクトルを取得する候補ブロックの位置、初期候補ベクトルとなる動きベクトルの 種類および優先順位を求め、求められた優先順位の順に、候補ブロックの位置情報 および初期候補ベクトルの種類情報を、検出ベクトル取得部 252およびシフト初期べ タトル取得部 253に供給する。また、候補ベクトル位置演算部 251は、候補ブロックの 位置情報を、オフセット位置演算部 254にも供給する。
[0230] なお、信号処理装置 1においては、初期候補ベクトルの数は、初期ベクトルの精度 と、ハードウェア能力の兼ね合いなどに基づいて所定数に設定されており、さらに、 候補ブロックの位置、初期候補ベクトルの種類、および優先順位も、予め設定されて いる。また、初期候補ベクトルの種類としては、過去フレームにおいて、所定のブロッ クを通過する動きベクトルを、その所定のブロックにシフトさせた動きベクトル (すなわ ち、過去フレーム上において検出された動きベクトルの終点のブロックと同じ位置に ある次のフレーム上のブロックを始点とした、動きベクトル Vと同じ大きさで同じ向きの 動きベクトル)であるシフト初期ベクトル SV、過去フレームにおいて検出された動きべ タトル(以下、過去ベクトル PVとも称する)、現在のフレームにおいて着目ブロックより 手前のブロックにおいて検出された動きベクトル (現在ベクトル CVとも称する)、およ び 0ベクトルがある。
[0231] したがって、候補ベクトル位置演算部 251は、予め設定された初期候補ベクトルの 種類が過去ベクトルまたは現在ベクトルであった場合、候補ブロックの位置情報およ び初期候補ベクトルの種類情報を、検出ベクトル取得部 252に供給し、求めた初期 候補ベクトルの種類がシフト初期ベクトルであった場合、候補ブロックの位置情報お よび初期候補ベクトルの種類情報を、シフト初期ベクトル取得部 253に供給し、その どちらでもなカゝつた場合 (例えば、初期候補ベクトルの種類が、 0ベクトルである場合) 、 0ベクトルを設定し、 0ベクトルと共に、候補ブロックの位置情報を、オフセット位置演 算部 254に供給する。
[0232] 検出ベクトル取得部 252は、候補ベクトル位置演算部 251により供給された候補ブ ロックの位置情報および初期候補ベクトルの種類情報に応じた動きベクトルを、検出 ベクトルメモリ 53より取得し、取得した動きベクトルを、初期候補ベクトルとして、オフ セット位置演算部 254に出力する。 [0233] シフト初期ベクトル取得部 253は、候補ベクトル位置演算部 251により供給された 候補ブロックの位置情報および初期候補ベクトルの種類情報に応じて、候補ブロック の位置情報に対応したシフト初期ベクトルを、シフト初期ベクトルメモリ 107から取得 し、初期候補ベクトルとしてオフセット位置演算部 254に出力する。また、シフト初期 ベクトル取得部 253は、候補ベクトル位置演算部 251により指示されたブロックの位 置に、シフト初期ベクトルが割り付けられていない場合、 0ベクトルを、オフセット位置 演算部 254に出力する。なお、シフト初期ベクトルが割り付けられていない場合には 、 0ベクトル力 シフト初期ベクトルメモリ 107に予め記憶されているようにしてもよい。
[0234] オフセット位置演算部 254は、検出ベクトル取得部 252またはシフト初期ベクトル取 得部 253から初期候補ベクトル (あるいは候補ベクトル位置演算部 251からの 0ベタト ル)を入力すると、候補ベクトル位置演算部 251により供給された候補ブロックの位置 情報に基づいて、各初期候補ベクトルに対して、フレーム tの着目ブロックを、フレー ム t+ 1にオフセット (動き補償)させたオフセット先のブロック位置を演算する。そして 、オフセット位置演算部 254は、初期候補ベクトルとともに、候補ブロックの位置情報 、およびオフセット先ブロック位置の情報を、図 14を参照して上述した評価値演算部 61Bに出力する。
[0235] 評価値演算部 61Bは、オフセット位置演算部 254より初期候補ベクトルとともに、候 補ブロックの位置情報、およびオフセット先ブロック位置の情報を入力すると、フレー ム tとフレーム t+ 1を用いて、初期候補ベクトルの評価値 dfvを求める。そして、評価 値演算部 61Bは、初期候補ベクトルとともに、求められた評価値 dfvを、評価値比較 部 256に出力する。
[0236] 評価値比較部 256は、評価値演算部 61Bにより入力された評価値 dfvと、最適候 補格納用レジスタ 257に格納されて 、る最適候補ベクトルの評価値 dfvを比較し、評 価値演算部 61Bにより入力された初期候補ベクトルの評価値 dfvが、最適候補べタト ルの評価値 dfvよりも小さい、すなわち、初期候補ベクトルが最適候補ベクトルよりも 信頼度が高いと判定された場合、最適候補格納用レジスタ 257の最適候補ベクトル およびその評価値 dfvを、信頼度が高!、とされた初期候補ベクトルおよびその評価値 dfvで置き換える。そして、最終的に、評価値比較部 256は、最適候補格納用レジス タ 257を制御し、すべての候補ベクトルの中から、評価値 dfvに基づぐ信頼度が最も 高いと判定された最適候補ベクトルを、初期ベクトル VOとして、反復勾配法演算部 1 03に出力させる。
[0237] 最適候補格納用レジスタ 257は、評価値比較部 256により評価値 dfvが小さ 、 (信 頼度が高い)とされた初期候補ベクトルが、最適候補ベクトルとして、その評価値 dfv とともに記憶されている。そして、最適候補格納用レジスタ 257は、評価値比較部 25 6の制御のもと、最終的に記憶されている最適候補ベクトルを、初期ベクトル VOとして 、反復勾配法演算部 103に出力する。
[0238] 次に、図 24のフローチャートを参照して、初期ベクトル選択処理の詳細について説 明する。
[0239] 候補ベクトル位置演算部 251は、ステップ S251において、選択された着目ブロック の周辺領域から、予め設定されている着目ブロックの初期候補ベクトルを取得する候 補ブロックの位置、初期候補ベクトルの種類および優先順位を求め、ステップ S252 において、求められた優先順位の順に、候補ブロックの初期候補ベクトルの種類が、 過去ベクトルまたは現在ベクトルであるか否かを判定する。ステップ S252において、 候補ブロックの初期候補ベクトルの種類力 過去ベクトルまたは現在ベクトルであると 判定された場合、候補ベクトル位置演算部 251は、ステップ S253において、候補ブ ロックの位置情報および初期候補ベクトルの種類情報を、検出ベクトル取得部 252に 供給し、検出ベクトル取得部 252に、候補ブロックの位置情報および初期候補べタト ルの種類情報に応じた動きベクトル (過去ベクトル PVまたは現在ベクトル CV)を、検 出ベクトルメモリ 53から取得させ、取得させた動きベクトルを、オフセット位置演算部 2 54に出力させる。
[0240] ステップ S252にお!/、て、候補ブロックの初期候補ベクトルの種類力 過去ベクトル または現在ベクトルでないと判定された場合、候補ベクトル位置演算部 251は、ステ ップ S254において、候補ブロックの初期候補ベクトルの種類力 シフト初期ベクトル であるか否かを判定する。ステップ S254において、候補ブロックの初期候補ベクトル の種類が、シフト初期ベクトルであると判定された場合、候補ベクトル位置演算部 25 1は、ステップ S255において、候補ブロックの位置情報および初期候補ベクトルの種 類情報を、シフト初期ベクトル取得部 253に供給し、シフト初期ベクトル取得部 253に 、候補ブロックの位置情報に対応したシフト初期ベクトルを、シフト初期ベクトルメモリ 107から取得させ、取得させたシフト初期ベクトルを、オフセット位置演算部 254に出 力させる。
[0241] ステップ S254において、候補ブロックの初期候補ベクトルの種類力 シフト初期べ タトルではな!/ヽと判定された場合 (すなわち、候補ブロックの初期候補ベクトルの種類 力 0ベクトルであると判定された場合)、候補ベクトル位置演算部 251は、ステップ S 256において、初期候補ベクトルに 0ベクトルを設定し、 0ベクトルと共に、候補ブロッ クの位置情報を、オフセット位置演算部 254に供給する。なお、ステップ S253および S255においても、候補ベクトル位置演算部 251は、候補ブロックの位置情報を、ォ フセット位置演算部 254に供給している。
[0242] オフセット位置演算部 254は、ステップ S257において、検出ベクトル取得部 252ま たはシフト初期ベクトル取得部 253から初期候補ベクトルを入力すると、候補ベクトル 位置演算部 251により供給された候補ブロックの位置情報に基づ 、て、各初期候補 ベクトルに対して、フレーム tの着目ブロックを、フレーム t+ 1にオフセットさせたオフ セット先のブロック位置を演算する。そして、オフセット位置演算部 254は、初期候補 ベクトルとともに、候補ブロックの位置情報、およびオフセット先ブロック位置の情報を 、評価値演算部 61Bに出力する。
[0243] 評価値演算部 61Bは、オフセット位置演算部 254より初期候補ベクトルとともに、候 補ブロックの位置情報、およびオフセット先ブロック位置の情報を入力すると、ステツ プ S258において、フレーム tとフレーム t+ 1を用いて、初期候補ベクトルの評価値 df Vを求め、初期候補ベクトルとともに、求められた評価値 dfvを、評価値比較部 256〖こ 出力する。
[0244] 評価値比較部 256は、ステップ S259において、評価値演算部 61Bにより求められ た評価値 dfv力 最適候補格納用レジスタ 257に格納されて ヽる最適候補ベクトルの 評価値 dfvより小さいか否かを判定し、評価値演算部 61Bにより求められた評価値 df Vが、最適候補格納用レジスタ 257に格納されて ヽる最適候補ベクトルの評価値 dfv より小さい、すなわち、初期候補ベクトルが最適候補ベクトルよりも信頼度が高いと判 定された場合、ステップ S260において、最適候補格納用レジスタ 257の最適候補べ タトルおよびその評価値 dfvを、信頼度が高!、とされた初期候補ベクトルおよびその 評価値 dfvで書き換える。
[0245] また、評価値演算部 61Bにより求められた評価値 dfvが、最適候補格納用レジスタ 257に格納されて 、る最適候補ベクトルの評価値 dfvより小さくな 、と判定された場 合、処理は、ステップ S 260をスキップし、ステップ S 261〖こ進む。
[0246] ステップ S261において、候補ベクトル位置演算部 251は、すべての初期候補べク トル(例えば、 8ベクトル)の処理が終了したか否かを判定する。ステップ S261におい て、すべての初期候補ベクトルの処理が終了していないと判定された場合、処理は、 ステップ S252に戻り、それ以降の処理が繰り返される。
[0247] ステップ S261において、すべての初期候補ベクトルの処理が終了したと判定され た場合、ステップ S262において、評価値比較部 256は、最適候補格納用レジスタ 2 57を制御し、すべての初期候補ベクトルの中から、評価値 dfvに基づぐ信頼度が最 も高いとされた最適候補ベクトルを、初期ベクトル VOとして反復勾配法演算部 103に 出力させる。以上により、初期ベクトル選択処理は終了される。
[0248] 以上のように、着目ブロックにお 、て、複数の初期候補ベクトルの評価値 dfvを求め 、評価値 dfvが最も小さい、すなわち、信頼度が最も高いとされる初期候補ベクトルを 、初期ベクトルとして選択するようにしたので、光源の移動や影の通過などにより、動 きを持つ物体の平均輝度レベルが大きく変化する場合であっても、後段の動きべタト ル検出に最適な初期ベクトルを与えることができ、その結果、後段の動きベクトル検 出の精度を向上させることができる。
[0249] さらに、連続するフレーム間において動物体の動き量にはある程度の連続性があり 、動き量の変化が小さいことに基づいて、前フレーム力も着目ブロックを通過する動き ベクトルであるシフト初期ベクトルも、評価値 dfvを用いて求めて、初期ベクトルの候 補とするようにしたので、従来のように、周辺ブロックにおいて過去に求められている 動きベクトルのみを初期ベクトルの候補とする場合よりも、精度の高い動き検出を行う ことができる。これは、特に、動いている物体の境界において、効果的である。
[0250] 次に、反復勾配法演算部 103およびベクトル評価部 104の構成の詳細について説 明する。
[0251] 図 25は、反復勾配法演算部 103およびベクトル評価部 104の構成を示すブロック 図である。図 25に構成を示す反復勾配法演算部 103およびベクトル評価部 104は、 入力される時刻 tの画像のフレーム tと、時刻 t+ 1の画像のフレーム t+ 1を用いて、 最適な動きベクトルを検出する処理を行う。
[0252] この動きベクトルを検出する処理は、複数の画素力 なる所定のブロック毎に実行 される処理であり、反復勾配法演算部 103およびベクトル評価部 104は、各ブロック 毎に、勾配法を用いた演算を繰り返し実行することにより、評価値 dfvに基づぐ信頼 度が高い、最適な動きベクトルを出力する。すなわち、動きベクトルは、動きベクトル の検出対象となる検出対象ブロック毎に求められるが、その検出対象ブロックの動き ベクトルを求める際の勾配法演算は、勾配法演算の対象となる演算ブロックを対象と して実行される。
[0253] 反復勾配法演算部 103は、セレクタ 401、メモリ制御信号生成部 402、メモリ 403、 有効画素判定部 404、勾配法演算部 405、および遅延部 406により構成される。
[0254] セレクタ 401には、初期ベクトル選択部 101からの初期ベクトル VOが入力される。
セレクタ 401は、初期ベクトル選択部 101からの初期ベクトル V0を、勾配法演算の初 期値として用いる動きベクトル (以下、オフセットベクトルと称する) Vn—1として選択し 、メモリ制御信号生成部 402、勾配法演算部 405、およびベクトル評価部 104に出力 する。
[0255] また、セレクタ 401は、遅延部 406から、勾配法演算部 405により勾配法演算が実 行された結果の動きベクトル Vが入力された場合、勾配法演算部 405により演算され た動きベクトル Vを、オフセットベクトル Vn—1として選択し、メモリ制御信号生成部 40 2、勾配法演算部 405、およびベクトル評価部 104に出力する。
[0256] メモリ制御信号生成部 402には、信号処理装置 1の図示せぬ制御部から、処理の 開始タイミングと位置情報を制御する制御信号が入力される。メモリ制御信号生成部 402は、制御信号およびセレクタ 401からのオフセットベクトル Vn—1に応じて、メモ リ 403に記憶されている時刻 tの画像のフレーム tと、時刻 t+ 1の画像のフレーム t+ 1から、処理の対象となる演算ブロックを構成する画素の画素値 (輝度値)(以下、対 象画素値と称する)を読み出させ、読み出した対象画素値を、有効画素判定部 404 および勾配法演算部 405に供給させる。
[0257] メモリ 403には、プリフィルタ 102— 1および 102— 2を介して、時刻 tの画像のフレ ーム tと、時刻 t+ 1の画像のフレーム t+ 1が入力され、記憶されている。
[0258] 有効画素判定部 404は、メモリ 403から供給される対象画素値を用いて、例えば、 フレーム tとフレーム t+ 1の演算ブロックの画素差分を演算し、その画素差分に基づ いて、演算ブロックに、勾配法の演算に有効な画素の数が所定のしきい値より多いか 否かを判定し、その判定結果に応じたカウンタフラグ (countflg)を、勾配法演算部 40 5およびベクトル評価部 104に供給する。
[0259] また、有効画素判定部 404は、演算ブロックにお 、て有効な画素と判定された画素 について、水平方向および垂直方向毎の勾配状態 (すなわち、勾配がある力否か) を求め、水平方向および垂直方向のどちらか一方にのみ勾配がある画素(以下、片 側勾配の画素とも称する)の割合が多 、か否力も判定し、その判定結果に応じた勾 配フラグ (gladflg)を、勾配法演算部 405およびベクトル評価部 104に供給する。
[0260] 勾配法演算部 405は、有効画素判定部 404から供給されるカウンタフラグおよび勾 配フラグの値に基づいて、メモリ 403から供給される対象画素値を用いて、勾配法演 算を実行し、セレクタ 401からのオフセットベクトル Vn—1を用いて、動きベクトル Vn を算出し、算出された動きベクトル Vnを、ベクトル評価部 104に出力する。なお、この とき、勾配法演算部 405においては、用いられる勾配法演算(式)力 上述した式(1 4)の最小自乗和を用いた勾配法演算処理 (以下、統合型勾配法演算処理とも称す る)か、後述する式 (23)の簡易的な勾配法演算処理 (以下、独立型勾配法演算処理 )のどちらに切り替えられて実行される。
[0261] 遅延部 406には、ベクトル評価部 104から、勾配法演算部 405により算出され、ベ タトル評価部 104により評価された結果の動きベクトル Vが入力される。遅延部 406 は、ベクトル評価部 104から入力される動きベクトル Vを、有効画素判定部 404およ び勾配法演算部 405の次の処理のサイクルまで保持し、次の処理のサイクルで、動 きベクトル Vをセレクタ 401に出力する。
[0262] ベクトル評価部 104は、図 14を参照して上述した評価値演算部 61B、および評価 値判定部 412により構成されている。
[0263] 評価値演算部 61Bには、プリフィルタ 102—1および 102— 2を介して、時刻 tの画 像のフレーム tと、時刻 t+ 1の画像のフレーム t+ 1が入力され、また、信号処理装置 1の図示せぬ制御部から、位置情報を制御する制御信号が入力されている。
[0264] 評価値演算部 61Bは、評価値判定部 412の制御のもと、フレーム tとフレーム t+ 1 、および位置情報を用いて、勾配法演算部 405により算出された動きベクトル Vn、セ レクタ 401からのオフセットベクトル Vn—1、および、 0ベクトルの評価値 dfvを求める 。そして、評価値演算部 61Bは、各ベクトルとともに、求められた評価値 dfvを、評価 値判定部 412に出力する。
[0265] 評価値判定部 412は、有効画素判定部 404から供給されるカウンタフラグおよび勾 配フラグに基づいて、評価値演算部 61Bに演算させた評価値 dfvを比較することによ り、信頼性の高いものを選択し、動きベクトル Vを求める。
[0266] また、評価値判定部 412は、有効画素判定部 404から供給されるカウンタフラグお よび勾配フラグに基づいて、勾配法演算処理を反復させるか否かを判定し、反復さ せると判定した場合、求めた動きベクトル Vを、遅延部 406に出力する。評価値判定 部 412は、勾配法演算処理を反復させない場合、求めた動きベクトル Vを、検出べク トルメモリ 53に記憶させる。このとき、評価値判定部 412は、動きベクトル Vとともに、 その動きベクトル Vに対して求められた評価値 dfvを、シフト初期ベクトル割付部 105 に供給する。
[0267] 図 26は、有効画素判定部 404の詳細な構成を示すブロック図である。図 26の例に おいて、有効画素判定部 404は、画素差分算出部 421、画素判定部 422、カウンタ 423、勾配法継続判定部 424、および演算実行判定部 425により構成される。
[0268] 画素差分算出部 421は、第 1空間勾配画素差分算出部 421— 1、第 2空間勾配画 素差分算出部 421— 2、および時間方向画素差分算出部 421— 3により構成される
[0269] 第 1空間勾配画素差分算出部 421— 1は、メモリ 403から供給される対象画素値の うち、フレーム t+ 1における演算ブロック内の画素の画素値を用いて、フレーム t+ 1 における演算ブロック内の画素の水平方向の画素差分 Δ χおよび垂直方向の画素 差分 Ayを算出し、算出されたフレーム t+ 1における演算ブロック内の画素の水平方 向の画素差分 Δχおよび垂直方向の画素差分 Ayを、画素判定部 422に出力する。
[0270] 第 2空間勾配画素差分算出部 421— 2は、メモリ 403から供給される対象画素値の うち、フレーム tにおける演算ブロック内の画素の画素値を用いて、フレーム tにおける 演算ブロック内の画素の水平方向の画素差分 Δ Xおよび垂直方向の画素差分 Ayを 算出し、算出されたフレーム tにおける演算ブロック内の画素の水平方向の画素差分 Δχおよび垂直方向の画素差分 Ayを、画素判定部 422に出力する。
[0271] 時間方向画素差分算出部 421— 3は、メモリ 403から供給される対象画素値 (すな わち、フレーム tおよびフレーム t+ 1における演算ブロック内の画素の画素値)を用い て、フレーム tにおける演算ブロック内の画素の時間方向の画素差分 Atを算出し、算 出されたフレーム tにおける演算ブロック内の画素の時間方向の画素差分 Atを、画 素判定部 422に出力する。
[0272] 画素判定部 422は、有効画素判定部 431、水平勾配判定部 432、および垂直勾 配判定部 433により構成される。カウンタ 423は、有効画素数カウンタ 441、水平勾 配無カウンタ 442、および垂直勾配無カウンタ 443により構成される。
[0273] 有効画素判定部 431は、第 1空間勾配画素差分算出部 421— 1からのフレーム t+ 1における演算ブロック内の画素の水平方向の画素差分 Δ Xおよび垂直方向の画素 差分 Ay、第 2空間勾配画素差分算出部 421— 2からのフレーム tにおける演算プロ ック内の画素の水平方向の画素差分 Δ Xおよび垂直方向の画素差分 Ay、並びに、 時間方向画素差分算出部 421— 3からのフレーム t+ 1およびフレーム t間の演算ブ ロック内の画素の時間方向の画素差分 Atを用いて、所定の論理演算を行う。なお、 この所定の論理演算の詳細は、図 29を参照して後述する。
[0274] 有効画素判定部 431は、その所定の論理演算に基づいて、演算ブロック内の画素 力 動きベクトルの検出(すなわち、後段の勾配法演算部 405の演算)に有効である か否かを判定し、動きベクトルの検出に有効であると判定した場合、有効画素数カウ ンタ 441の値 (有効画素の数)を 1加算するとともに、水平勾配判定部 432および垂 直勾配判定部 433を制御し、動きベクトルの検出に有効であると判定した有効画素 について、水平方向および垂直方向それぞれの勾配状態を求めさせる。 [0275] 水平勾配判定部 432は、有効画素判定部 431の制御のもと、有効画素の水平方 向の勾配の状態を求め、有効画素の水平方向の勾配がある力否かを判定し、有効 画素の水平方向の勾配がないと判定した場合、水平勾配無カウンタ 442の値 (水平 勾配がな!、画素の数)を 1加算する。
[0276] 垂直勾配判定部 433は、有効画素判定部 431の制御のもと、有効画素の垂直方 向の勾配の状態を求め、有効画素の垂直方向の勾配がある力否かを判定し、有効 画素の垂直方向の勾配がないと判定した場合、垂直勾配無カウンタ 443の値 (すな わち、水平勾配がない画素の数)を 1加算する。
[0277] 有効画素数カウンタ 441は、演算ブロック毎に、有効画素判定部 431により動きべ タトルの検出に有効であると判定された有効画素の数を記憶する。水平勾配無カウ ンタ 442は、演算ブロック毎に、水平勾配判定部 432により、水平方向の勾配がない と判定された有効画素の数を記憶する。垂直勾配無カウンタ 443は、演算ブロック毎 に、垂直勾配判定部 433により、垂直方向の勾配がないと判定された有効画素の数 を記憶する。
[0278] 勾配法継続判定部 424は、有効画素数カウンタ 441を参照して、演算ブロックにお ける勾配法の演算に有効な画素の数が所定のしきい値 OCより多いか否かを判定する 。勾配法継続判定部 424は、演算ブロックにおける勾配法の演算に有効な画素の数 が所定のしき 、値ひより多 、と判定した場合、勾配法演算を実行させるカウンタフラ グ (COuntflg= l)を、演算実行判定部 425、勾配法演算部 405およびベクトル評価部 104に出力し、演算ブロックにおける勾配法の演算に有効な画素の数が所定のしき V、値 aより少な 、と判定した場合、勾配法演算を打ち切らせるカウンタフラグ (countfl g=0)を、演算実行判定部 425、勾配法演算部 405およびベクトル評価部 104に出 力する。
[0279] 演算実行判定部 425は、カウンタ値演算部 451、およびフラグ設定部 452により構 成される。
[0280] カウンタ値演算部 451は、勾配法継続判定部 424からのカウンタフラグの値が 1で あるとき、カウンタ 423 (有効画素数カウンタ 441、水平勾配無カウンタ 442、および 垂直勾配無カウンタ 443)から、有効画素の数、水平方向に勾配のない画素の数、 および垂直方向に勾配のない画素の数を取得して、演算ブロックにおける有効画素 と、有効画素のうち片側勾配の画素(すなわち、水平方向または垂直方向のどちらか 一方にのみ勾配がある画素)の割合を演算し、演算結果に応じて、フラグ設定部 452 が設定する勾配フラグ (gladflg)の値を制御する。
[0281] フラグ設定部 452は、カウンタ値演算部 451の制御のもと、勾配フラグの値を設定し
、勾配フラグを、勾配法演算部 405および評価判定部 412に出力する。勾配フラグ の値については、図 31を参照して後述する。
[0282] 図 27は、勾配法演算部 405の詳細な構成を示すブロック図である。図 27の例にお いて、勾配法演算部 405は、画素差分算出部 461、演算判定部 462、統合型勾配 演算部 463— 1、独立型勾配演算部 463— 2、およびベクトル算出部 464により構成 される。
[0283] 画素差分算出部 461は、第 1空間勾配画素差分算出部 461— 1、第 2空間勾配画 素差分算出部 461— 2、および時間方向画素差分算出部 461— 3により構成され、 演算判定部 462の制御のもと、対象となる画素差分を算出する。
[0284] 第 1空間勾配画素差分算出部 461— 1は、第 1空間勾配画素差分算出部 421— 1 と同様の構成であり、メモリ 403から供給される対象画素値のうち、フレーム t+ 1にお ける演算ブロック内の画素の画素値を用いて、フレーム t+ 1における演算ブロック内 の画素の水平方向の画素差分 Δχおよび垂直方向の画素差分 Ayを算出し、算出さ れたフレーム t+ 1における演算ブロック内の画素の水平方向の画素差分 Δ Xおよび 垂直方向の画素差分 Ayを、演算判定部 462に出力する。
[0285] 第 2空間勾配画素差分算出部 461— 2は、第 2空間勾配画素差分算出部 421— 2 と同様に構成され、メモリ 403から供給される対象画素値のうち、フレーム tにおける 演算ブロック内の画素の画素値を用いて、フレーム tにおける演算ブロック内の画素 の水平方向の画素差分 Δχおよび垂直方向の画素差分 Ayを算出し、算出されたフ レーム tにおける演算ブロック内の画素の水平方向の画素差分 Δχおよび垂直方向 の画素差分 Ayを、演算判定部 462に出力する。
[0286] 時間方向画素差分算出部 461— 3は、時間方向画素差分算出部 421— 3と同様に 構成され、メモリ 403から供給される対象画素値 (すなわち、フレーム tおよびフレーム t+ 1における演算ブロック内の画素の画素値)を用いて、フレーム tにおける演算ブ ロック内の画素の時間方向の画素差分 Atを算出し、算出されたフレーム tにおける 演算ブロック内の画素の時間方向の画素差分 Atを、演算判定部 462に出力する。
[0287] 演算判定部 462は、有効画素判定部 471、水平勾配判定部 472、および垂直勾 配判定部 473により構成される。有効画素判定部 471は、勾配法継続判定部 424か ら供給されるカウンタフラグ (countflg)の値に基づ 、て、勾配法演算部 405の実行、 禁止を制御する。
[0288] また、有効画素判定部 471は、演算実行判定部 425から供給される勾配フラグ (gla dflg)の値に基づいて、第 1空間勾配画素差分算出部 461— 1、第 2空間勾配画素差 分算出部 461— 2、および時間方向画素差分算出部 461— 3の画素差分算出処理 の実行、禁止を制御するとともに、統合型勾配演算部 463— 1および独立型勾配演 算部 463— 2のどちらで、勾配法演算処理を行うかを判定する。
[0289] 有効画素判定部 471は、勾配フラグの値に基づいて、統合型勾配演算部 463— 1 で勾配法演算処理を行うと判定した場合、第 1空間勾配画素差分算出部 461— 1か らのフレーム t + 1における演算ブロック内の画素の水平方向の画素差分 Δ Xおよび 垂直方向の画素差分 Ay、第 2空間勾配画素差分算出部 461— 2からのフレーム tに おける演算ブロック内の画素の水平方向の画素差分 Δ Xおよび垂直方向の画素差 分 Ay、並びに、時間方向画素差分算出部 461— 3からのフレーム t+ 1およびフレ ーム t間の演算ブロック内の画素の時間方向の画素差分 Atを用いて、有効画素判 定部 431と同様の所定の論理演算を行い、所定の論理演算に基づいて、演算ブロッ ク内の画素が、動きベクトルの検出に有効である力否かを判定し、動きベクトルの検 出に有効であると判定した有効画素の勾配 (画素差分)を、統合型勾配演算部 463 1に供給し、統合型勾配法演算処理を実行させる。
[0290] 有効画素判定部 471は、勾配フラグの値に基づいて、独立型勾配演算部 463— 2 で勾配法演算処理を行うと判定した場合、水平勾配判定部 472および垂直勾配判 定部 473の少なくとも一方を制御し、所定の論理演算に基づいて、演算ブロック内の 画素が動きベクトルの検出に有効であると判定した有効画素について、水平方向お よび垂直方向それぞれの勾配状態を求めさせる。 [0291] 水平勾配判定部 472は、有効画素判定部 471の制御のもと、有効画素の水平方 向の勾配の状態を求め、有効画素の水平方向の勾配がある力否かを判定し、有効 画素のうち、水平方向の勾配がある画素の勾配 (画素差分)のみを、独立型勾配演 算部 463— 2に供給し、水平方向に対しての独立型勾配法演算処理を実行させる。
[0292] 垂直勾配判定部 473は、有効画素判定部 471の制御のもと、有効画素の垂直方 向の勾配の状態を求め、有効画素の垂直方向の勾配がある力否かを判定し、有効 画素のうち、垂直方向の勾配がある画素の勾配 (画素差分)のみを、独立型勾配演 算部 463— 2に供給し、垂直方向に対しての独立型勾配法演算処理を実行させる。
[0293] 統合型勾配演算部 463— 1は、有効画素判定部 471の制御のもと、統合型勾配法 演算処理を実行する。すなわち、統合型勾配演算部 463— 1は、有効画素判定部 4 71により供給された有効画素の勾配 (時間方向の画素差分 Δ t、水平方向の画素差 分 Δ χ、および、垂直方向の画素差分 Ay)を積算し、上述した式(14)の最小自乗和 を用いて、動きベクトル vnを求め、求めた動きベクトル vnをベクトル算出部 464に出 力する。
[0294] 独立型勾配演算部 463— 2は、水平勾配判定部 472の制御のもと、水平方向の独 立型勾配法演算処理を実行する。すなわち、独立型勾配演算部 463— 2は、水平勾 配判定部 472により供給された有効画素のうち水平方向に勾配がある画素の勾配( 時間方向の画素差分 A t、水平方向の画素差分 Δ χ、および、垂直方向の画素差分 Ay)を積算し、式(14)の代わりに、後述する簡易的な数式である式 (23)を用いて、 動きベクトル vnの水平方向成分を求め、求めた動きベクトル vnの水平方向成分をべ タトル算出部 464に出力する。
[0295] また、独立型勾配演算部 463— 2は、垂直勾配判定部 473の制御のもと、垂直方 向の独立型勾配法演算処理を実行する。すなわち、独立型勾配演算部 463— 2は、 垂直勾配判定部 473により供給された有効画素のうち垂直方向に勾配がある画素の 画素値の勾配(時間方向の画素差分 A t、水平方向の画素差分 Δ χ、および、垂直 方向の画素差分 Ay)を積算し、式(14)の代わりに、後述する簡易的な数式である 式(23)を用いて、動きベクトル vnの垂直方向成分を求め、求めた動きベクトル vnの 垂直方向成分をベクトル算出部 464に出力する。 [0296] ベクトル算出部 464は、セレクタ 401からのオフセットベクトル Vn— 1を、統合型勾 配演算部 463— 1からの動きベクトル vn、または、独立型勾配演算部 463— 2からの 動きベクトル vnに加算して、動きベクトル Vnを算出し、算出した動きベクトル Vnをべ タトル評価部 104に出力する。
[0297] 図 28は、動きベクトルの検出対象となる検出対象ブロックと、その検出対象ブロック に対応する、勾配法演算の対象となる演算ブロックの他の例を示している。なお、図 28の例においては、フレーム tが示されており、フレーム t上の丸は、画素を表してい る。
[0298] 図 28の例の場合、フレーム t上において、 4画素 X 4画素からなる検出対象ブロック K1乃至 K3と、検出対象ブロック K1乃至 K3をそれぞれ中心とした 8画素 X 8画素の 各演算ブロック E1乃至 E3が示されている。なお、各演算ブロック E1乃至 E3は、それ ぞれ隣接する演算ブロックと、構成する画素半分がオーバーラップして 、る。
[0299] ベクトル検出部 52においては、フレーム上の左上の検出対象ブロック力 ラスタス キャン順に、動きベクトルの検出が実行される。したがって、フレーム t上において、検 出対象ブロック Kl、検出対象ブロック Κ2、および、検出対象ブロック Κ3が順々に、 動きベクトルの検出対象ブロックとなる。そして、これに対応して、勾配法の演算プロ ックは、演算ブロック El、演算ブロック Ε2、および、演算ブロック Ε3となる。すなわち 、図 28の例の検出対象ブロックと演算ブロックの場合には、各演算ブロック E1乃至 Ε 3は、隣の演算ブロックと、構成される画素半分がオーバーラップすることになる。
[0300] なお、以降においては、上述したように構成される検出対象ブロックと演算ブロック を用いて、図 25の反復勾配法演算部 103およびベクトル評価部 104の処理につい て説明する力 これらの構成の検出対象ブロックおよび演算ブロックには限定されず 、検出対象ブロックは、 4つの画素に限らず、例えば、 1つの画素で構成されてもよい し、その他の複数の画素数であってもよい。また、図 28の例においては、検出対象ブ ロックと演算ブロックの画素数が異なる力 同じ画素数で構成することもできる。すな わち、演算ブロックがそのまま検出対象ブロックとなるようにも構成できる。
[0301] 次に、図 29を参照して、有効画素判定部 404の有効画素判定方法を説明する。図 29の例においては、矢印 Τは、図中、左手前の時刻 tのフレーム tから、右奥の時刻 t + 1のフレーム t+ 1への時間の経過方向を示して!/、る。
[0302] フレーム t上にお!、ては、動きベクトルの検出の対象となる 4画素 X 4画素からなる 検出対象ブロック Kt (図中黒丸)と、検出対象ブロック Ktを中心とした (検出対象プロ ックの周囲の) 8画素 X 8画素からなる演算ブロック Etが示されている。一方、フレー ム t+ 1上においては、検出対象ブロック Ktに対応する 4画素 X 4画素からなる検出 対象ブロック Kt+ 1 (図中黒丸)と、演算ブロック Etに対応する 8画素 X 8画素からな る演算ブロック Et+ 1が示されている。なお、フレーム t+ 1上の点線のブロックは、検 出対象ブロック Ktと同位相のブロックを表しており、フレーム t+ 1上において、動き ベクトル V (Vx, Vy)が初期ベクトルとして与えられた分だけ、点線のブロックからシフ ト (移動)された位置の演算ブロック Et+ 1が勾配法の演算の対象として用いられる。
[0303] ここで、フレーム t上の演算ブロック Etの画素 piとフレーム t+ 1上の演算ブロック Et
+ 1間の同位置の画素 p2における時間方向の画素差分 (フレーム差分)を A tとし、 このときの画枠を wとすると、演算ブロック Etの画素 piの水平方向の画素差分 Δ χ1、 垂直方向の画素差分 Ayl、および時間方向の画素差分 A tは、式(16)乃至式(18 )で求められる。
[0304] [数 16]
Δχ1 =Υΐ (k+1) -Yt (k)
•••(16)
[数 17]
△ y1 =Yt (k+w) -Yt (k)
•••(17)
[数 18]
△ t=Yt+1 (k) -Yt (k)
•••(18)
[0305] なお、 Yt+ 1は、時刻 t+ 1における画素値を表し、 Ytは、時刻 tにおける画素値を 表し、 k+ 1および kは、アドレス (位置)を表す。また、画素 piに対応する演算ブロック Et+ 1の画素 p2の水平方向の画素差分 Δ x2、および垂直方向の画素差分 Ay2も 同様に求められる。 [0306] 有効画素判定部 404は、これらの値を用いて、論理演算を行 、、その結果に基づ いて、有効画素判定を行う。すなわち、有効画素判定部 404の有効画素判定部 431 は、演算ブロック Etの画素のうち、次の 3つの条件式(19)乃至(21)のいずれかを満 たす (すなわち、式(22)を満たす)か否かを求めることにより、その画素が動きべタト ル検出に有効な画素である力否かを判定する。
[0307] [数 19]
Δχ1≠0 && Δχ2≠0 &&
|Ax1|>th1 · |Δγ1| && |ΜΖΔχ1— ΜΖΔχ2|く th2
•••(19)
[数 20]
△ y1≠0 && Ay2≠0 &&
|Ay1|>th1 · |Λχ1| && |AtZAy1— AtZAy2|く th2
• · · (20)
[数 21]
Δχ1≠0 && Δχ2≠0 && Ay1≠0 && Ay2≠0 &&
|At//Ax1-At//Ax2|<th2 &&
|At//Ay1-At/ /Ay2|<th2
•••(21)
[0308] 式(19) II式(20) II式(21) · · · (22)
[0309] ここで、 IIは、論理和、 &&は、論理積、 ·は、乗算、 thlおよび th2は、それぞれ所 定のしきい値を表している。なお、 thlは、例えば、 1, 1.5,または 2とされ、 th2は、 例免ば、 4とされる。
[0310] したがって、式(19)において、 Δχ1≠0 && Δχ2≠0は、画素 piおよび画素 ρ 2の水平勾配が平坦ではない(水平方向に勾配を有する)ことを表す。 I Δχΐ I >t hi- I Ayl Iは、水平勾配が垂直勾配よりもある程度大きぐより支配的であることを 表す。 I At/Axl—At/Ax2 Iく th2は、勾配法による(正規化した場合の)水 平方向の動きが、所定のしきい値 th2より小さい、すなわち、水平方向の動きに、類 似性があることを表す。以上により、式(19)は、水平方向に着目した条件を表してお り、これら全てを満たした画素は、水平方向の動きに類似性があると判定され、後段 の勾配法に用いて有効であると判定される。
[0311] また、式(20)において、 Ayl≠0 && Ay2≠0は、垂直勾配が平坦ではない( 垂直方向に勾配を有する)ことを表す。 I Δγΐ I >thl - I Δχΐ Iは、垂直勾配が 水平勾配よりもある程度大きぐより支配的であることを表す。 I At/ Ayl - At/ Δγ2 Iく th2は、勾配法による(正規ィ匕した場合の)垂直方向の動きに類似性がある ことを表す。以上により、式(20)は、垂直方向に着目した条件を表しており、これら全 てを満たした画素は、垂直方向の動きに類似性があると判定され、後段の勾配法に 用いて有効であると判定される。
[0312] 同様に、式(21)において、 Δχ1≠0 && Δχ2≠0 && Ayl≠0 && Δ y2≠0は、垂直および水平勾配が平坦ではない(垂直および水平方向に勾配を有 する)ことを表す。 I At/ Axl— At/ Ax2 I <th2 && | AtZ Ayl— AtZ Δγ2 Iく th2は、勾配法による(正規ィ匕した場合の)垂直方向および水平方向の動 きに類似性があることを表す。以上により、式(21)は、式(19)および(20)を満たして いないものに対しての水平および垂直の両方向(以下、斜め方向、あるいは、垂直水 平方向とも称する)に着目した条件 (以下、水平垂直着目条件と称する)を表しており 、これら全てを満たした画素は、水平および垂直方向の動きに類似性があると判定さ れ、後段の勾配法に用いて有効であると判定される。
[0313] なお、有効画素判定の論理演算は、各画素差分が用いられるものであれば、図 29 の例に限らない。また、有効画素判定は、上述したすべての画素差分に基づいて判 定されると限らず、例えば、フレーム t上の演算ブロック Etの画素 piとフレーム t+ 1上 の演算ブロック Et+ 1間の同位置の画素 p2における時間方向の画素差分(フレーム 差分) Atが所定の値よりも小さいか否かを判定し、小さいと判定された場合に、有効 画素であると判定することもできる。
[0314] 図 30は、演算ブロックにおける画素の構成例を示している。図 30の例においては、 4画素 X 4画素からなる検出対象ブロック Kを中心とする 8画素 X 8画素(64画素) らなる演算ブロック E内において、上述した式(22)を満たし、有効画素として判定さ れた画素(図中白丸)と、式 (22)を満たさず、勾配法の演算対象とされない画素(図 中黒丸)が示されている。
[0315] したがって、有効画素判定部 404は、式(22)を用いて、演算ブロック Et内の各画 素について、水平方向、垂直方向、または斜め方向のいずれかの動きに対して類似 性がある力否かを判定する。そして、有効画素判定部 404は、水平方向、垂直方向、 または斜め方向のどの動きに対しても類似性があると判定した画素、すなわち、有効 画素として判定された画素の数力 50%である力 (全 64画素中 32画素より多いか) 否かを判定し、有効画素として判定された画素が 50%以下の場合は、演算ブロック での演算は不安定であるとし、例えば、演算を打ち切るための処理を行う。なお、有 効画素数カウンタのしきい値を 50%とした力 この値は、もちろん他の値であってもよ い。
[0316] これにより、類似性があまりなぐ異なる動きの画素の混在を少しでも防ぐことができ るので、安定した勾配法演算を行うことができる。この結果、勾配法演算により求めら れる動きベクトルの確からしさが向上し、動きベクトル検出の精度が向上する。
[0317] 一方、有効画素として判定された画素が 50%より多い場合、勾配法演算部 405は 、さらに、式(22)を用いて、演算ブロック Et内の各画素について、水平方向、垂直方 向、または斜め方向のいずれかの動きに対して類似性がある力否かを判定し、水平 方向、垂直方向、または斜め方向のどの動きに対しても類似性がないと判定した画 素を、勾配法演算の対象力も外し、演算ブロック E内において、有効画素として判定 された画素のみ(34画素)を用いて、勾配法演算を行う。
[0318] これにより、水平方向、垂直方向、または斜め方向のいずれかの動きに対して類似 性がある画素のみで、勾配法演算が実行されるため、異なる動きが混入することが抑 制され、より安定した勾配法演算が実行され、その結果、確からしい動きベクトルが検 出される。
[0319] なお、上述した有効画素判定方法においては、水平方向および垂直方向に勾配 が存在する通常の領域 (以下、通常勾配領域と称する)と、水平方向および垂直方 向のどちらか片側にのみ勾配が存在する領域 (以下、片側勾配領域)が区別されるこ となぐ勾配法演算が行われている。したがって、実用上においては、特に、片側勾 配領域における動きベクトルの検出精度が著しく低下してしまうことがある。
[0320] 次に、図 31を参照して、片側勾配領域について説明する。図 31の例においては、 矢印 Tは、図中、左手前の時刻 tのフレーム tから、右奥の時刻 t+ 1のフレーム t+ 1 への時間の経過方向を示している。
[0321] フレーム tおよびフレーム t+ 1上のライン Lは、輝度値 eの画素力 なる領域(白の 領域)と、輝度値 eとは異なる値の輝度値 fの画素力もなる領域 (ハッチング領域)の境 界を示している。
[0322] フレーム tのライン L上には、動きベクトルの検出の対象となる 4画素 X 4画素からな る演算ブロック Etが示されている。なお、図 31の例において、検出対象ブロックは省 略する。一方、フレーム t+ 1上においては、演算ブロック Etに対応する 4画素 X 4画 素からなる演算ブロック Et+ 1が示されている。また、フレーム t+ 1上の点線のブロッ クは、演算ブロック Etと同位相のブロックを表しており、フレーム t+ 1上には、点線の ブロック力ら、勾配法演算が繰り返され、最終的に、演算ブロック Et+ 1が勾配法の 演算の対象として用いられて検出された動きベクトル V(Vx, Vy)が示されている。
[0323] このフレーム tにおいては、右側に拡大されるように、演算ブロック Etの左 2列の画 素(画素 pOO,画素 plO,画素 p20,および画素 ρ30と、画素 ρθΐ,画素 pl l,画素 p 21,および画素 p31)は、すべて同じ輝度値 eであり、演算ブロック Etの右 2列の画素 (画素 p02,画素 pl2,画素 p22,および画素 ρ32と、画素 ρ03,画素 ρ13,画素 ρ23 ,および画素 ρ33)は、すべて同じ輝度値 fである。
[0324] すなわち、演算ブロック Etにおいては、例えば、画素 ρθΐと画素 pOOとの間、および 画素 ρθΐと画素 pl lとの間や、画素 p02と画素 p03との間、および画素 p02と画素 pi 2との間など、同じ領域内の画素同士の間には勾配がないが、画素 ρθΐと画素 p02 の間、画素 pl lと画素 pl2の間、画素 p21と画素 p22の間、および画素 p31と画素 p 32の間に勾配がある。
[0325] したがって、フレーム t上の演算ブロック Et内には、水平方向の勾配のみがあり、垂 直方向の勾配はないので、勾配法の原理から、フレーム t+ 1上において、動きべタト ル Vのうち、水平方向の動きは、検出することができるが、垂直方向の動きを検出す ることはできない。 [0326] ここで、このように構成される片側勾配領域の演算ブロック Etにお 、て、上述した有 効画素判定方法のみを用いた場合、境界部分にある画素(画素 ρθΐ,画素 pl l,画 素 ρ21,および画素 ρ31、並びに画素 ρ02,画素 ρ12,画素 ρ22,および画素 ρ32) については、上述した水平方向に着目した条件である式(19)を満たすことで、有効 画素であると判定される。
[0327] し力しながら、実際に、このような水平方向のみに勾配を有する画素を多く含む演 算ブロックにおいて、式(14)を用いた勾配法演算が行われてしまうと、その結果、本 来検出されないはずの垂直方向の動きベクトル (すなわち、誤った動きベクトル)が検 出されてしまう恐れがある。
[0328] すなわち、実際には、フレーム t+ 1のライン L上において、演算ブロック Et+ 1よりも 上または下の位置のブロックが演算対象として用いられて検出される動きベクトルが 最適な動きベクトルである可能性もあるにも拘わらず、フレーム t+ 1上において、点 線のブロック力ら、勾配法演算が繰り返され、最終的に、演算ブロック Et+ 1が勾配 法の演算の対象として用いられて算出された動きベクトル V (Vx, Vy)が、最適な動 きベクトルとして評価されて、検出されてしまう恐れがある。
[0329] そこで、有効画素判定部 404は、有効画素判定後に、さらに、各画素の水平および 垂直方向毎の勾配状態に基づぐ勾配法実行判定を行い、その判定結果に応じて、 勾配法演算部 405に、式(14)を用いての統合型勾配法演算、および式(14)を簡易 的にした次の式(23)を用いての独立型勾配法演算のどちらかに切り替えさせ、動き ベクトルを算出させる。
[0330] [数 22]
5" s i gn (Ax) At
vx= ― ,
∑| Ax |
∑s i gn (Ay) At
•••(23)
[0331] この式(23)を用いての独立型勾配法演算は、動きベクトルの水平方向成分を求め る場合には、演算対象の画素の垂直勾配を用いず、動きベクトルの垂直方向成分を 求める場合には、演算対象の画素の水平勾配を用いていない。すなわち、各方向成 分毎にそれぞれの勾配を使用して動きを検出することができるので、水平勾配または 垂直勾配しかな 、片側勾配領域にぉ 、ても、確力もし 、動きベクトルをすることが可 能になり、動きベクトルの検出精度の向上が可能になる。
[0332] また、この独立型勾配法演算は、式(14)の統合型勾配法演算に較べて演算負荷 力 S小さぐハードウ アへの実装が容易である。
[0333] 次に、有効画素判定後に実行される勾配法実行判定について説明する。
[0334] 有効画素判定部 404は、演算ブロックのうち、上述した有効画素判定処理により有 効画素であると判定された画素に対して、さらに、水平方向の勾配の有無と、垂直方 向の勾配の有無をそれぞれ判定し、有効画素判定処理により得られる有効画素の数 (cnt_t)、水平方向に勾配のない画素の数 (ngcnt_x)、および垂直方向に勾配のない 画素の数 (ngcnt を取得し、これらの値を用いた次の式(24)乃至式(26)を用いて、 勾配法実行判定処理を行う。
[0335] [数 23]
cn t_t - ngGn t_x― ngcnt_y≥ px l _a · th3
• · · (24)
[数 24]
cnt_t - ngcnt_x≥ px l _a · th3
•••(25)
[数 25]
cnt_t - ngcnt_y≥ px l _a · th3
•••(26)
[0336] ここで、 pxLaは、演算ブロック内の全画素数を表しており、 ·は、乗算、 th3は、 1未 満の所定のしき 、値を表して 、る。
[0337] まず、式 (24)を満たすと判定された場合、有効画素の中に、水平方向および垂直 方向の勾配を持つ(通常の勾配がある)ものが適切に存在する状態だと考えられる。 そこで、有効画素判定部 404は、勾配フラグ (gladflg=4)を設定し、勾配法演算部 4
05に、式(14)を用いての統合型勾配法演算を実行させる。 [0338] これに対応して、勾配法演算部 405は、勾配フラグ (gladflg=4)の場合、有効画素 を勾配法演算の対象として、式(14)を用いての統合型勾配法演算を実行する。
[0339] なお、勾配フラグ (gladflg=4)の場合、ベクトル評価部 104は、統合型勾配法演算 の結果の動きベクトルとオフセットベクトルの評価値 dfvを比較し、評価値 dfvが小さ いと判定された方を、信頼度が高いと評価し、評価結果に応じて、動きベクトルを修 正 (変更)する。また、ベクトル評価部 104は、統合型勾配法演算の結果の動きべタト ルの信頼度が高い場合、かつ、反復回数が最大回数を満たしていない場合のみ、反 復勾配演算処理を繰り返すと判定する。
[0340] 式 (24)を満たさず、式 (25)および式 (26)を満たすと判定された場合、有効画素 の中に、水平方向および垂直方向のどちらかに勾配がない画素が相当数含まれて いることが考えられる。そこで、有効画素判定部 404は、勾配フラグ (gladflg=0)を設 定し、勾配法演算部 405に、水平および垂直方向毎に、式(23)を用いての独立型 勾配法演算を実行させ、水平および垂直方向毎の演算結果を合わせて、その演算 結果とさせる。このときの方向成分毎の勾配法演算には、対応する方向に勾配が存 在する有効画素のみが使用される。
[0341] これに対応して、勾配法演算部 405は、勾配フラグ (gladflg=0)の場合、有効画素 のうち水平勾配を有する画素を勾配法演算の対象として、式(23)を用いての水平方 向の独立型勾配法演算を実行するとともに、有効画素のうち垂直勾配を有する画素 を勾配法演算の対象として、式 (23)を用いての垂直方向の独立型勾配法演算を実 行する。
[0342] 式(24)を満たさず、式(25)のみを満たすと判定された場合、有効画素の中に、垂 直方向に勾配がない画素が相当数含まれていることが考えられる。そこで、有効画素 判定部 404は、勾配フラグ (gladflg= l)を設定し、勾配法演算部 405に、垂直方向 の動きに関しては演算を行わせず、動き無し (0ベクトル)とさせ、水平方向の動きの みに対して、式(23)を用いての勾配法演算を実行させる。このときの勾配法演算に は、水平方向に勾配が存在する有効画素のみが使用される。
[0343] これに対応して、勾配法演算部 405は、勾配フラグ (gladflg= 1)の場合、有効画素 のうち水平勾配を有する画素を勾配法演算の対象として、式(23)を用いての水平方 向の独立型勾配法演算を実行する。
[0344] 式 (24)を満たさず、式 (26)のみを満たすと判定された場合、有効画素の中に、水 平方向に勾配がない画素が多く含まれていることが考えられる。そこで、有効画素判 定部 404は、勾配フラグ (gladflg= 2)を設定し、勾配法演算部 405に、水平方向の 動きに関しては演算を行わせず、動き無し (0ベクトル)とさせ、垂直方向の動きのみ に対して、式(23)を用いての勾配法演算を実行させる。このときの勾配法演算には 、垂直方向に勾配が存在する有効画素のみが使用される。
[0345] これに対応して、勾配法演算部 405は、勾配フラグ (gladflg= 2)の場合、有効画素 のうち垂直勾配を有する画素を勾配法演算の対象として、式(23)を用いての垂直方 向の独立型勾配法演算を実行する。
[0346] なお、勾配フラグ(gladflg=0, 1, 2)の場合、ベクトル評価部 104においては、独立 型勾配法演算の結果の動きベクトルと 0ベクトルの評価値 dfvが比較され、評価値 dfv が小さいと判定された方が、信頼度が高いと評価され、評価結果に応じて、動きべク トルが修正 (変更)される。さらに、この場合、ベクトル評価部 104においては、反復勾 配演算処理は繰り返されな ヽ。
[0347] 式 (24)乃至式 (26)を満たさないと判定された場合、演算ブロック内に、有効と判 定された画素が少なぐ勾配法演算を行うことが困難な状態であると考えられる。そこ で、有効画素判定部 404は、勾配フラグ (gladflg= 3)を設定し、勾配法演算部 405に 、演算を行わせず、動き無し (0ベクトル)とさせる。
[0348] これに対応して、勾配法演算部 405は、勾配フラグ (gladflg=0)の場合、勾配法演 算処理を実行せず、ベクトル評価部 104においては、評価値 dfvの比較はなされず、 反復勾配演算処理は繰り返されな 、。
[0349] 以上のように、式(24)乃至式(26)を用いて、勾配法実行判定処理を行い、判定結 果に応じて、勾配法演算を切り替えるようにしたので、片側勾配領域においても、確 力らしい動きベクトルを検出することが可能になり、動きベクトルの検出精度の向上が 可能になる。また、独立型勾配法演算において、対象方向に勾配がある有効画素の みを用いて、その方向成分の動きベクトルを求めたり、勾配がない画素が多い方向 成分の動きベクトルを 0ベクトルにするようにしたので、さらに、確からしい動きベクトル をすることが可能になる。
[0350] さらに、勾配法実行判定処理の結果に応じて、勾配法演算の制御だけでなぐベタ トル評価と評価結果に応じた動きベクトルの変更、および、勾配法演算の反復判定も 行うようにしたので、演算負荷の低減や、動きベクトルの検出精度のさらなる向上が 可會 になる。
[0351] 次に、図 32のフローチャートを参照して、反復勾配法演算処理の例を説明する。前 段よりセレクタ 401に初期ベクトル VOが入力される。
[0352] セレクタ 401は、ステップ S301において、オフセットベクトル Vn— 1を選択し、選択 したオフセットベクトル Vn— 1を、メモリ制御信号生成部 402、勾配法演算部 405、お よび評価値演算部 61Bに出力する。
[0353] なお、セレクタ 401は、初期ベクトル選択部 101からの初期ベクトル VOが入力され た場合、入力された初期ベクトル VOを、オフセットベクトル Vn—1として選択し、遅延 部 406から、勾配法演算部 405により演算され、評価判定部 412により評価された結 果の動きベクトル Vが入力された場合、動きベクトル Vを、オフセットベクトル Vn— 1と して選択する。
[0354] メモリ制御信号生成部 402には、信号処理装置 1の図示せぬ制御部から、処理の 開始タイミングと位置情報を制御する制御信号と、セレクタ 401からのオフセットべタト ルを入力される。メモリ制御信号生成部 402は、ステップ S302において、制御信号 およびセレクタ 401からのオフセットベクトル Vn—1に応じて、メモリ 403に記憶されて いる時刻 tの画像のフレーム tと、時刻 t+ 1の画像のフレーム t+ 1から、処理の対象と なる演算ブロックの対象画素値を読み出させ、読み出した対象画素値を、有効画素 判定部 404および勾配法演算部 405に供給させる。
[0355] 有効画素判定部 404は、メモリ 403から供給される対象画素値を入力すると、ステツ プ S303において、有効画素判定処理を実行する。この有効画素判定処理は、図 33 を参照して詳しく後述する。
[0356] ステップ S303の有効画素判定処理により、メモリ 403から供給される対象画素値を 用いて、フレーム tとフレーム t+ 1の演算ブロックの画素差分が演算されることで、演 算ブロックに、勾配法の演算に有効な有効画素の数が、有効画素数カウンタ 441に カウントされる。また、演算ブロックにおいて有効な画素と判定された有効画素につい て、水平方向および垂直方向それぞれの勾配状態が求められ、水平勾配が無い画 素の数と垂直勾配が無い画素の数力 それぞれ、水平勾配無カウンタ 442および垂 直勾配無カウンタ 443にカウントされる。
[0357] 勾配法継続判定部 424は、ステップ S304にお 、て、有効画素数カウンタ 441に記 憶されて 、る値 (有効画素の数)が所定のしき 、値 αより多!、か否かを判定する。ス テツプ S304にお 、て、有効画素の数が所定のしき!/、値 aより多 、と判定された場合 、勾配法継続判定部 424により、演算実行判定部 425、勾配法演算部 405およびべ タトル評価部 104に、勾配法演算を実行させるカウンタフラグ (countflg= 1)が出力さ れ、処理 ίま、ステップ S305に進む。
[0358] 勾配法継続判定部 424からカウンタフラグ (COuntflg= l)が入力されると、演算実行 判定部 425は、ステップ S305において、勾配法実行判定処理を実行する。この勾配 法実行判定処理は、図 35を参照して詳しく後述する。
[0359] ステップ S305の勾配法実行判定処理により、有効画素数カウンタ 441の有効画素 の数、水平勾配無カウンタ 442の水平勾配が無い画素の数、および垂直勾配無カウ ンタ 443の垂直勾配が無い画素の数が参照されて、有効画素における片側勾配の 画素の数が多いか否かが判定され、その判定結果に応じて、勾配法演算部 405が 行う勾配法演算処理を、統合型勾配法演算処理および独立型勾配法演算処理のど ちらかに切り替えるための勾配フラグ (gladflg)が設定され、設定された勾配フラグが、 勾配法演算部 405および評価判定部 412に出力され、処理は、ステップ S306に進 む。
[0360] 一方、勾配法継続判定部 424からカウンタフラグ (COuntflg= 1)が入力され、演算実 行判定部 425から勾配フラグが入力されると、勾配法演算部 405は、ステップ S306 において、勾配法演算処理を実行する。この勾配法演算処理は、図 36を参照して詳 しく後述する。
[0361] ステップ S306の勾配法演算処理により、演算実行判定部 425からの勾配フラグに 応じて、有効画素を用いての統合型勾配法演算処理、または、有効画素のうち、水 平方向に勾配がある画素を用いての水平方向の独立型勾配法演算処理および垂 直方向に勾配がある画素を用いての垂直方向の独立型勾配法演算処理のうちの少 なくともどちらか一方が実行され、動きベクトル Vnが求められ、求められた動きべタト ル Vnがベクトル評価部 104に出力され、処理は、ステップ S307に進む。
[0362] ベクトル評価部 104は、ステップ S307において、ベクトル評価処理を実行する。
このベクトル評価処理は、図 39を参照して詳しく後述する。
[0363] ステップ S307のベクトル評価処理により、勾配フラグに応じて、勾配法演算部 405 から動きベクトル Vn、オフセットベクトル Vn—1、および 0ベクトルの評価値 dfvが求め られ、演算実行判定部 425から勾配フラグに基づいて、動きベクトル Vnと、オフセット ベクトル Vn— 1または 0ベクトルの評価値 dfvが比較され、比較結果に応じて動きべク トル Vが求められる。例えば、動きベクトル Vnとオフセットベクトル Vn— 1の評価値 df Vが比較され、動きベクトル Vnの評価値の信頼度が高いとされた場合、動きベクトル Vnは、動きベクトル Vとされて、勾配法演算の反復回数は 1カウントされる。
[0364] ベクトル評価部 104は、また、ステップ S308において、演算実行判定部 425から勾 配フラグおよび勾配法演算の反復回数に基づ!/、て、勾配法演算を反復するか否か を判定する。
[0365] すなわち、ベクトル評価部 104は、勾配フラグ力 統合型勾配法演算処理を実行さ せるフラグ (すなわち、勾配フラグ (gladflg=4)であり、かつ、勾配法演算の反復回数 が設定された最大反復回数 (例えば、 2回)になっていない場合、ステップ S308にお いて、勾配法演算を反復すると判定し、求められた動きベクトル Vを、遅延部 406に 出力する。
[0366] 遅延部 406は、ベクトル評価部 104から入力される動きベクトル Vを、有効画素判 定部 404および勾配法演算部 405の次の処理のサイクルまで保持し、次の処理のサ イタルで、動きベクトル Vをセレクタ 401に出力する。これにより、処理は、ステップ S3 01に戻り、それ以降の処理が繰り返される。
[0367] また、ベクトル評価部 104は、勾配フラグ力 統合型勾配法演算処理を実行させる フラグ以外であった場合、または、勾配法演算の反復回数が設定された最大反復回 数 (例えば、 2回)になった場合、ステップ S308において、勾配法演算を反復しない 、すなわち、勾配法演算を終了すると判定する。ベクトル評価部 104は、ステップ S3 10において、求められた動きベクトル Vを、検出対象ブロックに対応させて、検出べク トルメモリ 53に記憶させ、反復勾配法処理を終了する。なお、このとき、動きベクトル Vおよびその評価値 dfvは、シフト初期ベクトル割付部 105にも出力される。
[0368] 一方、ステップ S304において、有効画素数が所定のしきい値 αより少ないと判定さ れた場合、勾配法継続判定部 424により、演算実行判定部 425、勾配法演算部 405 および評価値判定部 412に、勾配法演算を打ち切らせるカウンタフラグ (countflg=0) が出力され、処理は、ステップ S309に進む。
[0369] 演算実行判定部 425および勾配法演算部 405は、勾配法継続判定部 424からの カウンタフラグの値力^の場合、勾配法演算を実行せず、評価値判定部 412は、ステ ップ S309において、 0ベクトノレを、動きベクトル Vとして、ステップ S310において、動 きベクトル Vを、検出対象ブロックに対応させて、検出ベクトルメモリ 53に記憶させる。 なお、このときも、 0ベクトルである動きベクトル Vおよびその評価値 dfvは、シフト初期 ベクトル割付部 105にも出力される。
[0370] 以上により、反復勾配法演算処理が終了され、シフト初期ベクトル割付部 105により 、動きベクトル Vおよびその評価値 dfvが用いられて、シフト初期ベクトル割付処理が 実行され、検出ベクトルメモリ 53に記憶された動きベクトル Vは、後段のベクトル割付 部 54により用いられる。
[0371] 以上のように、有効画素判定だけでなぐ有効画素内の各方向の勾配の有無も判 定し、有効画素内の片側勾配の画素の割合に応じて、勾配法演算方法の切り替え、 ベクトル評価の評価 (比較)対象、および、勾配法の反復判定などを行うようにしたの で、通常勾配領域だけでなぐ片側勾配領域であっても、確力もしい動きベクトルが 検出されるとともに、必要以上の演算負荷が軽減される。
[0372] また、ベクトル評価部 104において、有効画素内の片側勾配の画素の割合に応じ て、動きベクトル Vn、オフセットベクトル Vn—1、および 0ベクトルなどの評価値 dfvを 求め、評価値 dfvが小さい、すなわち、信頼度が高いとされる動きベクトルを選択する ようにしたので、光源の移動や影の通過などにより、動きを持つ物体の平均輝度レべ ルが大きく変化する場合であっても、後段のベクトル割付に最適な動きベクトルを与 えることができ、その結果、後段のベクトル割付の精度も向上させることができる。 [0373] 次に、図 33のフローチャートを参照して、図 32のステップ S303の有効画素判定処 理の詳細を説明する。
[0374] 有効画素判定部 404の画素差分算出部 421は、メモリ 403から供給される演算ブ ロックの対象画素値を入力すると、ステップ S321において、画素判定部 422の各部( 有効画素判定部 431、水平勾配判定部 432、および垂直勾配判定部 433)を制御し 、各カウンタ(有効画素数カウンタ 441、水平勾配無カウンタ 442、および垂直勾配 無カウンタ 443)の値をリセットさせる。
[0375] 画素差分算出部 421の各部 (第 1空間勾配画素差分算出部 421— 1、第 2空間勾 配画素差分算出部 421— 2、および時間方向画素差分算出部 421— 3)は、ステップ S322において、演算ブロック内の画素を 1つ選択し、ステップ S323において、有効 画素演算処理を実行する。この有効画素演算処理は、図 34のフローチャートを参照 して説明する。
[0376] 時間方向画素差分算出部 421— 3は、ステップ S351において、演算ブロック内に おける、選択した画素のフレーム t+ 1およびフレーム t間の時間方向の画素差分 Δ t を算出し、算出された画素のフレーム t+ 1およびフレーム t間の時間方向の画素差 分 Atを、画素判定部 422に出力する。
[0377] 第 1空間勾配画素差分算出部 421— 1は、ステップ S352において、演算ブロック 内における、選択した画素のフレーム t+ 1上の水平方向の画素差分 Δχおよび垂直 方向の画素差分 Ayを算出し、算出された画素のフレーム t+ 1上の水平方向の画素 差分 Δ Xおよび垂直方向の画素差分 Ayを、画素判定部 422に出力する。
[0378] 第 2空間勾配画素差分算出部 421— 2は、ステップ S353において、演算ブロック 内における、選択した画素のフレーム t上の水平方向の画素差分 Δχおよび垂直方 向の画素差分 Ayを算出し、算出された画素のフレーム t上の水平方向の画素差分 Δχおよび垂直方向の画素差分 Ayを、画素判定部 422に出力する。
[0379] 画素判定部 422の有効画素判定部 431は、ステップ S354において、第 1空間勾 配画素差分算出部 421— 1からの選択した画素のフレーム t+ 1上の水平方向の画 素差分 Δ Xおよび垂直方向の画素差分 Δ y、第 2空間勾配画素差分算出部 421— 2 力 の選択した画素のフレーム t上の水平方向の画素差分 Δ Xおよび垂直方向の画 素差分 Ay、並びに、時間方向画素差分算出部 421— 3からの選択した画素のフレ ーム t+ 1およびフレーム t間の時間方向の画素差分 A tを用いて、水平方向の着目 条件である式(19)、垂直方向の着目条件である式(20)、および、水平垂直方向の 着目条件である式(21)の論理演算を行う。その後、処理は、図 33のステップ S323 に戻り、ステップ S324に進む。
[0380] ステップ S324において、有効画素判定部 431は、上述した 3つの式の論理和(す なわち、式(22)を求め、式(22)が真である力否力)に基づいて、選択された画素が 有効画素であるか否かを判定する。したがって、上述した式(19)乃至式(21)のうち 、いずれか 1つの式を満たす場合、有効画素判定部 431は、ステップ S324において 、その画素は有効画素であると判定し、ステップ S325において、有効画素数カウン タ 441の有効画素の数を 1加算する。
[0381] 水平勾配判定部 432は、有効画素判定部 431の制御のもと、ステップ S326におい て、有効画素判定部 431により有効画素であると判定された画素の水平方向の勾配 の状態を求め、有効画素の水平方向の勾配がある力否かを判定し、有効画素の水 平方向の勾配がないと判定した場合、ステップ S327において、水平勾配無カウンタ 442の水平勾配がない画素の数を 1加算する。ステップ S326において、有効画素の 水平方向の勾配があると判定された場合、処理は、ステップ S327をスキップし、ステ ップ S328に進む。
[0382] 垂直勾配判定部 433は、有効画素判定部 431の制御のもと、ステップ S328におい て、有効画素判定部 431により有効画素であると判定された画素の垂直方向の勾配 の状態を求め、有効画素の垂直方向の勾配がある力否かを判定し、有効画素の垂 直方向の勾配がないと判定した場合、ステップ S329において、垂直勾配無カウンタ 443の垂直勾配がない画素の数を 1加算する。ステップ S328において、有効画素の 垂直方向の勾配があると判定された場合、処理は、ステップ S329をスキップし、ステ ップ S330に進む。
[0383] ステップ S330において、画素差分算出部 421は、演算ブロック内のすべての画素 の処理が終了したか否かを判定する。ステップ S330において、演算ブロック内のす ベての画素の処理が終了したと判定された場合、有効画素数判定処理は終了され、 処理 ίま、図 32のステップ S303に戻り、ステップ S304に進む。
[0384] ステップ S324において、上述した式(19)乃至式(21)のいずれの式も満たさず、 選択された画素は有効画素ではないと判定された場合、または、ステップ S330にお V、て、演算ブロック内のすべての画素の処理がまだ終了して ヽな 、と判定された場 合、処理は、ステップ S322に戻り、それ以降の処理が繰り返される。
[0385] 以上のようにして、有効画素数カウンタ 441には、演算ブロック内において有効であ ると判定された有効画素の数、水平勾配無カウンタ 442には、有効画素のうち、水平 勾配がないと判定された画素の数、および垂直勾配無カウンタ 443には、有効画素 のうち、垂直勾配がないと判定された画素の数が記憶される。
[0386] 次に、図 35のフローチャートを参照して、図 32のステップ S305の勾配法実行判定 処理を詳しく説明する。図 35の勾配法実行判定処理は、図 34を参照して上述したよ うに画素の数が記憶された各カウンタに基づいて、演算実行判定部 425により実行さ れる処理である。
[0387] 演算実行判定部 425のカウンタ値演算部 451は、有効画素数カウンタ 441から、有 効画素の数(cnt_t)、水平勾配無カウンタ 442から、水平方向に勾配のない画素の数 (ngcnt_x)、および垂直勾配無カウンタ 443から、垂直方向に勾配のない画素の数 (ng cntj)を取得し、ステップ S381〖こおいて、式(24)を満たすか否かを判定する。
[0388] ステップ S381において、式(24)を満たすと判定された場合、有効画素の中に、水 平方向および垂直方向の勾配を持つ画素が適切に存在すると考えられる。したがつ て、フラグ設定部 452は、ステップ S382において、勾配フラグの値を、式(14)を用 V、ての統合型勾配法演算処理を行わせる「4」に設定し、勾配フラグ (gladflg=4)を、 勾配法演算部 405および評価判定部 412に出力し、勾配法実行判定処理を終了す る。そして、処理は、図 32のステップ S305に戻り、ステップ S306に進み、勾配フラグ (gladflg=4)に応じた勾配法演算処理が実行される。
[0389] ステップ S381にお 、て、式(24)を満たさな!/、と判定された場合、カウンタ値演算 部 451は、ステップ S383において、式(25)かつ式(26)を満たすか否かを判定する 。ステップ S383において、式(25)かつ式(26)を満たすと判定された場合、有効画 素の中に、水平方向および垂直方向のどちらかに勾配がない画素が相当数含まれ ていると考えられる。したがって、フラグ設定部 452は、ステップ S384において、勾配 フラグの値を、水平および垂直方向毎に、式(23)を用いての独立型勾配法演算処 理を行わせる「0」に設定し、勾配フラグ (gladflg=0)を、勾配法演算部 405および評 価判定部 412に出力し、勾配法実行判定処理を終了する。そして、処理は、図 32の ステップ S305〖こ戻り、ステップ S306〖こ進み、勾配フラグ(gladflg=0)に応じた勾配 法演算処理が実行される。
[0390] ステップ S383において、式(25)かつ式(26)を満たさないと判定された場合、カウ ンタ値演算部 451は、ステップ S385において、式(25)を満たすか否かを判定する。 ステップ S385において、式(25)を満たすと判定された場合、有効画素の中に、垂 直方向に勾配がない画素が多く含まれていると考えられる。したがって、フラグ設定 部 452は、ステップ S386〖こおいて、勾配フラグの値を、水平方向に対しての、式(23 )を用いての独立型勾配法演算処理を行わせる「1」に設定し、勾配フラグ (gladflg= 1)を、勾配法演算部 405および評価判定部 412に出力し、勾配法実行判定処理を 終了する。そして、処理は、図 32のステップ S305に戻り、ステップ S306に進み、勾 配フラグ (gladflg= 1)に応じた勾配法演算処理が実行される。
[0391] ステップ S385において、式(25)を満たさないと判定された場合、カウンタ値演算 部 451は、ステップ S387において、式(26)を満たすか否かを判定する。ステップ S3 87において、式(26)を満たすと判定された場合、有効画素の中に、水平方向に勾 配がない画素が多く含まれていると考えられる。したがって、フラグ設定部 452は、ス テツプ S388において、勾配フラグの値を、垂直方向に対しての、式(23)を用いての 独立型勾配法演算処理を行わせる「2」に設定し、勾配フラグ (gladflg= 2)を、勾配法 演算部 405および評価判定部 412に出力し、勾配法実行判定処理を終了する。そし て、処理は、図 32のステップ S305〖こ戻り、ステップ S306〖こ進み、勾配フラグ(gladflg = 2)に応じた勾配法演算処理が実行される。
[0392] ステップ S387において、式(26)を満たさないと判定された場合、有効と判定され た画素が少ないと考えられる。したがって、フラグ設定部 452は、ステップ S389にお いて、勾配フラグの値を、勾配法演算処理を禁止させる「3」に設定し、勾配フラグ (gl adflg= 3)を、勾配法演算部 405および評価判定部 412に出力し、勾配法実行判定 処理を終了する。そして、処理は、図 32のステップ S305に戻り、ステップ S306に進 み、勾配フラグ (gladflg= 3)に応じた勾配法演算処理が実行される。
[0393] 以上のようにして、演算ブロックの勾配状態 (すなわち、有効画素の数、有効画素の うち、水平勾配がない画素の数、および有効画素のうち、垂直勾配がない画素の数) に応じた勾配フラグが、勾配法演算部 405および評価判定部 412に出力される。
[0394] 次に、図 36のフローチャートを参照して、勾配法演算部 405により実行される、図 3 2のステップ S306の勾配法演算処理を詳しく説明する。
[0395] 演算判定部 462の有効画素判定部 471には、勾配法継続判定部 424からのカウ ンタフラグ (countflg= 1)と、フラグ設定部 452からの勾配フラグが入力されている。 有効画素判定部 471は、カウンタフラグが 1である場合、図 36の勾配法演算処理を 開始する。
[0396] 有効画素判定部 471は、ステップ S401において、勾配フラグの値が 3であるか否 かを判定し、勾配フラグの値が 3ではないと判定した場合、ステップ S402において、 勾配フラグの値力 である力否かを判定する。
[0397] 有効画素判定部 471は、ステップ S402において、勾配フラグの値力 であると判定 した場合、ステップ S403において、勾配法演算部 405の各部を制御し、統合型勾配 法演算処理を実行させる。この統合型勾配法演算処理は、図 37のフローチャートを 参照して後述する。
[0398] ステップ S403の統合型勾配法演算処理により、有効画素が勾配法演算の対象とさ れ、有効画素の水平方向の画素差分 Δ χ、垂直方向の画素差分 Ay、および時間方 向の画素差分 Δ tが積算されて、積算された勾配と式(14)の最小自乗和を用いて、 動きベクトル vnが求められて、ベクトル算出部 464に出力される。
[0399] ベクトル算出部 464は、ステップ S404において、セレクタ 401からのオフセットべク トル Vn—lに、統合型勾配演算部 463— 1により求められた動きベクトル vnを加算し 、オフセットベクトル Vn— 1に動きベクトル vnが加算された動きベクトル Vnをベクトル 評価部 104に出力する。
[0400] ステップ S404において、ベクトル算出部 464により算出された動きベクトル Vnは、 ベクトル評価部 104に出力され、勾配法演算処理は終了され、処理は、図 32のステ ップ S306【こ戻り、ステップ S307【こ進む。
[0401] また、ステップ S402〖こお 、て、勾配フラグの値が 4ではな 、と判定された場合、有 効画素判定部 471は、ステップ S405において、勾配フラグの値が 2であるか否かを 判定する。ステップ S405において、勾配フラグの値が 2であると判定された場合、有 効画素の中に、水平方向に勾配がな 、画素が多く含まれて 、ると考えられるので、 処理は、ステップ S406をスキップし、ステップ S407〖こ進む。
[0402] すなわち、この場合、水平方向に勾配がない画素以外の有効画素を用いて、動き ベクトルの水平方向成分を求めても確からしくないので、水平方向の独立型勾配法 演算処理は実行されない。
[0403] 有効画素判定部 471は、ステップ S405において、勾配フラグの値が 2ではない(す なわち、勾配フラグの値は、 0か 1である)と判定した場合、ステップ S406において、 水平勾配判定部 472を制御し、水平方向の独立型勾配法演算処理を実行させる。こ の水平方向の独立型勾配法演算処理は、図 38を参照して後述する。
[0404] ステップ S406の水平方向の独立型勾配法演算処理により、有効画素のうち、水平 方向に勾配がある画素が勾配法演算の対象とされ、有効画素のうち、水平方向に勾 配がある画素の水平方向の画素差分 Δ x、および時間方向の画素差分 Δ tが積算さ れて、積算された勾配と式(23)を用いて、動きベクトル vnの水平方向成分が求めら れて、ベクトル算出部 464に出力され、処理は、ステップ S407に進む。
[0405] ステップ S407において、有効画素判定部 471は、勾配フラグの値が 1であるか否 かを判定する。ステップ S407において、勾配フラグの値が 1であると判定された場合 、有効画素の中に、垂直方向に勾配がない画素が多く含まれていると考えられるの で、処理は、ステップ S408をスキップし、ステップ S409〖こ進む。
[0406] すなわち、この場合、垂直方向に勾配がない画素以外の有効画素を用いて、動き ベクトルの垂直方向成分を求めても確からしくないので、垂直方向の独立型勾配法 演算処理は実行されない。
[0407] 有効画素判定部 471は、ステップ S407において、勾配フラグの値が 1ではない(す なわち、勾配フラグの値は、 0か 2である)と判定した場合、ステップ S408において、 垂直勾配判定部 473を制御し、垂直方向の独立型勾配法演算処理を実行させる。 なお、この垂直方向の独立型勾配法演算処理は、ステップ S406の水平方向の独立 型勾配法演算処理と、対象とする方向が異なるだけであり、基本的な処理は同じで あるので、図 38を参照して、独立型勾配法演算処理としてまとめて後述する。
[0408] ステップ S408の垂直方向の独立型勾配法演算処理により、有効画素のうち、垂直 方向に勾配がある画素が勾配法演算の対象とされ、有効画素のうち、垂直方向に勾 配がある画素の垂直方向の画素差分 Ay、および時間方向の画素差分 A tが積算さ れて、積算された勾配と式(23)を用いて、動きベクトル vnの垂直方向成分が求めら れて、ベクトル算出部 464に出力され、処理は、ステップ S409に進む。
[0409] ベクトル算出部 464には、独立型勾配演算部 463— 2より動きベクトル vnの水平方 向成分および垂直方向成分の少なくとも一方が入力される。ベクトル算出部 464は、 ステップ S409において、セレクタ 401からのオフセットベクトル Vn—lの対象方向成 分 (水平方向成分および垂直方向成分の少なくとも一方)と、独立型勾配演算部 46 3— 2により求められた動きベクトル vnの対象方向成分を加算し、その結果である動 きベクトル Vnをベクトル評価部 104に出力する。
[0410] なお、このとき、動きベクトル vnの方向成分のうち、独立型勾配演算部 463— 2より 入力されない方向成分は、 0ベクトルとして算出される。すなわち、勾配フラグの値が 2である場合には、独立型勾配演算部 463— 2より動きベクトル vnの垂直方向成分が 求められないので、ベクトル算出部 464は、動きベクトル vnの垂直方向成分を 0ベタト ルとし、勾配フラグの値が 1である場合には、独立型勾配演算部 463— 2より動きべク トル vnの水平方向成分が求められないので、ベクトル算出部 464は、動きベクトル vn の水平方向成分を 0ベクトルとする。
[0411] ステップ S409において、ベクトル算出部 464により算出された動きベクトル Vnは、 ベクトル評価部 104に出力され、勾配法演算処理は終了され、処理は、図 32のステ ップ S306【こ戻り、ステップ S307【こ進む。
[0412] 一方、ステップ S401において、勾配フラグの値が 3であると判定された場合、ステツ プ S410において、有効画素判定部 471は、勾配法演算部 405の演算を禁止させ、 勾配法演算処理を終了する。
[0413] 以上のように、有効画素に片側勾配の画素が少ない場合には、有効画素が用いら れての統合型勾配法演算により動きベクトルが求められ、有効画素に片側勾配の画 素が多い場合には、有効画素のうち、勾配がある方向の画素のみが用いられての独 立型勾配法演算により動きベクトルが求められる。
[0414] これにより、演算ブロックに片側勾配の画素が多い場合であっても、少なくとも勾配 がある方向成分の確からしい動きベクトルを得ることができる。したがって、片側勾配 領域であっても、動きベクトルの検出精度が向上される。
[0415] また、片側勾配の領域に対しては、簡易的な独立型勾配法演算が行われるので、 演算の負荷を抑制することができる。
[0416] 次に、図 37のフローチャートを参照して、図 36のステップ S403の統合型勾配法演 算処理を詳しく説明する。
[0417] 勾配法演算部 405の画素差分算出部 461には、メモリ 403から供給される演算ブ ロックの対象画素値を入力されている。画素差分算出部 461の各部 (第 1空間勾配 画素差分算出部 461— 1、第 2空間勾配画素差分算出部 461— 2、および時間方向 画素差分算出部 461— 3)は、有効画素判定部 471の制御のもと、ステップ S421に おいて、演算ブロック内の画素を 1つ選択し、ステップ S422に進み、有効画素演算 処理を実行する。この有効画素演算処理は、図 34を参照して上述した有効画素演 算処理と基本的に同様な処理であるので、その説明を省略する。
[0418] ステップ S422の有効画素演算処理により、選択した画素のフレーム t+ 1上の水平 方向の画素差分 Δ Xおよび垂直方向の画素差分 Ay、フレーム t上の水平方向の画 素差分 Δ χおよび垂直方向の画素差分 Ay、並びに、フレーム t+ 1およびフレーム t 間の時間方向の画素差分 A tが求められ、それらを用いて、式(19)乃至式(21)の 論理演算が行われる。
[0419] 有効画素判定部 471は、ステップ S423において、上述した 3つの式の論理和(す なわち、式(22)を求め、式(22)が真である力否力)に基づいて、選択された画素が 有効画素であるか否かを判定する。ステップ S423において、選択された画素が有効 画素ではないと判定された場合、処理は、ステップ S421に戻り、それ以降の処理が 繰り返される。
[0420] 有効画素判定部 471は、ステップ S423において、有効画素であると判定した場合 、その画素を勾配法の演算対象とし、その画素の水平方向の画素差分 Δ χ、垂直方 向の画素差分 Ay、および時間方向の画素差分 A tを、統合型勾配演算部 463— 1 に供給し、ステップ S424において、統合型勾配演算部 463— 1を制御し、供給した 勾配 (画素差分)を積算させる。
[0421] 有効画素判定部 471は、ステップ S425において、演算ブロック内のすべての画素 の処理が終了したか否かを判定する。ステップ S425において、演算ブロック内のす ベての画素の処理がまだ終了していないと判定された場合、処理は、ステップ S421 に戻り、それ以降の処理が繰り返される。
[0422] 有効画素判定部 471は、ステップ S425において、演算ブロック内のすべての画素 の処理が終了したと判定した場合、ステップ S426において、統合型勾配演算部 463 — 1を制御し、積算された勾配を用いて、動きベクトル vnを算出させる。
[0423] すなわち、統合型勾配演算部 463— 1は、ステップ S424において、演算判定部 52 4より供給された有効画素の時間方向の画素差分 A t、水平方向の画素差分 Δ χ、お よび、垂直方向の画素差分 Ayを積算し、ステップ S425において演算ブロック内の すべての画素の処理が終了したと判定された場合、ステップ S426において、積算さ れた勾配と式(14)の最小自乗和を用いて、動きベクトル vnを求め、求めた動きべタト ノレ vnを、ベクトノレ算出咅464に出力する。この後、処理 ίま、図 36のステップ S403に 戻り、ステップ S404に進む。
[0424] 以上のように、演算ブロックのうち、有効画素の勾配のみが積算されて、統合型勾 配法演算処理が実行される。これにより、演算ブロックに対して、誤った動きベクトル が検出されることが抑制される。
[0425] 次に、図 38のフローチャートを参照して、ステップ S406および S408の独立型勾配 法演算処理を詳しく説明する。なお、図 38においては、水平方向の場合を説明する 力 垂直方向の場合も、対象となる方向成分が異なるだけであり、水平方向の場合と 基本的に同様の処理となる。
[0426] 勾配法演算部 405の画素差分算出部 461には、メモリ 403から供給される演算ブ ロックの対象画素値を入力されている。画素差分算出部 461の各部は、有効画素判 定部 471の制御のもと、ステップ S441において、演算ブロック内の画素を 1つ選択し 、ステップ S442に進み、有効画素演算処理を実行する。この有効画素演算処理も、 図 34を参照して上述した有効画素演算処理と基本的に同様な処理であるので、そ の説明を省略する。
[0427] ステップ S442の有効画素演算処理により、選択した画素のフレーム t+ 1上の水平 方向の画素差分 Δ Xおよび垂直方向の画素差分 Ay、フレーム t上の水平方向の画 素差分 Δ χおよび垂直方向の画素差分 Ay、並びに、フレーム t+ 1およびフレーム t 間の時間方向の画素差分 A tが求められ、それらを用いて、式(19)乃至式(21)の 論理演算が行われる。
[0428] 有効画素判定部 471は、ステップ S443において、上述した 3つの式の論理和(す なわち、式(22)を求め、式(22)が真である力否力)に基づいて、選択された画素が 有効画素であるか否かを判定する。ステップ S443において、選択された画素が有効 画素ではないと判定された場合、処理は、ステップ S441に戻り、それ以降の処理が 繰り返される。
[0429] 有効画素判定部 471は、ステップ S443において、有効画素であると判定した場合 、ステップ S444において、水平勾配判定部 472を制御し、有効画素の対象方向(い まの場合、水平方向)に勾配がある力否かを判定させる。ステップ S444において、有 効画素の対象方向(いまの場合、水平方向)に勾配がないと判定された場合、処理 は、ステップ S441に戻り、それ以降の処理が繰り返される。
[0430] すなわち、演算ブロック内の次の画素に対しての有効画素判定および片側勾配判 定が繰り返される。
[0431] 水平勾配判定部 472は、有効画素の水平方向に勾配があると判定した場合、その 画素を、勾配法の演算対象とし、その画素の水平方向の画素差分 Δ χ、および時間 方向の画素差分 A tを、独立型勾配演算部 463— 2に供給し、ステップ S445におい て、独立型勾配演算部 463— 2を制御し、供給した勾配 (画素差分)を積算させる。
[0432] 有効画素判定部 471は、ステップ S446において、演算ブロック内のすべての画素 の処理が終了したか否かを判定する。ステップ S446において、演算ブロック内のす ベての画素の処理がまだ終了していないと判定された場合、処理は、ステップ S441 に戻り、それ以降の処理が繰り返される。 [0433] 有効画素判定部 471は、ステップ S446において、演算ブロック内のすべての画素 の処理が終了したと判定した場合、ステップ S447において、独立型勾配演算部 463 —2を制御し、積算された勾配を用いて、対象方向の動きベクトル vnを算出させる。
[0434] すなわち、独立型勾配演算部 463— 2は、ステップ S445において、水平勾配判定 部 472より供給された、水平方向に勾配がある有効画素の時間方向の画素差分 A t 、および水平方向の画素差分 Δ χを積算し、ステップ S446において演算ブロック内 のすベての画素の処理が終了したと判定された場合、ステップ S447において、積算 された勾配と式(23)を用いて、動きベクトル vnの対象方向(水平方向)成分を求め、 求めた動きベクトル vnの水平方向成分を、ベクトル算出部 464に出力する。この後、 処理 ίま、図 36のステップ S406に戻り、ステップ S407に進む。
[0435] 以上のように、演算ブロックの有効画素のうち、対象方向に勾配がある画素の勾配 のみが積算されて、対象方向の勾配法演算処理が実行される。これにより、演算プロ ックが片側勾配領域に含まれていたとしても、演算ブロックに対して、誤った動きべク トルの対象方向成分が検出されることが抑制される。
[0436] 次に、図 39のフローチャートを参照して、図 32のステップ S307のベクトル評価処 理を説明する。
[0437] 評価値判定部 412は、フラグ設定部 452からの勾配フラグが入力されると、図 39の ベクトル評価処理を開始する。評価値判定部 412は、ステップ S461において、勾配 フラグの値が 3である力否かを判定し、勾配フラグの値が 3ではな 、と判定した場合 ( すなわち、勾配法演算が実行されていると判定した場合)、ステップ S462において、 評価値演算部 61Bを制御し、オフセットベクトル Vn— 1、動きベクトル Vn、および 0ベ タトルの評価値演算処理を実行させる。この評価値演算処理は、図 15を参照して上 述した評価値演算処理と基本的に同様の処理を行うので、その説明を省略する。
[0438] ステップ S462の評価値演算処理により、セレクタ 401からのオフセットベクトル Vn —1、統合型勾配演算部 463— 1または独立型勾配演算部 463— 2により演算され、 ベクトル算出部 464により算出された動きベクトル Vn、および 0ベクトルの評価値 dfv が演算される。
[0439] 評価値判定部 412は、ステップ S463において、勾配フラグの値力 であるか否かを 判定し、勾配フラグの値が 4であると判定した場合 (すなわち、統合型勾配演算部 46 3—1により演算された動きベクトル Vnの場合)、ステップ S464において、ベクトル算 出部 464により算出された動きベクトル Vnの評価値 dfv(n)力 オフセットベクトル Vn 1の評価値 dfv(n— 1)よりも小さ 、か否かを判定する。
[0440] ステップ S464において、評価値 dfv(n—l)の方力 評価値 dfv(n)よりも小さい(ォ フセットベクトル Vn— 1の方が、信頼性が高い)と判定された場合、評価値判定部 41 2は、ステップ S465において、オフセットベクトル Vn—1を動きベクトル Vに決定する 。すなわち、動きベクトル Vは、ベクトル算出部 464により算出された動きベクトル Vn ではなぐオフセットベクトル Vn—1に変更 (修正)される。そして、評価値判定部 412 は、ステップ S466〖こおいて、勾配法演算の反復回数を最大値にし、ベクトル評価処 理を終了する。
[0441] すなわち、ステップ S466においては、オフセットベクトル Vn— 1であった動きべタト ル Vが用いられて勾配法演算が繰り返されても、結果は同じであるので、勾配法演算 が繰り返されることがな 、ように反復回数が最大値にされる。
[0442] また、ステップ S464において、評価値 dfv(n)の方力 評価値 dfv (n— 1)よりも小さ い(ベクトル算出部 464により算出された動きベクトル Vnの方力 信頼性が高い)と判 定された場合、評価値判定部 412は、ステップ S467において、ベクトル算出部 464 により算出された動きベクトル Vnを、そのまま、動きベクトル Vに決定し、ステップ S46 8において、勾配法演算の反復回数を 1加算し、ベクトル評価処理を終了する。
[0443] 一方、ステップ S463にお 、て、勾配フラグの値が 4ではな 、と判定された場合 (す なわち、独立型勾配演算部 463— 2により演算された動きベクトル Vnの場合)、ステ ップ S469において、ベクトル算出部 464により算出された動きベクトル Vnの評価値 d fv(n)力 0ベクトルの評価値 dfv(O)よりも小さいか否かを判定する。
[0444] ステップ S469において、評価値 dfv(n)の方が、評価値 dfv(O)よりも小さい(ベタト ル算出部 464により算出された動きベクトル Vnの方が、信頼性が高い)と判定された 場合、評価値判定部 412は、ステップ S470において、ベクトル算出部 464により算 出された動きベクトル Vnを、そのまま、動きベクトル Vに決定し、ベクトル評価処理を 終了する。 [0445] また、ステップ S469において、評価値 dfv(O)の方力 評価値 dfv(n)よりも小さい( 0ベクトルの方が、信頼性が高い)と判定された場合、評価値判定部 412は、ステップ S471において、 0ベクトルを、動きベクトル Vに決定し、ベクトル評価処理を終了する 。すなわち、ステップ S471において、動きベクトル Vは、ベクトル算出部 464により算 出された動きベクトル Vnではなぐ 0ベクトルに変更 (修正)される。
[0446] 一方、ステップ S461にお 、て、勾配フラグの値が 3であると判定された場合、演算 ブロックにおいて、有効画素が少ないと判定された場合であるので、ステップ S472に おいて、 0ベクトルを、動きベクトル Vに決定し、すなわち、動きベクトル Vは、ベクトル 算出部 464により算出された動きベクトル Vnではなぐ 0ベクトルに変更 (修正)され、 ベクトル評価処理を終了する。
[0447] 以上のように、勾配フラグの値に基づいて、ベクトル評価における比較対象を切り 替えて、動きベクトルを評価し、評価結果に応じて、動きベクトルを変更 (修正)するよ うにしたので、演算ブロック内の勾配の状態に応じた精度のよい動きベクトルを検出 することができる。
[0448] なお、上記説明においては、有効画素を判定した後に、水平勾配および垂直勾配 を判定して、有効画素内の勾配状態 (すなわち、水平勾配、または垂直勾配のみ有 する画素の割合)を求め、それに基づいて、勾配法実行判定を行う場合を説明した 力 以下に説明するように、有効画素を判定する条件式である式(19)乃至式 (21) を用いて水平勾配、または垂直勾配のみ有する画素の割合を求め、それに基づいて 、勾配法実行判定を行うこともできる。
[0449] 図 40は、図 26の有効画素判定部の画素判定部、カウンタ、および演算実行判定 部の他の構成例を示すブロック図である。
[0450] 図 40の例の画素判定部 422は、有効画素判定部 431を備える点が、図 26の画素 判定部 422と共通するが、水平勾配判定部 432と垂直勾配判定部 433が除かれた 点が、図 26の画素判定部 422と異なっている。なお、図 40の例において、有効画素 判定部 431は、さらに、水平垂直勾配判定部 431— 1、水平勾配判定部 431— 2、お よび垂直勾配判定部 431— 3により構成されて 、る。
[0451] 水平垂直勾配判定部 431— 1は、式(21)を用いて、演算ブロック内の画素が水平 垂直着目条件を満たすカゝ否カゝどうかを判定し、演算ブロック内の画素が水平垂直着 目条件を満たすと判定した場合、すなわち、垂直方向および水平方向に勾配を有し 、水平および垂直方向の動きに類似性があることから、水平勾配および垂直勾配 (以 下、水平垂直勾配とも称する)があると判定し、水平垂直勾配カウンタ 481の値 (水平 勾配および垂直勾配がある画素の数)を 1加算するとともに、有効画素数カウンタ 44 1の値を 1加算する。
[0452] 水平勾配判定部 431— 2は、式(19)を用いて、演算ブロック内の画素が水平着目 条件を満たす力否力どうかを判定し、演算ブロック内の画素が水平着目条件を満た すと判定した場合、すなわち、水平勾配が垂直勾配よりもある程度大きぐより支配的 であり、かつ、水平方向の動きに類似性があることから、水平勾配があると判定し、水 平勾配カウンタ 482の値 (水平勾配がある画素の数)を 1加算するとともに、有効画素 数カウンタ 441の値を 1加算する。
[0453] 垂直勾配判定部 431— 3は、式(20)を用いて、演算ブロック内の画素が垂直着目 条件を満たす力否力どうかを判定し、演算ブロック内の画素が垂直着目条件を満た すと判定した場合、すなわち、垂直勾配が水平勾配よりもある程度大きぐより支配的 であり、かつ、垂直方向の動きに類似性があるとされ、垂直勾配があると判定し、垂直 勾配カウンタ 483の値 (垂直勾配がある画素の数)を 1加算するとともに、有効画素数 カウンタ 441の値を 1加算する。
[0454] 図 40の例のカウンタ 423は、有効画素カウンタ 441を有する点力 図 26のカウンタ 423と共通する力 水平勾配無カウンタ 442および垂直勾配無カウンタ 443が除か れた点、水平垂直勾配カウンタ 481、水平勾配カウンタ 482、および垂直勾配無カウ ンタ 483が追加された点力 図 26のカウンタ 423と異なっている。
[0455] 水平垂直勾配カウンタ 481は、演算ブロック毎に、水平垂直勾配判定部 431— 1に より、水平勾配および垂直勾配 (以下、水平垂直勾配とも称する)があると判定された 画素(有効画素)の数を記憶する。水平勾配カウンタ 482は、演算ブロック毎に、水平 勾配判定部 431— 2により、水平勾配があると判定された画素 (有効画素)の数を記 憶する。垂直勾配カウンタ 483は、演算ブロック毎に、垂直勾配判定部 431— 3により 、垂直勾配があると判定された画素 (有効画素)の数を記憶する。 [0456] 図 40の例の演算実行判定部 425は、フラグ設定部 452を備える点が、図 29の演 算実行判定部 425と共通するが、カウンタ値演算部 451の代わりに、カウンタ値演算 部 491が追加された点力 図 26の演算実行判定部 425と異なっている。
[0457] カウンタ値演算部 491は、勾配法継続判定部 424からのカウンタフラグの値が 1で あるとき、カウンタ 423 (有効画素数カウンタ 441、水平垂直勾配カウンタ 481、水平 勾配カウンタ 482、および垂直勾配無カウンタ 483)から、有効画素の数(cnt_t)、水 平方向および垂直方向に勾配のある画素の数(cnt_xy)、水平方向に勾配のある画 素の数(cnt_x)、および垂直方向に勾配のある画素の数(cntj)を取得して、演算ブ ロックにおける有効画素と、有効画素のうちの片側勾配の画素の割合を演算し、割合 の演算結果に応じて、フラグ設定部 452が設定する勾配フラグの値を制御する。
[0458] すなわち、カウンタ値演算部 491は、有効画素の数 (cnt_t)、水平垂直方向に勾配 のある画素の数(cnt_xy)、水平方向に勾配のある画素の数(cnt_x)、および垂直方向 に勾配のある画素の数 (cnt_y)を用いた次の式(27)乃至式(30)を用いて、勾配法 実行判定処理を行う。
[0459] [数 26]
cnt_t≥px l_a · th4
•••(27)
[数 27]
cnt_xy
—— ^r-^≤px i a · tho
cnt_t -
•••(28)
[数 28]
cnt— x 、
—— ^r-≥px l a · tho
cnt— t -
•••(29)
[数 29]
cnt_y 、
—— ^r-≥px l a · th /
cnt t ― • · · (30)
[0460] ここで、 pxLaは、演算ブロック内の全画素数を表しており、 ·は、乗算、 th4乃至 th7 は、それぞれ異なる 1未満の所定のしきい値を表している。なお、 th4 >th5, th6, t h7である。
[0461] まず、式 (27)を満たさないと判定された場合、または、式 (27)を満たすが、式 (28 )乃至式 (30)を満たさないと判定された場合、演算ブロック内に、有効と判定された 画素が少なぐ勾配法演算を行うことが困難な状態であると考えられる。そこで、カウ ンタ値演算部 491は、勾配フラグ (gladflg= 3)を付加し、勾配法演算部 405に、演算 を行わせず、動き無し (0ベクトル)とさせる。
[0462] 式 (27)を満たし、さらに、式 (28)を満たすと判定された場合、有効画素の中に、水 平方向および垂直方向の勾配を持つ(通常の勾配がある)ものが適切に存在する状 態だと考えられる。そこで、カウンタ値演算部 491は、勾配フラグ (gladflg=4)を設定 し、勾配法演算部 405に、式(14)を用いての統合型勾配法演算を実行させる。
[0463] 式 (27)を満たし、式 (28)を満たさな!/ヽが、式 (29)を満たすと判定された場合、有 効画素の中に、垂直方向に勾配がな 、画素が多く含まれて 、ることが考えられる。 そこで、カウンタ値演算部 491は、勾配フラグ (gladflg= l)を付加し、勾配法演算部 4 05に、垂直方向の動きに関しては演算を行わせず、動き無し (0ベクトル)とさせ、水 平方向の動きのみに対して、式(23)を用いての勾配法演算を実行させる。なお、こ のときの勾配法演算には、水平方向に勾配が存在する有効画素のみが使用される。
[0464] 式(27)を満たし、式(28)および式(29)を満たさな!/、が、式(30)を満たすと判定さ れた場合、有効画素の中に、水平方向に勾配がない画素が多く含まれていることが 考えられる。そこで、カウンタ値演算部 491は、勾配フラグ (gladflg= 2)を付加し、勾 配法演算部 405に、水平方向の動きに関しては演算を行わせず、動き無し (0ベタト ル)とさせ、垂直方向の動きのみに対して、式(23)を用いての勾配法演算を実行さ せる。なお、このときの勾配法演算には、垂直方向に勾配が存在する有効画素のみ が使用される。
[0465] 図 41は、図 40の有効画素判定部に対応する勾配法演算部の演算判定部の構成 例を示す図である。 [0466] すなわち、図 41の例の演算判定部 462は、有効画素判定部 471を備える点が、図 27の演算判定部 462と共通するが、水平勾配判定部 472と垂直勾配判定部 473が 除かれた点が、図 27の演算判定部 462と異なっている。なお、図 41の例において、 有効画素判定部 471は、さらに、水平垂直勾配判定部 471— 1、水平勾配判定部 4 71 - 2,および垂直勾配判定部 471— 3により構成されて!、る。
[0467] 水平垂直勾配判定部 471— 1、水平勾配判定部 471— 2、および垂直勾配判定部 471— 3は、それぞれ、勾配フラグの値に基づいて、勾配法演算処理の方法を判定 する。
[0468] すなわち、水平垂直勾配判定部 471— 1は、勾配フラグの値に基づいて、統合型 勾配演算部 463— 1で勾配法演算処理を行うと判定した場合、式 (21)を用いて、演 算ブロック内の画素が水平垂直着目条件を満たす力否かどうかを判定し、水平垂直 着目条件を満たすと判定した画素の勾配 (画素差分)を統合型勾配演算部 463— 1 に供給する。
[0469] 水平垂直勾配判定部 471— 1は、勾配フラグの値に基づいて、独立型勾配演算部 463— 2で勾配法演算処理を行うと判定した場合、式(21)を用いて、演算ブロック内 の画素が水平垂直着目条件を満たすか否かどうかを判定し、水平垂直着目条件を 満たすと判定した画素の勾配 (画素差分)を独立型勾配演算部 463— 2に供給する
[0470] 水平勾配判定部 471— 2は、勾配フラグの値に基づいて、統合型勾配演算部 463
1で勾配法演算処理を行うと判定した場合、式(19)を用いて、演算ブロック内の画 素が水平着目条件を満たすカゝ否かどうかを判定し、水平着目条件を満たすと判定し た画素の勾配 (画素差分)を統合型勾配演算部 463— 1に供給する。
[0471] 水平勾配判定部 471— 2は、勾配フラグの値に基づいて、独立型勾配演算部 463
2で、水平方向に対しての勾配法演算処理を行うと判定した場合、式(19)を用い て、演算ブロック内の画素が水平着目条件を満たすか否力どうかを判定し、水平着 目条件を満たすと判定した画素の勾配 (画素差分)を独立型勾配演算部 463— 2に 供給する。すなわち、垂直方向に対しての勾配法演算処理を行うと判定した場合、 水平勾配判定部 471— 2により水平着目条件を満たすと判定した画素の勾配 (画素 差分)は、独立型勾配演算部 463— 2に供給されない。
[0472] 垂直勾配判定部 471— 3は、勾配フラグの値に基づいて、統合型勾配演算部 463
1で勾配法演算処理を行うと判定した場合、式(20)を用いて、演算ブロック内の画 素が垂直着目条件を満たすカゝ否かどうかを判定し、垂直着目条件を満たすと判定し た画素の勾配 (画素差分)を統合型勾配演算部 463— 1に供給する。
[0473] 垂直勾配判定部 471— 3は、勾配フラグの値に基づいて、独立型勾配演算部 463
2で、垂直方向に対しての勾配法演算処理を行うと判定した場合、式(20)を用い て、演算ブロック内の画素が垂直着目条件を満たすか否力どうかを判定し、垂直着 目条件を満たすと判定した画素の勾配 (画素差分)を独立型勾配演算部 463— 2に 供給する。すなわち、水平方向に対しての勾配法演算処理を行うと判定した場合、 垂直勾配判定部 471— 3により垂直着目条件を満たすと判定した画素の勾配 (画素 差分)は、独立型勾配演算部 463— 2に供給されない。
[0474] これらに対応して、統合型勾配演算部 463— 1は、水平垂直勾配判定部 471— 1、 水平勾配判定部 471— 2、および垂直勾配判定部 471— 3がそれぞれ条件式を満 たすと判定した画素 (すなわち、有効画素)の勾配を用いて、統合型勾配法演算を行
[0475] 独立型勾配演算部 463— 2は、水平垂直勾配判定部 471— 1、および水平勾配判 定部 471— 2がそれぞれ条件式を満たすと判定した画素 (すなわち、有効画素のうち の水平勾配がある画素)の勾配を用いて、水平方向の独立型勾配法演算を行い、水 平垂直勾配判定部 471— 1、および垂直勾配判定部 471— 3がそれぞれ条件式を 満たすと判定した画素(すなわち、有効画素のうちの垂直勾配がある画素)の勾配を 用いて、垂直方向の独立型勾配法演算を行う。
[0476] 次に、図 42のフローチャートを参照して、図 40の有効画素判定部 404が行う有効 画素判定処理を説明する。なお、図 42は、図 32のステップ S303において行われる 図 33を参照して上述した有効画素判定処理の他の例であり、図 42のステップ S501 乃至 S503、および S511の処理は、図 33のステップ S321乃至 S323、および S330 の処理と基本的に同じ処理を行うので、その詳細な説明は適宜省略する。
[0477] 画素差分算出部 421は、メモリ 403から供給される演算ブロックの対象画素値を入 力すると、ステップ S501において、有効画素判定部 431を制御し、各カウンタ (有効 画素数カウンタ 441、水平垂直勾配カウンタ 481、水平勾配カウンタ 482、および垂 直勾配カウンタ 483)の値をリセットさせる。
[0478] 画素差分算出部 421の各部 (第 1空間勾配画素差分算出部 421— 1、第 2空間勾 配画素差分算出部 421— 2、および時間方向画素差分算出部 421— 3)は、ステップ S502において、演算ブロック内の画素を 1つ選択し、ステップ S503に進み、有効画 素演算処理を実行する。この有効画素演算処理は、図 34を参照して上述したのでそ の説明は省略する。
[0479] ステップ S503の有効画素演算処理により、選択した画素のフレーム t+ 1上の水平 方向の画素差分 Δ Xおよび垂直方向の画素差分 Ay、フレーム t上の水平方向の画 素差分 Δ χおよび垂直方向の画素差分 Ay、並びに、フレーム t+ 1およびフレーム t 間の時間方向の画素差分 A tが算出され、それらを用いて、水平勾配判定部 431— 2により、水平方向の着目条件である式(19)、垂直勾配判定部 431— 3により、垂直 方向の着目条件である式(20)、および、水平垂直勾配判定部 431— 1により、水平 垂直方向の着目条件である式 (21)の論理演算が行われる。その後、処理は、図 42 のステップ S503【こ戻り、ステップ S504【こ進む。
[0480] ステップ S504において、水平垂直勾配判定部 431— 1は、選択された画素が水平 垂直方向の着目条件 (式 (21) )を満たして 、るか否かを判定し、選択された画素が 水平垂直方向の着目条件を満たしていると判定した場合、ステップ S505において、 水平垂直勾配カウンタ 481の水平垂直勾配がある画素の数を 1加算し、ステップ S51 0において、有効画素数カウンタ 441の有効画素の数を 1加算する。
[0481] ステップ S504において、水平垂直方向の着目条件を満たしていないと判定された 場合、水平勾配判定部 431—2は、ステップ S506において、選択された画素が水平 着目条件 (式(19) )を満たすか否かを判定し、選択された画素が水平方向の着目条 件を満たしていると判定した場合、ステップ S507において、水平勾配カウンタ 482の 水平勾配がある画素の数を 1加算し、ステップ S510において、有効画素数カウンタ 4 41の有効画素の数を 1加算する。
[0482] ステップ S506にお 、て、水平方向の着目条件を満たして!/、な 、と判定された場合 、垂直勾配判定部 431— 3は、ステップ S508において、選択された画素が垂直着目 条件 (式 (20) )を満たすか否かを判定し、選択された画素が垂直方向の着目条件を 満たしていると判定した場合、ステップ S509において、垂直勾配カウンタ 483の垂直 勾配がある画素の数を 1加算し、ステップ S510において、有効画素数カウンタ 441 の有効画素の数を 1加算する。
[0483] ステップ S510において有効画素の数が 1加算された後、処理は、ステップ S511に 進み、画素差分算出部 421は、演算ブロック内のすべての画素の処理が終了したか 否かを判定する。ステップ S510において、演算ブロック内のすべての画素の処理が 終了したと判定された場合、有効画素数判定処理は終了され、処理は、図 32のステ ップ S303【こ戻り、ステップ S304【こ進む。
[0484] ステップ S508にお 、て、水平方向の着目条件を満たして!/、な 、と判定された場合
(すなわち、上述した式(19)乃至式 (21)のいずれの式も満たさず、選択された画素 は有効画素ではないと判定された場合)、または、ステップ S511において、演算プロ ック内のすべての画素の処理がまだ終了していないと判定された場合、処理は、ステ ップ S502に戻り、それ以降の処理が繰り返される。
[0485] 以上のようにして、有効画素数カウンタ 441には、演算ブロック内において有効であ ると判定された有効画素の数、水平垂直勾配カウンタ 481には、有効画素のうち、水 平垂直勾配がある(より詳細には、垂直方向および水平方向に勾配を有し、水平およ び垂直方向の動きに類似性がある)と判定された画素の数、水平勾配カウンタ 482に は、有効画素のうち、水平勾配がある(より詳細には、水平勾配が垂直勾配よりもある 程度大きぐより支配的であり、かつ、水平方向の動きに類似性がある)と判定された 画素の数、および垂直勾配カウンタ 483には、有効画素のうち、垂直勾配がある(より 詳細には、垂直勾配が水平勾配よりもある程度大きぐより支配的であり、かつ、垂直 方向の動きに類似性がある)と判定された画素の数が記憶される。
[0486] 次に、図 43のフローチャートを参照して、図 32のステップ S305の勾配法実行判定 処理を詳しく説明する。図 43の勾配法実行判定処理は、図 35を参照して上述した 勾配法実行判定処理の他の例であり、上述したように画素の数が記憶された各カウ ンタに基づいて、図 40の演算実行判定部 425により実行される処理である。 [0487] 図 40のカウンタ値演算部 491は、有効画素数カウンタ 441から、有効画素の数(cn U)、水平垂直勾配カウンタ 481から、有効画素のうち、水平垂直勾配があると判定さ れた画素の数(cnt_xy)、水平勾配カウンタ 482から、有効画素のうち、水平勾配があ ると判定された画素の数 (cnt_x)、および垂直勾配カウンタ 483から、有効画素のうち 、垂直勾配があると判定された画素 (ngcntjを取得し、ステップ S521において、式( 27)を満たすか否かを判定する。
[0488] ステップ S521において、式(27)を満たすと判定された場合、演算ブロック内に、有 効画素が適切に存在すると考えられ、カウンタ値演算部 491は、ステップ S522にお いて、式 (28)を満たす力否かを判定する。
[0489] ステップ S522において、式(28)を満たすと判定された場合、有効画素の中に、水 平方向および垂直方向の勾配を持つ(通常の勾配がある)ものが適切に存在する状 態だと考えられる。したがって、フラグ設定部 452は、ステップ S523において、水平 および垂直方向に信用があるとして、勾配フラグの値を、式(14)を用いての統合型 勾配法演算処理を行わせる「4」に設定し、勾配フラグ (gladflg=4)を、勾配法演算部 405および評価判定部 412に出力し、勾配法実行判定処理を終了する。そして、処 理は、図 32のステップ S305に戻り、ステップ S306に進み、勾配フラグ(gladflg=4) に応じた勾配法演算処理が実行される。
[0490] ステップ S522において、式(28)を満たさないと判定された場合、カウンタ値演算 部 491は、ステップ S524において、式(29)を満たすか否かを判定する。ステップ S5 24において、式(29)を満たすと判定された場合、有効画素の中に、垂直方向に勾 配がない画素が多く含まれていると考えられる。したがって、フラグ設定部 452は、ス テツプ S525において、水平方向に対しての信用があるとして、勾配フラグの値を、水 平方向に対しての、式(23)を用いての独立型勾配法演算処理を行わせる「1」に設 定し、勾配フラグ (gladflg= l)を、勾配法演算部 405および評価判定部 412に出力し 、勾配法実行判定処理を終了する。そして、処理は、図 32のステップ S305に戻り、 ステップ S306に進み、勾配フラグ (gladflg= l)に応じた勾配法演算処理が実行され る。
[0491] ステップ S524において、式(29)を満たさないと判定された場合、カウンタ値演算 部 451は、ステップ S526において、式(30)を満たすか否かを判定する。ステップ S5 24において、式(30)を満たすと判定された場合、有効画素の中に、水平方向に勾 配がない画素が多く含まれていると考えられる。したがって、フラグ設定部 452は、ス テツプ S527において、垂直方向に対しての信用があるとして、勾配フラグの値を、垂 直方向に対しての、式(23)を用いての独立型勾配法演算処理を行わせる「2」に設 定し、勾配フラグ (gladflg= 2)を、勾配法演算部 405および評価判定部 412に出力し 、勾配法実行判定処理を終了する。そして、処理は、図 32のステップ S305に戻り、 ステップ S306に進み、勾配フラグ (gladflg= 2)に応じた勾配法演算処理が実行され る。
[0492] ステップ S521〖こおいて、式(27)を満たさないと判定された場合、あるいは、ステツ プ S526において、式(30)を満たさないと判定された場合、演算ブロック内に、有効 と判定された画素が少ないと考えられる。したがって、フラグ設定部 452は、ステップ S528において、勾配フラグの値を、勾配法演算処理を禁止させる「3」に設定し、勾 配フラグ (gladflg= 3)を、勾配法演算部 405および評価判定部 412に出力し、勾配 法実行判定処理を終了する。そして、処理は、図 32のステップ S305に戻り、ステツ プ S306に進み、勾配フラグ (gladflg= 3)に応じた勾配法演算処理が実行される。
[0493] 以上のようにして、演算ブロックの勾配状態 (すなわち、有効画素の数、有効画素の うち、水平垂直勾配がある画素の数、水平勾配がある画素の数、および有効画素の うち、垂直勾配がある画素の数)に応じた勾配フラグが、勾配法演算部 405および評 価判定部 412に出力される。
[0494] 以上のように、図 40の有効画素判定部 404にお 、ては、有効画素を判定する条件 式である式(19)乃至式(21)を用いて水平勾配、または垂直勾配のみ有する画素の 割合を求め、それに基づいて、勾配法実行判定を行うようにしたので、水平勾配、垂 直勾配を改めて求める必要がない。したがって、上述した図 26の有効画素判定部 4 04の場合に較べて、演算の負荷を軽減することができる。
[0495] 次に、図 44のフローチャートを参照して、図 41の勾配法演算部 405が行う処理のう ち、独立型勾配法演算処理の詳細を説明する。なお、図 41の勾配法演算部 405が 行う勾配法演算処理は、ステップ S406および S408の独立型勾配法演算処理以外 は、図 36を参照して上述した図 27の勾配法演算部 405が行う勾配法演算処理と基 本的に同様の処理であるので、その説明を省略する。
[0496] すなわち、図 44は、図 36のステップ S406または S408において行われる図 38を 参照して上述した独立型勾配法処理の他の例であり、図 44のステップ S531、 S532 、 S534乃至 S536の処理は、図 38のステップ S441、 S442、 S445乃至 S447の処 理と基本的に同じ処理を行うので、その詳細な説明は適宜省略する。
また、図 44においても、水平方向の場合を説明するが、垂直方向の場合も、対象と なる方向成分が異なるだけであり、水平方向の場合と基本的に同様の処理となる。
[0497] 図 41の画素差分算出部 461の各部は、有効画素判定部 471の制御のもと、ステツ プ S531において、演算ブロック内の画素を 1つ選択し、ステップ S532に進み、有効 画素演算処理を実行する。この有効画素演算処理は、図 34を参照して上述した有 効画素演算処理と基本的に同様な処理であるので、その説明は省略する。
[0498] ステップ S532の有効画素演算処理により、選択した画素のフレーム t+ 1上の水平 方向の画素差分 Δ Xおよび垂直方向の画素差分 Ay、フレーム t上の水平方向の画 素差分 Δ χおよび垂直方向の画素差分 Ay、並びに、フレーム t+ 1およびフレーム t 間の時間方向の画素差分 A tが求められ、それらを用いて、水平勾配判定部 471— 2により、水平方向の着目条件である式(19)、垂直勾配判定部 471— 3により、垂直 方向の着目条件である式(20)、および、水平垂直勾配判定部 471— 1により、水平 垂直方向の着目条件である式 (21)の論理演算が行われる。その後、処理は、図 44 のステップ S532【こ戻り、ステップ S533【こ進む。
[0499] ステップ S533において、水平垂直勾配判定部 471— 1および水平勾配判定部 47 1—2は、選択された画素が対象方向(いまの場合、水平方向)に勾配がある力否か を判定する。すなわち、水平垂直勾配判定部 471— 1が、選択された画素が水平垂 直方向の着目条件 (式 (21) )を満たして 、るか否かを判定し、水平勾配判定部 471 2が、選択された画素が水平着目条件 (式(19) )を満たす力否かを判定し、水平 垂直勾配判定部 471— 1により選択された画素が水平垂直方向の着目条件を満たし ていると判定された場合、または、水平勾配判定部 471—2により、選択された画素 が水平着目条件を満たして ヽると判定された場合、選択された画素が水平方向に勾 配があると判定され、処理は、ステップ S534に進む。
[0500] また、ステップ S533において、水平垂直勾配判定部 471— 1により選択された画 素が水平垂直方向の着目条件を満たしていないと判定され、かつ、水平勾配判定部 471— 2により、選択された画素が水平着目条件を満たして!/ヽな ヽと判定された場合 、選択された画素が水平方向に勾配がないと判定され、処理は、ステップ S531に戻 り、それ以降の処理が繰り返される。
[0501] なお、垂直方向の場合には、水平垂直勾配判定部 431— 1により選択された画素 が水平垂直方向の着目条件を満たしていると判定された場合、または、垂直勾配判 定部 431— 3により、選択された画素が垂直着目条件を満たしていると判定された場 合、選択された画素が垂直方向に勾配があると判定される。
[0502] 水平垂直勾配判定部 471— 1または水平勾配判定部 471— 2は、ステップ S533に おいて水平勾配があると判定した画素を、勾配法の演算対象とし、その画素の水平 方向の画素差分 Δ χ、および時間方向の画素差分 A tを、独立型勾配演算部 463— 2に供給し、ステップ S534において、独立型勾配演算部 463— 2を制御し、供給した 勾配 (画素差分)を積算させる。
[0503] 水平垂直勾配判定部 471— 1は、ステップ S535において、演算ブロック内のすべ ての画素の処理が終了したか否かを判定する。ステップ S535において、演算ブロッ ク内のすべての画素の処理がまだ終了していないと判定された場合、処理は、ステツ プ S441に戻り、それ以降の処理が繰り返される。
[0504] 水平垂直勾配判定部 471— 1は、ステップ S535において、演算ブロック内のすべ ての画素の処理が終了したと判定した場合、ステップ S536において、独立型勾配演 算部 463— 2を制御し、積算された勾配を用いて、動きベクトル vnの水平方向成分を 算出させる。
[0505] 独立型勾配演算部 463— 2は、ステップ S536において、積算された勾配と式(23) を用いて、動きベクトル vnの対象方向(水平方向)成分を求め、求めた動きベクトル V nの水平方向成分を、ベクトル算出部 464に出力する。この後、処理は、図 36のステ ップ S406【こ戻り、ステップ S407【こ進む。
[0506] 以上により、図 41の勾配法演算部 405においても、図 37の勾配法演算部 405の 場合と同様に、演算ブロックの有効画素のうち、対象方向に勾配がある画素の勾配 のみが積算されて、対象方向の勾配法演算処理が実行される。これにより、演算プロ ックが片側勾配領域であったとしても、演算ブロックに対して、誤った動きベクトルの 対象方向成分が検出されることが抑制される。
[0507] 以上のように、演算ブロックにおいて、有効画素を判定するだけでなぐ有効画素の 中から、水平勾配または垂直勾配のどちらかのみが存在する片側勾配の画素を判 定し、有効画素中の片側勾配の画素の割合に基づいて、勾配法演算を切り替えたり 、評価対象のベクトルを切り替えたり、反復判定を行うようにしたので、有効画素を判 定するのみの場合よりも、特に、片側勾配領域においての動きベクトルの検出精度が 向上する。
[0508] 次に、図 45を参照して、図 17のベクトル検出部 52の他の構成例について説明する
[0509] 上述したように、図 17のベクトル検出部 52において求められた動きベクトル Vは、 検出ベクトルメモリ 53に、後段の割付処理で用いられる動きベクトル (以下、検出べク トルとも称する)として記憶されるとともに、初期ベクトル選択部 101により、初期候補 ベクトル (初期ベクトルの候補ベクトル)としても用いられる。これに対して、図 45のべ タトル検出部 52においては、後段のベクトル割付処理で用いられる検出ベクトルと、 初期ベクトル選択処理で用いられる初期候補ベクトルを別々に保存するように構成さ れている。
[0510] 図 45のベクトル検出部 52は、プリフィルタ 102— 1および 102— 2、シフト初期べタト ル割付部 105、評価値メモリ 106、およびシフト初期ベクトルメモリ 107を備える点力 図 17のベクトル検出部 52と共通する力 初期ベクトル選択部 101が初期ベクトル選 択部 521に入れ替わった点、反復勾配法演算部 103が反復勾配法演算部 522に入 れ替わった点、ベクトル評価部 104がベクトル評価部 523に入れ替わった点、および 初期候補ベクトルメモリ 524が追加された点力 図 17のベクトル検出部 52と異なって いる。
[0511] なお、初期ベクトル選択部 521は、過去に求められた周辺のブロックの動きベクトル を、検出ベクトルメモリ 53ではなぐ初期候補ベクトルメモリ 524から取得する点が異 なるだけであり、図 17のベクトル選択部 101と基本的な構成が同様であるので、その 詳細な説明は省略する。
[0512] 図 45の例において、反復勾配法演算部 522は、図 17の反復勾配法演算部 103と 同様に、構成されており、初期ベクトル選択部 101から入力された初期ベクトル VOと 、プリフィルタ 102—1および 102— 2を介して入力されるフレーム tおよびフレーム t + 1を用いて、所定のブロック毎に、勾配法により、動きベクトル Vnを算出する。 このとき、反復勾配法演算部 522は、勾配法の対象として用いる有効画素の数を、所 定のしき 、値 aだけでなく、所定のしき 、値 |8 ( |8 < α )とも比較して、その比較結果 に応じたカウンタフラグ (countflg)を、ベクトル評価部 523に供給する。
[0513] また、反復勾配法演算部 522は、反復勾配法演算部 103と同様に、初期ベクトル V 0と、算出された動きベクトル Vnをベクトル評価部 523に出力し、ベクトル評価部 104 による動きベクトルの評価結果に基づいて、勾配法の演算を繰り返し行い、動きべク トル Vnを算出する。なお、反復勾配法演算部 522の詳細は、ベクトル評価部 523の 詳細とともに、図 46を参照して後述する。
[0514] ベクトル評価部 523は、図 17のベクトル評価部 104と同様に、評価値演算部 61B を有しており、評価値演算部 61Bに、反復勾配法演算部 103からの動きベクトル Vn 1 (または初期ベクトル V0)と、動きベクトル Vnの評価値 dfvを求めさせ、評価値演 算部 61Bにより求められた評価値 dfvに基づいて、反復勾配法演算部 522を制御し 、勾配法の演算を繰り返し実行させ、最終的に、評価値 dfvに基づぐ信頼性の高い ものを選択する。
[0515] このとき、ベクトル評価部 523は、反復勾配法演算部 522からの動きベクトル Vn— 1 (または初期ベクトル V0)、動きベクトル Vn、または 0ベクトルの中から、反復勾配法 演算部 522からのカウンタフラグおよび各ベクトルの評価値 dfvに応じて、後段にお V、て割付処理に用いられる検出ベクトル Veと、初期ベクトル選択部 521にお 、て初 期ベクトル選択の際に用いられる初期候補ベクトル Vicをそれぞれ求める。そして、 ベクトル評価部 523は、求めた検出ベクトル Veを検出ベクトルメモリ 53に記憶させる とともに、求めた初期候補ベクトル Vicを、初期候補ベクトルメモリ 524に記憶させる。
[0516] 初期候補ベクトルメモリ 524には、ベクトル評価部 523により求められた初期候補べ タトル Vic力 検出対象ブロックに対応して、記憶される。
[0517] 図 46は、反復勾配法演算部 522およびベクトル評価部 523の構成を示すブロック 図である。
[0518] 図 46の反復勾配法演算部 522は、セレクタ 401、メモリ制御信号生成部 402、メモ リ 403、勾配法演算部 405、および遅延部 406を備える点が、図 25の反復勾配法演 算部 103と共通するが、有効画素判定部 404が、有効画素判定部 531に入れ替わ つた点力 図 25の反復勾配法演算部 103と異なっている。
[0519] すなわち、有効画素判定部 531は、有効画素判定部 404と同様に、メモリ 403から 供給される対象画素値を用いて、例えば、フレーム tとフレーム t+ 1の演算ブロックの 画素差分を演算することで、演算ブロックに、勾配法の演算に有効な画素の数が所 定のしきい値より多いか否かを判定し、その判定結果に応じたカウンタフラグ (countfl g)を、勾配法演算部 405およびベクトル評価部 523に供給する。
[0520] このとき、有効画素判定部 531による勾配法の演算に有効な画素の数の判定には 、所定のしき 、値 αと所定のしき Mfi jS ( α > β )の 2種類のしき 、値が用いられる。
[0521] 有効画素判定部 531は、演算ブロックに、勾配法の演算に有効な画素の数が所定 のしき!/、値 aより多 、と判定した場合、カウンタフラグ (countflg= 1)を勾配法演算部 405およびベクトル評価部 523に供給し、演算ブロックに、勾配法の演算に有効な画 素の数が所定のしき 、値 exより少なく、所定のしき 、値 |8よりも多 、と判定した場合、 カウンタフラグ(countflg= 10)を勾配法演算部 405およびベクトル評価部 523に供 給し、演算ブロックに、勾配法の演算に有効な画素の数が所定のしきい値 j8より少な Vヽと判定した場合、カウンタフラグ (countflg= 0)を勾配法演算部 405およびベクトル 評価部 523に供給する。
[0522] また、有効画素判定部 531は、有効画素判定部 404と同様に、演算ブロックにおい て有効な画素と判定された画素について、水平方向および垂直方向それぞれの勾 配状態を求め、水平方向または垂直方向のどちらか一方にのみ勾配がある画素の 割合が多いか否力も判定し、その判定結果に応じた勾配フラグ (gladflg)を、勾配法演 算部 405およびベクトル評価部 523に供給する。
[0523] 図 46のベクトル評価部 523は、評価値演算部 61Bと備える点は、図 25のベクトル 評価部 104と共通する力 評価判定部 412が評価判定部 541に入れ替わった点力 図 25のベクトル評価部 104と異なっている。
[0524] 評価値判定部 523は、有効画素判定部 531から供給されるカウンタフラグおよび勾 配フラグに基づいて、勾配法演算処理を反復させる力否かを判定したり、検出べタト ル Veと初期候補ベクトル Vicとをそれぞれ求める。
[0525] すなわち、評価値判定部 523は、必要に応じて、評価値演算部 61Bに演算させた 評価値 dfvを比較することにより、信頼性の高いものを選択して変更することで、動き ベクトル Vを求め、有効画素判定部 531からカウンタフラグ (countflg= 1)が供給され た場合 (すなわち、有効画素の数が、所定のしきい値 αよりも多い場合)、勾配法演 算処理を反復させるか否かを判定し、反復させると判定した場合、求めた動きべタト ル Vを、遅延部 406に出力する。
[0526] また、評価値判定部 523は、勾配法演算処理を反復させない場合、求めた動きべ タトル Vまたは 0ベクトルを、カウンタフラグの値に応じて、検出ベクトル Veとして、検 出ベクトルメモリ 53に記憶させるとともに、初期候補ベクトル Vicとして、初期候補べク トルメモリ 524に記憶させる。
[0527] 具体的には、評価値判定部 523は、有効画素判定部 531からカウンタフラグ (count flg= 10)が供給された場合 (すなわち、有効画素の数が、所定のしきい値 αよりも少 なぐ所定のしきい値 j8よりも多い場合)、 0ベクトルを、検出ベクトル Veとして、検出 ベクトルメモリ 53に記憶させるとともに、求めた動きベクトル Vを、初期候補ベクトル Vi cとして、初期候補べクトルメモリ 524に記憶させる。
[0528] 評価値判定部 523は、有効画素判定部 531からカウンタフラグ (countflg=0)が供 給された場合 (すなわち、有効画素の数が所定のしきい値 )8よりも少ない場合)、 0ベ タトルを、検出ベクトル Veとして、検出ベクトルメモリ 53に記憶させるとともに、初期候 補ベクトル Vicとして、初期候補ベクトルメモリ 524に記憶させる。
[0529] すなわち、有効画素判定部 531においては、有効画素数の割合に対する所定のし きい値 αにより、検出ベクトル Veを 0ベクトルに落とすか否かの判定がなされる。した がって、所定のしきい値 α力 図 25の有効画素判定部 404におけるしきい値と同程 度である場合、後段のベクトル割付部 54における検出ベクトル Veの精度は、図 25の 場合と同程度となる。
[0530] さらに、このとき、有効画素判定部 531においては、所定のしきい値 j8 (く所定のし きい値 α )により、初期候補ベクトル Vicを 0ベクトルに落とすか否かの判定がなされる 。例えば、有効画素の数が所定のしきい値 j8よりも多い場合には、初期候補ベクトル Vicは、検出ベクトル Veと比較して、検出処理結果としての精度は低いが 0ベクトル ではな!/、、なんらかのベクトル値を持つことができる。
[0531] これにより、他の周辺ブロックのベクトル検出処理において、この Vicが、初期候補 ベクトルとして用いられる場合、図 25の有効画素判定部 404にお 、て有効画素の数 が所定のしきい値 OCよりも少ない場合に 0ベクトルに落としてしまう場合よりも、候補べ タトル群における 0ベクトルの割合が少なくなり、候補ベクトル群のベクトル値のバリエ ーシヨンが多くなる。その結果、図 46の有効画素判定部 531においては、候補べタト ル内に真の動き量に近いベクトルが存在する可能性が、図 25の有効画素判定部 40 4の場合よりも高くなり、図 25の有効画素判定部 404の場合と比較して、初期べタト ルの精度を向上させることができる。
[0532] 図 47は、有効画素判定部 531の詳細な構成例を示すブロック図である。
[0533] 図 47の有効画素判定部 531は、画素差分算出部 421、画素判定部 422、カウンタ 423、および演算実行判定部 425を備える点は、図 26の有効画素判定部 404と共 通であり、勾配法継続判定部 424が勾配法継続判定部 551に入れ替わった点が、 図 26の有効画素判定部 404と異なる。
[0534] すなわち、勾配法継続判定部 551は、有効画素数カウンタ 441を参照して、演算ブ ロックにおける勾配法の演算に有効な画素の数が所定のしきい値 αより多いか否か を判定し、さらに、演算ブロックにおける勾配法の演算に有効な画素の数が所定のし きい値 j8より多いか否かを判定する。
[0535] 勾配法継続判定部 551は、演算ブロックにおける勾配法の演算に有効な画素の数 が所定のしきい値 αより多いと判定した場合、勾配法演算を実行させ、検出ベクトル Veおよび初期候補ベクトル Vicを、勾配法演算により求められた動きベクトル Vに決 定させるカウンタフラグ (countflg= l)を、演算実行判定部 425、勾配法演算部 405 およびベクトル評価部 523に供給する。 [0536] また、勾配法継続判定部 551は、演算ブロックに、勾配法の演算に有効な画素の 数が所定のしきい値 αより少なぐ所定のしきい値 j8よりも多いと判定した場合、勾配 法演算を実行させるが、検出ベクトル Veを 0ベクトルに決定させ、初期候補ベクトル V icを、勾配法演算により求められた動きベクトル Vに決定させるカウンタフラグ(countfl g= 10)を、勾配法演算部 405およびベクトル評価部 523に供給する。
[0537] さらに、勾配法継続判定部 551は、演算ブロックに、勾配法の演算に有効な画素の 数が所定のしきい値 ι8より少ないと判定した場合、勾配法演算を打ち切らせ、検出べ タトル Veおよび初期候補ベクトル Vicを 0ベクトルに決定させるカウンタフラグ(countfl g=0)を勾配法演算部 405およびベクトル評価部 523に供給する。
[0538] 次に、図 48乃至図 62を参照して、検出ベクトルを初期候補ベクトルとして用いる図 17のベクトル検出部 52の場合と、必要に応じて別々の検出ベクトルと初期候補べク トルを用いる図 45のベクトル検出部 52の場合とを比較して説明する。
[0539] 図 48乃至図 62の例においては、 2つの 24P信号の時刻 tのフレーム tおよび時刻 t
+ 1のフレーム t+ 1が示されており、矢印 Tは、図中、上の時刻 tのフレーム tから、下 の時刻 t+ 1のフレーム t+ 1への時間の経過方向を示している。また、フレーム t上に 示される仕切りは、各ブロックの境界を表しており、フレーム t上には、図中左から、ブ ロック AO乃至 A2が示され、フレーム t+ 1上には、図中左から、フレーム t上の図示せ ぬブロックが対応するブロック B— 3乃至 B— 1、および、ブロック AO乃至 A2が対応す るブロック B0乃至 B2が示されている。すなわち、フレーム tおよび t+ 1上において、 番号が同じブロックは対応するブロックを表して 、る。
[0540] また、図 48乃至図 50、図 56、図 57、図 60、および図 62においては、フレーム tお よびフレーム t+ 1の間には、検出された動きベクトルに基づいて生成される例えば、 時刻 t + 0. 4の内挿フレーム Fl、および時刻 t+0. 8の内挿フレーム F2が示されて いる。
[0541] 図 48の例においては、図 17のベクトル検出部 52により動きベクトルが正しく検出さ れた場合に生成される内挿フレームの例が示されている。すなわち、フレーム tおよ びフレーム t+ 1間において対応するブロック(ブロック AOとブロック B0)間の動きとし て、正しぐ真の動きベクトル VIが検出されており、これにより、内挿フレーム F1およ び内挿フレーム F2上の画像ブロック alおよび a2が正しく生成されている。
[0542] しかしながら、動きベクトル VIは、図 49の例に示されるように、常に正しく求められ るものとは限らない。例えば、図 17のベクトル検出部 52により実行される有効画素判 定の結果、勾配法演算に用いられる有効画素の数が少ない場合、有効画素の数が 少ない演算ブロックで演算された結果、求められる動きベクトル V2は、真の動きべク トル VI (すなわち、対応するブロック AOとブロック BO間で検出される確からしい動き ベクトル VI)から大きく外れ、動きベクトル V2の両端のブロック(ブロック AOとブロック B- 2)はそれぞれ対応するブロックではない。したがって、この動きベクトル V2を用 いて生成される内挿フレーム F1および内挿フレーム F2上の画像ブロック blおよび b 2には、破綻が目立つことが多い。
[0543] これに対応して、図 17のベクトル検出部 52においては、図 32を参照して上述した ように、有効画素の数が所定のしきい値以下の場合に、検出結果力^ベクトル SOとさ れる。すなわち、有効画素の数が少ないため、動きベクトル V2は、真の動きベクトル VIから大きく外れてしまうので、図 50の例に示されるように、検出結果である動きべ タトル V2を 0ベクトル SOとする。これにより、 0ベクトル SOを用いて生成される内揷フレ ーム F1および内挿フレーム F2上の画像ブロック clおよび c2の破綻は、動き補償を なしとした場合の補間処理と同程度に抑えられ、比較的安定した画像ブロック clおよ び c2が生成される。
[0544] 一方、反復勾配法において初期オフセットとなる初期ベクトルは、図 23を参照して 上述したように、周辺ブロック(時空間含む)の検出結果力も選択される。
[0545] フレーム tおよびフレーム t+ 1間において対応するブロック(ブロック AOとブロック B 0)間の動きとして、正しぐ真の動きベクトル VIが検出されている場合(図 48の場合 )、図 51の例に示されるように、検出対象のブロック A1においては、左隣のブロック であるブロック AOにおいて正しく検出された真の動きベクトル VIが、初期ベクトル V0 として選択されることがある。すなわち、周辺ブロックの検出結果を初期ベクトルとして 用いるということは、検出対象ブロックと同一オブジェクトに含まれる可能性が高ぐ動 き量の相関性が高いことから、動きベクトルが正しい場合には、ブロック間で動きの伝 播効果が得られ、動き検出処理の収束が早くなるという利点がある。 [0546] し力しながら、上述した図 50の場合のように、周囲のブロックに、検出結果である動 きベクトル V2が確力らしくなぐ 0ベクトル SOとされたものが多い場合、検出対象のブ ロック A1においては、図 52の例に示されるように、 0ベクトル SO (左隣のブロックであ るブロック AOにおいて検出された動きベクトル) 1S 初期ベクトル V0として選択されや すくなってしまう。
[0547] このとき、検出対象のブロック A1にお!/、て、この初期ベクトル VO (0ベクトル SO)を 用いて勾配法演算を行ったとしても、ブロック A1の演算ブロックにおいて、有効画素 判定による有効画素の数が所定のしきい値 αを下回りやすくなり、図 53の例に示さ れるように、検出結果である動きベクトル V2は、真の動きベクトル VIから大きく外れ てしまい、結果的に、図 54の例に示されるように、検出対象のブロック A1においても 、検出結果力^ベクトルになってしまうことが多い。
[0548] このような場合に、さらに、検出対象が次のブロック Α2になったとしても、図 54の例 と同様のこと (すなわち、検出結果力^ベクトル SOになってしまうこと)が起こる可能性 が多ぐ結果として、図 55の例に示されるように、あた力も 0ベクトル SOが次々と伝播 していくようになり、動き検出処理の収束 (すなわち、真の動きベクトル VIに近づくこ と)が遅くなつてしまう。
[0549] 以上のように、後段で割り付けられる対象となる検出ベクトルと、初期ベクトル選択 の候補となる初期候補ベクトルとして同じものを用いる図 17のベクトル検出部 52にお いては、検出対象の演算ブロックの有効画素の数が所定のしきい値以下の場合、検 出ベクトルを 0ベクトルにすることは、図 50を参照して上述したように、内挿フレーム上 の画像ブロックの破綻を抑える効果はある力 S、初期候補ベクトルも 0ベクトルになって しまうため、動き検出処理の収束が遅くなつてしまう。すなわち、有効画素の数が所定 のしきい値以下の場合、図 17のベクトル検出部 52のように、検出ベクトルも初期候補 ベクトルも、 0ベクトルにしてしまうと、結果的に、品質の低下が生じてしまう。
[0550] そこで、図 45のベクトル検出部 52においては、それを抑制するために、 2つのしき い値を用いた有効画素判定を行い、有効画素判定の結果に応じて、検出された動き ベクトル力 用いる用途 (後段の割付処理において用いられるもの力、ベクトル検出 部 52内で用いられるものカゝ)に応じて切り替えられる。 [0551] すなわち、検出対象のブロックの演算ブロックにおける有効画素の数を所定のしき い値 αと比較する際に、所定のしきい値 αより若干低めのしきい値 j8 ( j8 < α )を新 たに設定し、有効画素の数が所定のしきい値 αよりも少ないときに、すぐに、動きべク トルを 0ベクトルに設定するのではなぐ有効画素の数が、所定のしきい値 αよりも少 ないときには、有効画素の数が、所定のしきい値 j8以上である力も判定する。そして 、有効画素の数が、所定のしきい値 αよりも少なぐかつ、所定のしきい値 j8以上で ある場合には、図 56の例に示されるように、後段の割付処理で用いられる検出べタト ル Veを、 0ベクトル SOにするが、初期候補ベクトル Vicは、勾配法演算で検出された 検出結果である動きベクトル V2にする。
[0552] 具体的に説明すると、 0ベクトル SOを後段の割付処理で用いられる検出ベクトル Ve とすることにより、例えば、図 57の例に示されるように、図 50の例の場合と同様に、 0 ベクトル SOを用いて生成される内挿フレーム F1および内挿フレーム F2上の画像ブ ロック clおよび c2の破綻が、動き補償をなしとした場合の補間処理と同程度に抑えら れ、その結果、比較的安定した画像ブロック clおよび c2を生成することができる。
[0553] 一方、勾配法演算で検出された検出結果である動きベクトル V2を、初期候補べタト ル Vicとすることにより、図 58の例に示されるように、次の検出対象のブロック A1にお いて、初期候補ベクトル Vic (V2)が初期ベクトル V0とされた場合、 0ベクトル SO力初 期ベクトル V0とされた場合(図 52の例の場合)よりも、初期ベクトル V0が真の動きべ タトル VIに近づく。
[0554] また、このとき、図 59の例に示されるように、検出対象のブロック A1において、初期 ベクトル V0 (動きベクトル V2)を用いて勾配法演算を行って求められる動きベクトル V 3は、初期ベクトル V0よりもさらに真の動きベクトル VIに近づく可能性が高くなる。
[0555] さらに、この検出対象のブロック A1における動き検出処理において、まだ有効画素 の数が少なぐ真の動きベクトル VIを得ることができな力つた場合にも、後段の割付 処理で用いられる検出ベクトル Veを 0ベクトル SOに変更し、勾配法演算で検出され た検出結果である動きベクトル V3を、初期候補ベクトル Vicとする。
[0556] 後段の割付処理で用いられる検出ベクトル Veを 0ベクトル SOに変更することにより 、図 60の例に示されるように、内挿フレーム F1および内挿フレーム F2上の画像ブロ ック dlおよび d2の破綻が、動き補償をなしとした場合の補間処理と同程度に抑えら れ、その結果、比較的安定した画像ブロック dlおよび d2が生成される。
[0557] 一方、勾配法演算で検出された検出結果である動きベクトル V3を、初期候補べタト ル Vicとすることにより、図 61の例に示されるように、次の検出対象のブロック A2にお いて、初期候補ベクトル Vic (V3)が初期ベクトル VOとされた場合、図 52の例の場合 のように、 0ベクトル SOが初期ベクトル VOとされた場合よりも、初期ベクトル V0 (V3) 力 Sさらに真の動きベクトル VIに近づく。
[0558] その結果、図 62の例に示されるように、検出対象のブロック A2における有効画素 数の判定にぉ 、て、ブロック A2の演算ブロックの有効画素数が所定のしき!/、値 αを 上回り、勾配法演算結果の信頼度が向上し、検出対象のブロック Α2において、初期 ベクトル V0 (動きベクトル V3)を用いて勾配法演算を行って真の動きベクトル VIを検 出できる可能性が高くなる。
[0559] これにより、フレーム tおよびフレーム t+ 1間において対応するブロック(ブロック Α2 とブロック B2)間の動きとして、正しぐ真の動きベクトル VIが検出され、内挿フレーム F1および内挿フレーム F2上の画像ブロック elおよび e2が正しく生成される。
[0560] 以上のように、検出対象ブロックの演算ブロックにおける有効画素力 所定のしきい 値 αより少なぐ所定のしきい値 j8よりも多い場合には、検出ベクトルのみ 0ベクトル にして、初期候補ベクトルは、演算により求められる動きベクトルにするようにしたので 、他の周辺ブロックのベクトル検出処理において、この Vicが、初期候補ベクトルとし て用いられるとき、候補ベクトル群における 0ベクトルの割合力 図 25の有効画素判 定部 404において 0ベクトルに落としてしまうときよりも、少なくなり、候補ベクトル群の ベクトル値のノ リエーシヨンが多くなる。
[0561] この結果、図 46の有効画素判定部 531の場合、候補ベクトル内に真の動き量に近 いベクトルが存在する可能性が、図 25の有効画素判定部 404の場合よりも高くなり、 図 25の有効画素判定部 404の場合と比較して、初期ベクトルの精度を向上させるこ とがでさる。
[0562] これにより、後段の割付処理で用いる検出ベクトルの精度を従来と同程度に維持し たまま、勾配法演算によるベクトル検出処理の収束速度を向上させることができる。 [0563] 次に、図 63のフローチャートを参照して、図 45のベクトル検出部 52の反復勾配法 演算処理の例を説明する。なお、図 63のステップ S551乃至 S558は、図 32のステツ プ S301乃至 S308と同様の処理を行うので、その詳細な説明は適宜省略する。
[0564] セレクタ 401は、ステップ S551において、オフセットベクトル Vn— 1を選択し、選択 したオフセットベクトル Vn— 1を、メモリ制御信号生成部 402、勾配法演算部 405、お よび評価値演算部 61Bに出力する。
[0565] メモリ制御信号生成部 402は、ステップ S552において、信号処理装置 1の図示せ ぬ制御部からの制御信号およびセレクタ 401からのオフセットベクトル Vn— 1に応じ て、メモリ 403に記憶されている時刻 tの画像のフレーム tと、時刻 t+ 1の画像のフレ ーム t+ 1から、処理の対象となる演算ブロックの対象画素値を読み出させ、読み出し た対象画素値を、有効画素判定部 531および勾配法演算部 405に供給させる。
[0566] 有効画素判定部 531は、メモリ 403から供給される対象画素値を入力すると、ステツ プ S553において、有効画素判定処理を実行する。この有効画素判定処理は、図 33 を参照して上述した有効画素判定処理と同様の処理であり、その説明は繰り返しに なるので省略する。
[0567] ステップ S553の有効画素判定処理により、メモリ 403から供給される対象画素値を 用いて、フレーム tとフレーム t+ 1の演算ブロックの画素差分が演算されることで、演 算ブロックに、勾配法の演算に有効な画素の数が有効画素数カウンタ 441にカウント される。また、演算ブロックにおいて有効な画素と判定された画素について、水平方 向および垂直方向それぞれの勾配状態が求められ、水平勾配が無い画素の数と垂 直勾配が無い画素の数が、それぞれ、水平勾配無カウンタ 442および垂直勾配無力 ゥンタ 443にカウントされる。
[0568] 有効画素判定部 531の勾配法継続判定部 551は、ステップ S554において、有効 画素数カウンタ 441に記憶されて 、る値 (有効画素の数)が所定のしき 、値 αより多 いか否かを判定する。ステップ S554において、有効画素の数が所定のしきい値 αよ り多いと判定された場合、勾配法継続判定部 551により、演算実行判定部 425、勾 配法演算部 405および評価判定部 541に、勾配法演算を実行させ、検出ベクトル V eおよび初期候補ベクトル Vicを、勾配法演算により求められた動きベクトル Vに決定 させるカウンタフラグ (countflg= l)が出力され、処理は、ステップ S555に進む。
[0569] 勾配法継続判定部 551からカウンタフラグ (COuntflg= l)が入力されると、演算実行 判定部 425は、ステップ S555において、勾配法実行判定処理を実行する。この勾配 法実行判定処理は、図 35を参照して上述した勾配法実行判定処理と同様の処理で あり、その説明は繰り返しになるので省略する。
[0570] ステップ S555の勾配法実行判定処理により、有効画素数カウンタ 441の有効画素 の数、水平勾配無カウンタ 442の水平勾配が無い画素の数、および垂直勾配無カウ ンタ 443の垂直勾配が無い画素の数が参照されて、有効画素における片側勾配の 画素の数が多いか否かが判定され、その判定結果に応じて、統合型勾配法演算処 理および独立型勾配法演算処理の中から、勾配法演算部 405が行う勾配法演算処 理を切り替えるための勾配フラグ (gladflg)が設定され、設定された勾配フラグが、勾配 法演算部 405および評価判定部 541に出力され、処理は、ステップ S556に進む。
[0571] 勾配法継続判定部 551からカウンタフラグ (COuntflg= l)が入力され、演算実行判定 部 425から勾配フラグが入力されると、勾配法演算部 405は、ステップ S556におい て、勾配法演算処理を実行する。この勾配法演算処理は、図 36を参照して上述した 勾配法演算処理と同様の処理であり、その説明は繰り返しになるので省略する。
[0572] ステップ S556の勾配法演算処理により、演算実行判定部 425から勾配フラグに応 じて、有効画素を用いての統合型勾配法演算処理、または、有効画素のうち、水平 方向に勾配がある画素を用いての水平方向の独立型勾配法演算処理および垂直 方向に勾配がある画素を用いての垂直方向の独立型勾配法演算処理のうちの少な くともどちらか一方が実行され、動きベクトル Vnが求められ、求められた動きベクトル Vnがベクトル評価部 523に出力され、処理は、ステップ S557に進む。
[0573] ベクトル評価部 523は、ステップ S557において、ベクトル評価処理を実行する。
このベクトル評価処理は、図 39を参照して上述したベクトル評価処理と同様の処理 であり、その説明は繰り返しになるので省略する。
[0574] ステップ S557のベクトル評価処理により、勾配法演算部 405から動きベクトル Vn、 オフセットベクトル Vn— 1、および 0ベクトルの評価値 dfvが求められ、演算実行判定 部 425から勾配フラグに基づいて、動きベクトル Vnと、オフセットベクトル Vn—lまた は 0ベクトルの評価値 dfvが比較され、比較結果に応じて変更されて、動きベクトル V が求められる。例えば、動きベクトル Vnとオフセットベクトル Vn— 1の評価値 dfvが比 較され、動きベクトル Vnの評価値 dfvの信頼度が高いとされた場合、動きベクトル Vn は、動きベクトル Vとされて、勾配法演算の反復回数は 1カウントされる。
[0575] 評価判定部 541は、また、ステップ S558において、演算実行判定部 425からの勾 配フラグおよび勾配法演算の反復回数に基づ!/、て、勾配法演算を反復するか否か を判定する。すなわち、評価判定部 541は、勾配フラグが、統合型勾配法演算処理 を実行させるフラグ (gladflg=4)であり、かつ、勾配法演算の反復回数が設定された 最大反復回数 (例えば、 2回)になっていない場合、ステップ S558において、勾配法 演算を反復すると判定し、求められた動きベクトル Vを、遅延部 406に出力する。
[0576] 遅延部 406は、評価判定部 541から入力される動きベクトル Vを、有効画素判定部 531および勾配法演算部 405の次の処理のサイクルまで保持し、次の処理のサイク ルで、動きベクトル Vをセレクタ 401に出力する。これにより、処理は、ステップ S551 に進み、それ以降の処理が繰り返される。
[0577] また、評価判定部 541は、勾配フラグが、統合型勾配法演算処理を実行させるフラ グ以外であった場合、または、勾配法演算の反復回数が設定された最大反復回数( 例えば、 2回)になった場合、ステップ S558において、勾配法演算を反復しない(す なわち、終了する)と判定し、ステップ S565において、求められた動きベクトル Vを、 検出対象ブロックに対応させて、検出ベクトル Veとして、検出ベクトルメモリ 53に記憶 させ、初期候補ベクトル Vicとして、初期候補ベクトルメモリ 524に記憶させる。なお、 このとき、検出ベクトル Veおよびその評価値 dfvは、シフト初期ベクトル割付部 105に も出力される。
[0578] 一方、ステップ S554において、有効画素数が所定のしきい値 αより少ないと判定さ れた場合、勾配法継続判定部 551は、有効画素数が所定のしきい値 j8より多いか否 かを判定する。ステップ S559において、勾配法継続判定部 551により、有効画素数 が所定のしきい値 ι8より多いと判定された場合、勾配法演算を実行させるが、検出べ タトル Veを 0ベクトルに決定させ、初期候補ベクトル Vicを、勾配法演算により求めら れた動きベクトル Vに決定させるカウンタフラグ (countflg= 10)力 勾配法演算部 40 5および評価判定部 541に出力され、処理は、ステップ S560に進む。
[0579] 勾配法継続判定部 551からカウンタフラグ (countflg= 10)が入力されると、演算実 行判定部 425は、ステップ S560において、勾配法実行判定処理を実行する。この勾 配法実行判定処理は、上述したステップ S555の勾配法実行判定処理と同様の処理 であり、その説明は繰り返しになるので省略する。
[0580] ステップ S560の勾配法実行判定処理により、有効画素数カウンタ 441の有効画素 の数、水平勾配無カウンタ 442の水平勾配が無い画素の数、および垂直勾配無カウ ンタ 443の垂直勾配が無い画素の数が参照されて、有効画素における片側勾配の 画素の数が多いか否かが判定され、その判定結果に応じて、統合型勾配法演算処 理および独立型勾配法演算処理の中から、勾配法演算部 405が行う勾配法演算処 理を切り替えるための勾配フラグ (gladflg)が設定され、設定された勾配フラグが、勾配 法演算部 405および評価判定部 541に出力され、処理は、ステップ S561に進む。
[0581] 勾配法継続判定部 551からカウンタフラグ (COuntflg= 10)が入力され、演算実行判 定部 425から勾配フラグが入力されると、勾配法演算部 405は、ステップ S561にお いて、勾配法演算処理を実行する。この勾配法演算処理は、上述したステップ S556 の勾配法演算処理と同様の処理であり、その説明は繰り返しになるので省略する。
[0582] ステップ S561の勾配法演算処理により、演算実行判定部 425から勾配フラグに応 じて、有効画素を用いての統合型勾配法演算処理、または、有効画素のうち、水平 方向に勾配がある画素を用いての水平方向の独立型勾配法演算処理および垂直 方向に勾配がある画素を用いての垂直方向の独立型勾配法演算処理のうちの少な くともどちらか一方が実行され、動きベクトル Vnが求められ、求められた動きベクトル Vnが評価値演算部 61Bに出力され、処理は、ステップ S562に進む。
[0583] ベクトル評価部 523は、ステップ S562において、ベクトル評価処理を実行する。
このベクトル評価処理は、上述したステップ S559のベクトル評価処理と同様の処理 であり、その説明は繰り返しになるので省略する。
[0584] ステップ S562のベクトル評価処理により、勾配法演算部 405から動きベクトル Vn、 オフセットベクトル Vn— 1、および 0ベクトルの評価値 dfvが求められ、演算実行判定 部 425から勾配フラグに基づいて、動きベクトル Vnと、オフセットベクトル Vn—lまた は 0ベクトルの評価値 dfvが比較され、比較結果に応じて変更されて、動きベクトル V が求められる。なお、この場合 (所定のしきい値 αよりも少ないとされた場合)、動きべ タトル Vnは、所定のしきい値 αよりも少ない有効画素で演算された結果であり、所定 のしき!/、値 aよりも多!、有効画素で演算された結果ほどの品質は望めな 、ので、反 復は実行されない。
[0585] 評価判定部 541は、カウンタフラグ (countflg= 10)に基づいて、ステップ S563にお いて、検出ベクトル Veのみを 0ベクトルに決定し、ステップ S565において、検出対象 ブロックに対応させて、 0ベクトルを、検出ベクトル Veとして、検出ベクトルメモリ 53に 記憶させ、検出対象ブロックに対応させて、求められた動きベクトル Vを、初期候補べ タトル Vicとして、初期候補ベクトルメモリ 524に記憶させる。なお、このとき、検出べク トル Veおよびその評価値 dfvは、シフト初期ベクトル割付部 105にも出力される。
[0586] 一方、ステップ S554において、有効画素数が所定のしきい値 j8より少ないと判定さ れた場合、勾配法継続判定部 551により、勾配法演算を打ち切らせ、検出ベクトル V eおよび初期候補ベクトル Vicを 0ベクトルに決定させるカウンタフラグ(countflg = 0) が勾配法演算部 405および評価判定部 541に出力され、処理は、ステップ S564に 進む。
[0587] これに対応して、演算実行判定部 425および勾配法演算部 405は、勾配法継続判 定部 551からのカウンタフラグの値が 0の場合、勾配法演算を実行しない。
[0588] 評価値判定部 541は、ステップ S564において、カウンタフラグ (countflg=0)に基づ いて、検出ベクトル Veおよび初期候補ベクトル Vicを 0ベクトルに決定し、ステップ S5 65において、検出対象ブロックに対応させて、 0ベクトルを、検出ベクトル Veとして、 検出ベクトルメモリ 53に記憶させ、初期候補ベクトル Vicとして、初期候補ベクトルメ モリ 524に記憶させる。なお、このとき、検出ベクトル Veおよびその評価値 dfvは、シ フト初期ベクトル割付部 105にも出力される。
[0589] 以上のように、演算ブロック内の有効画素数の割合を、所定のしきい値 aだけでな ぐ所定のしきい値 αよりもさらに少ないしきい値 j8を用いて判定し、演算ブロック内 の有効画素数が所定のしきい値 αより少なぐ所定のしきい値 j8よりも多力つた場合 には、勾配法演算を打ち切ることなぐ勾配法演算結果を、初期候補ベクトルとし、 0 ベクトルを検出ベクトルするようにしたので、後段の割付処理で用いる検出ベクトルの 精度を従来と同程度に維持したまま、勾配法演算によるベクトル検出処理の収束速 度を向上させることができる。
[0590] さらに、演算ブロック内の有効画素数が所定のしきい値 αより少なぐ所定のしきい 値 j8よりも多力つた場合には、勾配法演算を行ったとしても、反復はさせないようにし たので、演算の負荷も抑制される。
[0591] なお、上記説明においては、所定のしきい値 αを所定のしきい値 j8よりも先に判定 する例を説明したが、所定のしきい値 )8を先に比較判定することもできる。
[0592] 次に、図 64および図 65のフローチャートを参照して、図 45のベクトル検出部 52の 反復勾配法演算処理の他の例を説明する。
[0593] 図 64の例においては、所定のしきい値 αよりも値が低めの所定のしきい値 よりも 有効画素数が多 、と判定された場合には、統合型勾配法演算および独立型勾配法 演算の両方が行われ、評価値判定部 541において、カウンタフラグおよび勾配フラグ の値に基づ 、て、検出ベクトル Veおよび初期候補ベクトル Vicが決定される処理が 示されている。
[0594] なお、以下、統合型勾配法演算により求められるベクトルを、統合型演算結果べタト ル gvとし、独立型勾配法演算により求められるベクトルを、独立型演算結果ベクトル s gvとし、検出ベクトル Veとして仮設定されるベクトルを、仮設定検出ベクトル tveとし、 初期候補ベクトル Vicとして仮設定されるベクトルを、仮設定初期候補ベクトル tviとし て説明する。
[0595] セレクタ 401は、ステップ S601において、オフセットベクトル Vn— 1を選択し、選択 したオフセットベクトルを、メモリ制御信号生成部 402、勾配法演算部 405、および評 価値演算部 61Bに出力する。
[0596] メモリ制御信号生成部 402は、信号処理装置 1の図示せぬ制御部からの制御信号 およびセレクタ 401からのオフセットベクトル Vn—1に応じて、メモリ 403に記憶されて いる時刻 tの画像のフレーム tと、時刻 t+ 1の画像のフレーム t+ 1から、処理の対象と なる演算ブロックの対象画素値を読み出させる。このとき、メモリ制御信号生成部 402 は、ステップ S602において、フレーム t+ 1における演算ブロックの対象画素が枠外 であるか否かを判定する。
[0597] フレーム t+ 1における演算ブロックの対象画素が枠外であると判定された場合、ス テツプ S603において、勾配法継続判定部 551は、カウンタフラグの値を 3に設定し、 カウンタフラグ (countflg= 3)を、演算実行判定部 425、勾配法演算部 405、および 評価判定部 541に出力する。
[0598] これに対応して、演算実行判定部 425および勾配法演算部 405は、勾配法継続判 定部 424からのカウンタフラグの値が 3の場合、各処理を行わな 、。
[0599] 評価値判定部 541は、ステップ S604において、カウンタフラグ (countflg= 3)に基づ いて、オフセットベクトル Vn—1を、仮設定検出ベクトル tveとして仮設定し (すなわち 、仮設定検出ベクトルの水平方向成分: tve.X=Vn-l.x、仮設定検出ベクトルの垂直方 向成分: tve.y=Vn-l.y)、 0ベクトルを、仮設定初期候補ベクトル tviとして仮設定する( すなわち、仮設定初期候補ベクトルの水平方向成分: tvi.x=0.0、仮設定初期候補べ タトルの垂直方向成分: tvi.y=0.0)。仮設定検出ベクトル tveおよび仮設定初期候補 ベクトル tviの設定後、処理は、図 65のステップ S615〖こ進む。
[0600] フレーム t+ 1における演算ブロックの対象画素が枠外ではないと判定された場合、 ステップ S606において、メモリ制御信号生成部 402は、メモリ 403から読み出した演 算ブロックの対象画素値を、有効画素判定部 531および勾配法演算部 405に供給さ せる。
[0601] 有効画素判定部 531は、メモリ 403から供給される対象画素値を入力すると、ステツ プ S606において、有効画素判定処理を実行する。この有効画素判定処理は、図 33 を参照して上述した有効画素判定処理と同様の処理であり、その説明は繰り返しに なるので省略する。
[0602] ステップ S553の有効画素判定処理により、メモリ 403から供給される対象画素値を 用いて、フレーム tとフレーム t+ 1の演算ブロックの画素差分が演算されることで、演 算ブロックに、勾配法の演算に有効な画素の数が有効画素数カウンタ 441にカウント される。また、演算ブロックにおいて有効な画素と判定された画素について、水平方 向および垂直方向それぞれの勾配状態が求められ、水平勾配が無い画素の数と垂 直勾配が無い画素の数が、それぞれ、水平勾配無カウンタ 442および垂直勾配無力 ゥンタ 443にカウントされる。
[0603] 勾配法 «続判定部 551は、ステップ S607において、有効画素数カウンタ 441に記 憶されて 、る値 (有効画素の数)が所定のしき 、値 βより少な 、か否かを判定する。 ステップ S607において、有効画素の数が所定のしきい値 j8より少ないと判定された 場合、勾配法継続判定部 551は、ステップ S608において、カウンタフラグの値を 0に 設定し、勾配法演算を打ち切るカウンタフラグ (coUntflg=0)を、演算実行判定部 42 5、勾配法演算部 405、および評価判定部 541に出力する。
[0604] これに対応して、演算実行判定部 425および勾配法演算部 405は、勾配法継続判 定部 424からのカウンタフラグの値が 0の場合、各処理を行わな 、。
[0605] 評価値判定部 541は、ステップ S609において、カウンタフラグ (countflg=0)に基づ いて、 0ベクトルを、仮設定検出ベクトル tveとして仮設定し (すなわち、仮設定検出べ タトルの水平方向成分: tve.x=0.0、仮設定検出ベクトルの垂直方向成分: tve.y=0.0) 、 0ベクトルを、仮設定初期候補ベクトル tviとして仮設定する(すなわち、仮設定初期 候補ベクトルの水平方向成分: tvi.x=0.0、仮設定初期候補ベクトルの垂直方向成分: tvi.y=0.0) o仮設定検出ベクトル tveおよび仮設定初期候補ベクトル tviの設定後、処 理 ίま、図 65のステップ S615に進む。
[0606] ステップ S607において、有効画素の数が所定のしきい値 j8より多いと判定された 場合、ステップ S610において、勾配法継続判定部 551は、統合型勾配法演算に用 いられる式(14)の分母が 0であるか否かを判定する。有効画素すべてが水平勾配を 持っていない場合、または、有効画素すべてが水平勾配を持っていない場合、統合 型勾配法演算に用いられる式(14)の分母は 0になる。したがって、この場合、勾配法 «続判定部 551は、有効画素数カウンタ 441の他に、水平勾配無カウンタ 442およ び垂直勾配無カウンタ 443を参照して、有効画素数カウンタ 441の値と水平勾配無 カウンタ 442の値が同じ数であるか否力、および、有効画素数カウンタ 441の値と垂 直勾配無カウンタ 443の値が同じ数である力否かを判定することで、統合型勾配法 演算に用 、られる式(14)の分母が 0である力否かを判定する。
[0607] ステップ S610において、有効画素数カウンタ 441の値と、水平勾配無カウンタ 442 の値、または垂直勾配無カウンタ 443の値が同じ数であると判定された場合、統合型 勾配法演算に用いられる式(14)の分母が 0であると判定され、勾配法継続判定部 5 51は、ステップ S611において、カウンタフラグの値を 2に設定し、勾配法演算を打ち 切るカウンタフラグ (countflg= 2)を、演算実行判定部 425、勾配法演算部 405、およ び評価判定部 541に出力する。
[0608] これに対応して、演算実行判定部 425および勾配法演算部 405は、勾配法継続判 定部 424からのカウンタフラグの値が 2の場合、各処理を行わな 、。
[0609] 評価値判定部 541は、ステップ S612において、カウンタフラグ (countflg= 2)に基づ いて、オフセットベクトル Vn—1を、仮設定検出ベクトル tveとして仮設定し (すなわち 、仮設定検出ベクトルの水平方向成分: tve.X=Vn-l.x、仮設定検出ベクトルの垂直方 向成分: tve.y=Vn-l.y)、オフセットベクトル Vn—lを、仮設定初期候補ベクトル tviと して仮設定する(すなわち、仮設定初期候補ベクトルの水平方向成分: tvi.x= Vn-l.x 、仮設定初期候補ベクトルの垂直方向成分: tvi.y= Vn-l.y) 0仮設定検出ベクトル tv eおよび仮設定初期候補ベクトル tviの設定後、処理は、図 65のステップ S615に進 む。
[0610] ステップ S610において、有効画素数カウンタ 441の値と、水平勾配無カウンタ 442 の値、および垂直勾配無カウンタ 443の値が同じ数ではないと判定された場合、統 合型勾配法演算に用いられる式(14)の分母が 0ではないと判定され、勾配法継続 判定部 551は、ステップ S613において、カウンタフラグの値を 1に設定し、勾配法演 算を実行させるカウンタフラグ (countflg= 1)を、勾配法演算部 405および評価判定 部 541に出力する。
[0611] これに対応して、勾配法演算部 405、および評価判定部 541は、ステップ S614に おいて、勾配法演算および仮設定処理を実行する。この勾配法演算および仮設定 処理を、図 66のフローチャートを参照して説明する。
[0612] 勾配法継続判定部 551からカウンタフラグ (countflg= l)が入力されると、有効画素 判定部 471は、ステップ S631において、勾配法演算部 405の各部を制御し、統合 型勾配法演算処理を実行させる。この統合型勾配法演算処理は、図 37のフローチ ヤートを参照して上述したので、その説明は省略する。
[0613] ステップ S631の統合型勾配法演算処理により、有効画素が勾配法演算の対象とさ れ、有効画素の水平方向の画素差分 Δ χ、垂直方向の画素差分 Ay、および時間方 向の画素差分 Δ tが積算されて、積算された勾配と式(14)の最小自乗和を用いて、 統合型演算結果ベクトル gvが求められて、ベクトル算出部 464に出力される。
[0614] ベクトル算出部 464は、ステップ S632において、セレクタ 401からのオフセットべク トル Vn— 1に、統合型勾配演算部 463— 1により求められた統合型演算結果べクト ル gvを加算し、ベクトル評価部 104に出力する。
[0615] また、有効画素判定部 471は、ステップ S633において、勾配法演算部 405の各部 を制御し、水平方向の独立型勾配法演算処理を実行させる。この独立型勾配法演 算処理は、図 38のフローチャートを参照して上述したので、その説明は省略する。
[0616] ステップ S633の水平方向の独立型勾配法演算処理により、有効画素のうち、水平 方向に勾配がある画素が勾配法演算の対象とされ、有効画素の水平方向の画素差 分 Δ χ、および時間方向の画素差分 A tが積算されて、積算された勾配と式 (23)を 用いて、独立型演算結果ベクトル sgvの水平方向成分 (sgv.x)が求められて、ベタト ル算出部 464に出力される。
[0617] 有効画素判定部 471は、ステップ S634において、勾配法演算部 405の各部を制 御し、垂直方向の独立型勾配法演算処理を実行させる。この独立型勾配法演算処 理は、図 38のフローチャートを参照して上述したので、その説明は省略する。
[0618] ステップ S634の垂直方向の独立型勾配法演算処理により、有効画素のうち、垂直 方向に勾配がある画素が勾配法演算の対象とされ、有効画素の垂直方向の画素差 分 Δγ、および時間方向の画素差分 A tが積算されて、積算された勾配と式 (23)を 用いて、独立型演算結果ベクトル sgvの垂直方向成分 (sgv.y)が求められて、ベタト ル算出部 464に出力される。
[0619] ベクトル算出部 464には、独立型勾配演算部 463— 2より独立型演算結果ベクトル sgvの水平方向成分および垂直方向成分の少なくとも一方が入力される。ベクトル算 出部 464は、ステップ S635において、セレクタ 401からのオフセットベクトル Vn—1 の対象方向成分 (水平方向成分および垂直方向成分の少なくとも一方)と、独立型 勾配演算部 463- 2により求められた独立型演算結果ベクトル sgvの対象方向成分 を加算し、ベクトル評価部 104に出力する。 [0620] なお、このとき、独立型演算結果ベクトル sgvの方向成分のうち、独立型勾配演算 部 463— 2より入力されな 、方向成分は、 0ベクトルとされる。
[0621] ステップ S636において、勾配法継続判定部 551は、有効画素の数が所定のしきい 値 αより少ないか否かを判定する。ステップ S636において、有効画素の数が所定の しきい値 αより少ないと判定された場合、ステップ S637において、カウンタフラグの 値を 10に設定し、オフセットベクトル Vn— 1に統合型演算結果ベクトル gvを加算した 値を、初期候補ベクトルとする(すなわち、 tvi=Vn—l +gv)カウンタフラグ (countflg = 10)を、評価判定部 541に出力する。
[0622] ステップ S638において、評価判定部 541は、カウンタフラグ (countflg= 10)に基づ いて、仮設定検出ベクトル tveを、 0ベクトルに仮設定し (すなわち、仮設定検出べタト ルの水平方向成分: tve.x=0.0、仮設定検出ベクトルの垂直方向成分: tve.y=0.0)、仮 設定初期候補ベクトル tviを、オフセットベクトル Vn— 1に統合型演算結果ベクトル gv を加算した値に仮設定する(すなわち、仮設定初期候補ベクトルの水平方向成分: tv i.x= Vn-l.x + gv.x、仮設定初期候補ベクトルの垂直方向成分: tvi.y= Vn-l.y + gv.y) 。仮設定検出ベクトル tveおよび仮設定初期候補ベクトル tviの設定後、処理は、図 6 5のステップ S615に進む。
[0623] ステップ S636において、有効画素の数が所定のしきい値 αより多いと判定された 場合、値が 1に設定されたカウンタフラグ (coUntflg= l)が演算実行判定部 425にも 出力され、演算実行判定部 425は、ステップ S639において、勾配法実行判定処理 を実行する。この勾配法実行判定処理は、図 35を参照して上述した勾配法実行判 定処理と同様の処理であり、その説明は繰り返しになるので省略する。
[0624] ステップ S639の勾配法実行判定処理により、有効画素数カウンタ 441の有効画素 の数、水平勾配無カウンタ 442の水平勾配が無い画素の数、および垂直勾配無カウ ンタ 443の垂直勾配が無い画素の数が参照されて、有効画素における片側勾配の 画素の数が多いか否かが判定され、その判定結果に応じて、統合型勾配法演算処 理および独立型勾配法演算処理の中から、勾配法演算部 405が行う勾配法演算処 理を切り替えるための勾配フラグ (gladflg)が設定され、設定された勾配フラグが、勾配 法演算部 405および評価判定部 541に出力され、処理は、ステップ S640に進む。 [0625] ステップ S640において、評価判定部 541は、カウンタフラグ (countflg= 1)と勾配フ ラグの値に基づ!/、て、仮設定検出ベクトル tveと仮設定初期候補ベクトル tviを仮設 定する。
[0626] すなわち、勾配フラグの値力^の場合、水平方向に対しては信用があるとして、仮 設定検出ベクトルの水平方向成分: tve.x= Vn-l.x + sgv.x、仮設定検出ベクトルの垂 直方向成分: tve.y= 0.0が仮設定され、仮設定初期候補ベクトルの水平方向成分: tvi •x= Vn-l.x + sgv.x,仮設定初期候補ベクトルの垂直方向成分: tvi.y= 0.0が仮設定さ れる。
[0627] 勾配フラグの値が 2の場合、垂直方向に対しては信用があるとして、仮設定検出べ タトルの水平方向成分: tve.x=0.0、仮設定検出ベクトルの垂直方向成分: tve.y=Vn-l •y + sgv.yが仮設定され、仮設定初期候補ベクトルの水平方向成分: tvi.x= 0.0、仮設 定初期候補ベクトルの垂直方向成分: tvi.y= Vn-l.y + sgv.yが仮設定される。
[0628] 勾配フラグの値が 3の場合、水平および垂直方向のどちらにも信用がないとして、 仮設定検出ベクトルの水平方向成分: tve.x= 0.0、仮設定検出ベクトルの垂直方向成 分: tve.y= 0.0が仮設定され、仮設定初期候補ベクトルの水平方向成分: tvi.x= 0.0、 仮設定初期候補ベクトルの垂直方向成分: tvi.y= 0.0が仮設定される。
[0629] 勾配フラグの値力 の場合、片側勾配の画素があまりなぐ水平および垂直方向の どちらにも信用があるとして、仮設定検出ベクトルの水平方向成分: tve.x= Vn-l.x + sv.x、仮設定検出ベクトルの垂直方向成分: tve.y= Vn-l.y + sv.yが仮設定され、仮 設定初期候補ベクトルの水平方向成分: tvi.x= Vn-l.x + sv.x、仮設定初期候補べク トルの垂直方向成分: Vn-l.y + sv.yが仮設定される。なお、この場合のみ、反復回数 は 1加算される。
[0630] 勾配フラグの値力^の場合、片側勾配の画素が多少ある力 水平および垂直方向 のどちらにも少しの信用があるとして、仮設定検出ベクトルの水平方向成分: tve.x= V n-l.x + sgv.x、仮設定検出ベクトルの垂直方向成分: tve.y= Vn-l.y + sgv.yが仮設 定され、仮設定初期候補ベクトルの水平方向成分: tvi.x= Vn-l.x + sgv.x,仮設定初 期候補ベクトルの垂直方向成分: Vn-l.y + sgv.yが仮設定される。
[0631] ステップ S640における、仮設定検出ベクトル tveおよび仮設定初期候補ベクトル tv iの設定後、処理は、図 65のステップ S615に進む。
[0632] ステップ S615において、評価判定部 541は、仮設定した各ベクトル (仮設定検出 ベクトル tveおよび仮設定初期候補ベクトル tvi)のリミットを判定する。各ベクトルの値 は、所定のベクトル値を超えていないと判定された場合には、仮設定されたベクトル のままとされるが、所定のベクトル値を超えていたと判定された場合には、 0ベクトルと される。
[0633] ステップ S616において、評価判定部 541は、カウンタフラグの値と勾配フラグの値 に基づ!/、て、仮設定検出ベクトル tveおよび仮設定初期候補ベクトル tviのベクトル評 価処理を行う。
[0634] すなわち、評価判定部 541は、カウンタフラグの値と勾配フラグの値に応じて、オフ セットベクトル Vn—1、 0ベクトル、仮設定検出ベクトル tveおよび仮設定初期候補べ タトル tviの評価値を演算させ、仮設定検出ベクトル tveの評価値 dfvと、オフセットべ タトル Vn— 1の評価値 dfvまたは 0ベクトルの評価値 dfv、および仮設定初期候補べ タトル tviの評価値 dfvと、オフセットベクトル Vn— 1の評価値 dfvまたは 0ベクトルの評 価値 dfvをそれぞれ比較し、評価値 dfvの値が小さい (すなわち、信頼性が高い)とさ れたベクトルで、仮設定検出ベクトル tveおよび仮設定初期候補ベクトル tviを更新( 変更)する。
[0635] ステップ S617において、評価判定部 541は、カウンタフラグの値と勾配フラグの値 、反復回数に基づいて、勾配法演算の反復を終了する力否かを判定する。カウンタ フラグの値が 1で、勾配フラグの値力 であり、規定の反復回数を超えていない場合、 ステップ S617において、反復すると判定され、処理は、図 64のステップ S601に戻り 、それ以降の処理を繰り返す。
[0636] すなわち、この際、評価判定部 541は、ステップ S616のベクトル評価結果により更 新された仮設定検出ベクトル tveを、遅延部 406に供給する。
[0637] ステップ S617において、反復を終了すると判定された場合、評価判定部 541は、 ステップ S618において、検出ベクトル Veを、仮設定検出ベクトル tveに決定し、決定 した検出ベクトル Veを、検出対象ブロックに対応させて、検出ベクトルメモリ 53に記 憶させ、初期候補ベクトル Vicを、仮設定初期候補ベクトル tviに決定し、決定した初 期候補ベクトル Vicを、検出対象ブロックに対応させて、初期候補ベクトルメモリ 524 に記憶させる。
[0638] 上述したステップ S616および S617の処理について、図 67を参照して説明する。
[0639] 図 67は、各フラグの値毎のベクトル評価の比較対象と反復判定結果を示している。
なお、カウンタフラグの値が「1」の場合のみ、勾配フラグが設定されている。
[0640] カウンタフラグの値が「0」のとき、勾配フラグは設定されておらず、ステップ S616の ベクトル評価における比較は「無」であり、ステップ S617における反復判定は、「しな い」と判定される。
[0641] カウンタフラグの値が「1」で勾配フラグが「1」のとき、ステップ S616のベクトル評価 における比較対象は「0ベクトル」であり、ステップ S617における反復判定は、「しな い」と判定される。
[0642] カウンタフラグの値が「1」で勾配フラグが「2」のとき、ステップ S616のベクトル評価 における比較対象は「0ベクトル」であり、ステップ S617における反復判定は、「しな い」と判定される。
[0643] カウンタフラグの値が「1」で勾配フラグが「3」のとき、ステップ S616のベクトル評価 における比較対象は「0ベクトル」であり、ステップ S617における反復判定は、「しな い」と判定される。
[0644] カウンタフラグの値が「1」で勾配フラグが「4」のとき、ステップ S616のベクトル評価 における比較対象は「オフセットベクトル (Vn—1)」であり、ステップ S617における反 復判定は、「比較結果依存」と判定される。すなわち、所定の反復回数が満たされて なければ、比較結果に応じたベクトルがオフセットベクトルとして反復される。
[0645] カウンタフラグの値力 「2」のとき、勾配フラグは設定されておらず、ステップ S616の ベタトル評価における比較対象は「オフセットベクトル (Vn— 1 )」であり、ステップ S 61 7における反復判定は、オフセットベクトルが仮設定検出ベクトル tveと同じであるの で、「しない」と判定される。
[0646] カウンタフラグの値力 「3」のとき、勾配フラグは設定されておらず、ステップ S616の ベタトル評価における比較対象は「オフセットベクトル (Vn— 1 )」であり、ステップ S 61 7における反復判定は、オフセットベクトルが仮設定検出ベクトル tveと同じであるの で、「しない」と判定される。
[0647] カウンタフラグの値が「10」のとき、勾配フラグは設定されておらず、ステップ S616 のベクトル評価における比較は「無」であり、ステップ S617における反復判定は、「し ない」と判定される。
[0648] なお、図 67の例においては、カウンタフラグの値力 「l」で勾配フラグが「0」のときに ついては図示されないが、勾配フラグが「1, 2, 3」の場合と同様に、ステップ S616の ベクトル評価における比較対象は「0ベクトル」であり、ステップ S617における反復判 定は、「しない」と判定される。
[0649] 以上のように、必要に応じて、統合型勾配法演算および独立型勾配法演算の両方 を行い、カウンタフラグに基づき、検出ベクトル、および初期候補ベクトルをそれぞれ 仮設定しておき、カウンタフラグおよび勾配フラグに基づいて、最終的に、検出べタト ル、初期候補ベクトルを決定するよう〖こすることもできる。
[0650] なお、上述した図 45のベクトル検出部 52においては、検出ベクトルと初期候補べク トルを異なるベクトルとして保持するために、検出ベクトルメモリ 53とは別に、初期候 補ベクトルメモリ 524が追カ卩して構成されている。このため、図 17のベクトル検出部 5 2と比較した場合、図 45のベクトル検出部 52におけるメモリ量が 2倍になってしまう。 そこで、図 68を参照して、初期候補ベクトルメモリ 524を追加することなぐ検出べタト ルと初期候補ベクトルを異なるベクトルとして保持するようにした構成例を説明する。
[0651] 図 68は、図 45のベクトル検出部 52の他の構成例を示すブロック図である。
[0652] 図 68のベクトル検出部 52は、プリフィルタ 102— 1および 102— 2、シフト初期べタト ル割付部 105、評価値メモリ 106、シフト初期ベクトルメモリ 107、および反復勾配法 演算部 522を備える点力 図 17のベクトル検出部 52と共通する力 初期ベクトル選 択部 521が図 17の初期ベクトル選択部 101に入れ替わった点、ベクトル評価部 523 がベクトル評価部 561に入れ替わった点、および初期候補ベクトルメモリ 524が除か れた点が、図 45のベクトル検出部 52と異なっている。
[0653] また、図 68の検出ベクトルメモリ 53には、ベクトル評価部 561により、検出対象ブロ ック 1ブロックにっき lbitの 0ベクトルフラグ (zflg)が書き込まれる、 0ベクトルフラグ領域 571が含まれている。 [0654] ベクトル評価部 561は、評価値演算部 61Bを有しており、評価値演算部 61Bに、反 復勾配法演算部 522からの動きベクトル Vn— 1 (または初期ベクトル VO)と、動きべク トル Vnの評価値 dfvを求めさせ、評価値演算部 61Bにより求められた評価値 dfvに 基づいて、反復勾配法演算部 522を制御し、勾配法の演算を繰り返し実行させ、最 終的に、評価値 dfvに基づぐ信頼性の高いものを選択する。
[0655] このとき、ベクトル評価部 561は、図 45のベクトル評価部 523と同様に、反復勾配 法演算部 522からの動きベクトル Vn— 1 (または初期ベクトル VO)、動きベクトル Vn、 または 0ベクトルの中から、反復勾配法演算部 522からのカウンタフラグおよび各べク トルの評価値 dfvに応じて、後段において割付処理に用いられる検出ベクトル Veと、 初期ベクトル選択部 101において初期ベクトル選択の際に用いられる初期候補べク トノレ Vicをそれぞれ求める。
[0656] ベクトル評価部 561は、反復勾配法演算部 522からのカウンタフラグに応じて、検 出ベクトル Veと初期候補ベクトル Vicが同じ場合、 0ベクトルフラグを 0に設定し、検出 ベクトル Veを検出ベクトルメモリ 53に記憶させるとともに、 0ベクトルフラグ (zflg=0)を 0ベクトルフラグ領域 571に書き込む。
[0657] ベクトル評価部 561は、反復勾配法演算部 522からのカウンタフラグに応じて、検 出ベクトル Veと初期候補ベクトル Vicが異なる場合 (すなわち、検出ベクトル Veが 0 ベクトルである場合)、 0ベクトルフラグを 1に設定し、初期候補ベクトル Vicを検出べク トルメモリ 53に記憶させるとともに、 0ベクトルフラグ (zflg= 1)を 0ベクトルフラグ領域 57 1に書き込む。
[0658] なお、これに対応して、後段のベクトル割付部 54は、 0ベクトルフラグに基づ 、て、 検出ベクトルメモリ 53から、検出ベクトルを読み出す。すなわち、ベクトル割付部 54は 、 0ベクトルフラグが 0の場合、検出ベクトルメモリ 53の対応するブロックの位置から、 検出ベクトルを読み出す力 0ベクトルフラグが 1の場合、検出ベクトルメモリ 53の対 応するブロックの位置から、検出ベクトルを読み出ださず、 0ベクトルを検出ベクトルと する。
[0659] 一方、初期ベクトル選択部 101は、図 17の検出ベクトル 53の場合と同様に、検出 ベクトルメモリ 53の対応するブロックの位置から、初期候補ベクトルを読み出す。 [0660] すなわち、 0ベクトルフラグは、ベクトル割付部 54が検出ベクトルを読み出すために 必要なフラグともいえる。
[0661] 図 69は、反復勾配法演算部 522およびベクトル評価部 561の構成を示すブロック 図である。
[0662] 図 69の反復勾配法演算部 522は、図 46の反復勾配法演算部 522と同様の構成 である。すなわち、反復勾配法演算部 522の有効画素判定部 531は、演算ブロック に、勾配法の演算に有効な画素の数が所定のしきい値 OCより多いと判定した場合、 カウンタフラグ(countflg= 1)を勾配法演算部 405およびベクトル評価部 561に供給 し、演算ブロックに、勾配法の演算に有効な画素の数が所定のしきい値 αより少なく 、所定のしきい値 j8よりも多いと判定した場合、カウンタフラグ (countflg= 10)を勾配 法演算部 405およびベクトル評価部 561に供給し、演算ブロックに、勾配法の演算に 有効な画素の数が所定のしき 、値 j8より少な 、と判定した場合、カウンタフラグ (coun tflg=0)を勾配法演算部 405およびベクトル評価部 561に供給する。
[0663] 図 69のベクトル評価部 561は、評価値演算部 61Bを備える点は、図 46のベクトル 評価部 523と共通する力 評価判定部 541が評価判定部 581に入れ替わった点力 図 46のベクトル評価部 523と異なって!/、る。
[0664] 評価値判定部 581は、有効画素判定部 531から供給されるカウンタフラグおよび勾 配フラグに基づいて、勾配法演算処理を反復させる力否かを判定したり、検出べタト ル Veと初期候補ベクトル Vicとをそれぞれ求める。
[0665] すなわち、評価値判定部 581は、必要に応じて、評価値演算部 61Bに演算させた 評価値 dfvを比較することにより、信頼性の高いものを選択し、動きベクトル Vを求め る。
[0666] また、評価値判定部 581は、有効画素判定部 531からカウンタフラグ (countflg= 1) が供給された場合、勾配法演算処理を反復させるか否かを判定し、反復させると判 定した場合、求めた動きベクトル Vを、遅延部 406に出力する。評価値判定部 581は 、勾配法演算処理を反復させない場合、カウンタフラグの値に応じて、求めた動きべ タトル Vを、検出ベクトル Veまたは初期候補ベクトル Vicとして、検出ベクトルメモリ 53 に記憶させるとともに、 0ベクトルフラグを記憶させる。 [0667] すなわち、有効画素判定部 531からのカウンタフラグの値が 1の場合 (有効画素の 数が所定のしきい値 exよりも多い場合)は、検出ベクトル Veと初期候補ベクトル Vicは 、同じベクトルである。また、有効画素判定部 531からのカウンタフラグの値力^の場 合 (有効画素の数が所定のしき!、値 13よりも少な!/、場合)、検出ベクトル Veと初期候 補ベクトル Vicは、同じベクトル(すなわち、 0ベクトル)である。
[0668] 一方、有効画素判定部 531からのカウンタフラグの値が 10の場合 (有効画素の数 が所定のしきい値 αよりも少なぐ所定のしきい値 j8よりも多い場合)は、検出ベクトル Veは、 0ベクトルであり、初期候補ベクトル Vicとは、異なるベクトルである。
[0669] したがって、評価値判定部 581は、有効画素判定部 531からのカウンタフラグの値 力 の場合、初期ベクトル選択部 101とベクトル割付部 54の両方力 検出ベクトルメ モリ 53に記憶されたベクトルを用いるように、 0ベクトルフラグの値を 0に設定して、検 出ベクトル Veを記憶させるときに、 0ベクトルフラグ (zflg= 0)も、 0ベクトルフラグ領域 5 71に書き込む。
[0670] また、評価値判定部 581は、有効画素判定部 531からのカウンタフラグの値力^の 場合も、初期ベクトル選択部 101とベクトル割付部 54の両方が、検出ベクトルメモリ 5 3に記憶されたベクトルを用いるように、 0ベクトルフラグの値を 0に設定して、検出べ タトル Ve(= 0ベクトル)を記憶させるときに、 0ベクトルフラグ (zflg= 0)も、 0ベクトルフラ グ領域 571に書き込む。
[0671] さらに、評価値判定部 581は、有効画素判定部 531からのカウンタフラグの値が 10 の場合、初期ベクトル選択部 101のみが、検出ベクトルメモリ 53に記憶されたべタト ルを用い、ベクトル割付部 54力 SOベクトルを用いるように、 0ベクトルフラグの値を 1に 設定して、初期候補ベクトル Vic(= 0ベクトル)を記憶させるときに、 0ベクトルフラグ (zf lg= l)も、 0ベクトルフラグ領域 571に書き込む。
[0672] これにより、初期候補ベクトル Vic用のメモリ(図 45の初期候補ベクトルメモリ 524) を持たなくても、検出ベクトルメモリ 53に 0ベクトルフラグ用の領域を 1ブロックにっき 1 bit拡張させるだけで、初期候補ベクトル Vic用のメモリを持った場合と同様の効果が 期待できる。
[0673] 次に、図 70のフローチャートを参照して、図 69の評価判定部 581のベクトル記憶制 御処理を説明する。なお、図 70は、図 63のステップ S565における検出ベクトルおよ び初期候補ベクトルを記憶させる処理の他の例である。すなわち、図 68のベクトル検 出部 52の勾配法演算処理は、ステップ S565の評価値判定部 581による検出べタト ルおよび初期候補ベクトルの記憶制御処理が異なるだけであり、その他の処理は、 図 63を参照して上述した図 45のベクトル検出部 52の勾配法演算処理と基本的に同 様の処理であるため、その説明は省略する。
[0674] 評価判定部 581は、ステップ S660において、有効画素判定部 531からのカウンタ フラグの値が 10である力否かを判定する。
[0675] ステップ S660において、カウンタフラグの値が 10ではない(すなわち、 0か 1である )と判定された場合、評価判定部 581は、ステップ S661において、 0ベクトルフラグの 値を 0に設定し、ステップ S662において、図 63のステップ S557において求められた 動きベクトル Vを、検出ベクトル Veとして、 0ベクトルフラグ (zflg=0)とともに検出べタト ルメモリ 63に記憶させる。
[0676] すなわち、検出ベクトル Veは、検出対象ブロックに対応させて、記憶され、 0ベタト ルフラグ (zflg=0)は、検出対象ブロックに対応させて lbit分拡張された 0ベクトルフラ グ領域 571に記憶される。
[0677] これに対応して、初期ベクトル選択部 101は、検出ベクトルメモリ 53の対応するプロ ックの位置から、初期候補ベクトルを読み出し、後段のベクトル割付部 54は、 0ベタト ルフラグ (zflg=0)に応じて、検出ベクトルメモリ 53の対応するブロックの位置から、検 出ベクトルを読み出す。
[0678] 一方、ステップ S660において、カウンタフラグの値が 10であると判定された場合、 評価判定部 581は、ステップ S663において、 0ベクトルフラグの値を 1に設定し、ステ ップ S664において、図 63のステップ S557において求められた動きベクトル Vを、初 期候補ベクトル Vicとして、 0ベクトルフラグ (zflg= 1)とともに検出ベクトルメモリ 63に記 憶させる。
[0679] すなわち、初期候補ベクトル Vicは、検出対象ブロックに対応させて、記憶され、 0 ベクトルフラグ (zflg= 1)は、検出対象ブロックに対応させて lbit分拡張された 0ベタト ルフラグ領域 571に記憶される。 [0680] これに対応して、初期ベクトル選択部 101は、検出ベクトルメモリ 53の対応するブロ ックの位置から、初期候補ベクトルを読み出し、後段のベクトル割付部 54は、 0ベタト ルフラグ (zflg= l)に応じて、検出ベクトルメモリ 53の対応するブロックの位置から、検 出ベクトルを読み出ださず、 0ベクトルを検出ベクトルとする。
[0681] 以上のように、初期候補ベクトル Vic用のメモリ(図 45の初期候補ベクトルメモリ 524 )を持たなくても、検出ベクトルメモリ 53に 0ベクトルフラグ用の領域を 1ブロックにっき lbit拡張させるだけで、初期候補ベクトル Vic用のメモリを持った場合と同様の効果が 期待できる。
[0682] すなわち、演算ブロック内の有効画素数の割合を、所定のしき!、値 exだけでなぐ 所定のしきい値 αよりもさらに少ないしきい値 j8を用いて判定し、演算ブロック内の有 効画素数が所定のしき 、値 ocより少なぐ所定のしき 、値 βよりも多力つた場合には 、勾配法演算を打ち切ることなぐ勾配法演算結果を、初期候補ベクトルとし、 0ベ外 ルを検出ベクトルするようにしたので、後段の割付処理で用いる検出ベクトルの精度 を従来と同程度に維持したまま、勾配法演算によるベクトル検出処理の収束速度を 向上させることができる。
[0683] 次に、ベクトル割付部 54の構成の詳細について説明する。
[0684] 図 71は、ベクトル割付部 54の構成を示すブロック図である。図 71に構成を示すベ タトル割付部 54は、 24Ρ信号の入力される時刻 tの画像のフレーム tと、時刻 t+ 1の 画像のフレーム t+ 1を用いて、フレーム t上において検出された動きベクトルを、割付 ベクトルメモリ 55上の、補間する 60P信号の内挿フレーム上の画素に割り付ける処理 を行う。
[0685] 図 71の例において、時刻 tの画像のフレーム tと、時刻 t+ 1の画像のフレーム t+ 1 は、画素情報演算部 701、図 6を参照して上述した評価値演算部 61、および着目画 素差分演算部 703に入力される。
[0686] 画素情報演算部 701は、検出ベクトルメモリ 53のフレーム t上の画素に検出された 動きベクトルを、左上の画素からラスタスキャン順に取得し、取得した動きベクトルを、 次の時刻のフレーム t+ 1方向に延ばし、延ばした動きベクトルと、内挿フレームとの 交点を算出する。そして、画素情報演算部 701は、算出された動きべ外ルと内挿フ レームとの交点から、内挿フレーム上において、その動きベクトルの割付対象となる 画素(以下、割付対象画素と称する)を設定し、動きベクトルおよび割付対象画素の 位置の情報を、ベクトル選択部 705に出力する。また、画像情報演算部 701は、割付 対象画素と、動きベクトルで対応付けられるフレーム tの位置 Pおよびフレーム t+ 1上 の位置 Qを算出し、算出されたフレーム tおよびフレーム t+ 1上の位置情報を、評価 値演算部 61、および着目画素差分演算部 703に出力する。
[0687] 評価値演算部 61は、画素情報演算部 701から、割付対象画素と、動きベクトルで 対応付けられるフレーム tおよびフレーム t+ 1上の位置情報を入力すると、フレーム t の位置 Pおよびフレーム t+ 1の位置 Qの評価値 DFDを演算するため、位置 Pおよび 位置 Qを中心とした一定範囲の DFD演算範囲 (m X n)をそれぞれ設定し、それらの DFD演算範囲が画枠内にある力否かを判定する。評価値演算部 61は、 DFD演算 範囲が画枠内にあると判定した場合、この DFD演算範囲を用いて演算することによ り、動きベクトルに対する割付対象画素の評価値 DFDを求め、求めた評価値 DFDを 、ベクトル評価部 704に出力する。
[0688] 着目画素差分演算部 703は、画素情報演算部 701から、割付対象画素と、動きべ タトルで対応付けられるフレーム tおよびフレーム t+ 1上の位置情報を入力すると、フ レーム tの位置 Pおよびフレーム t+ 1の位置 Qを用いて、割付対象画素に対する輝 度差分絶対値を求め、求めた輝度差分絶対値を、ベクトル評価部 704に出力する。
[0689] ベクトル評価部 704は、画素差分判定部 711および評価値判定部 712により構成 される。画素差分判定部 711は、着目画素差分演算部 703から入力された割付対象 画素に対する輝度差分絶対値が所定のしきい値よりも小さいか否かを判定する。評 価値判定部 712は、画素差分判定部 711により着目画素差分演算部 703から入力 された割付対象画素に対する輝度差分絶対値が所定のしきい値よりも小さいと判定 された場合に、評価値演算部 61から入力された割付対象画素の評価値 DFDが、ベ タトル選択部 705が有する DFDテーブルの最小評価値より小さいか否かを判定する 。そして、評価値判定部 712は、割付対象画素の評価値 DFDが、 DFDテーブルの 最小評価値より小さ!/ヽと判定した場合に、割付対象画素が対応する動きベクトルの信 頼度が高いと判定し、ベクトル選択部 705に、割付対象画素の評価値 DFDを出力す る。
[0690] ベクトル選択部 705は、内挿フレーム上の各画素における最小評価値を保持する DFDテーブルを有しており、内挿フレーム上の各画素に対して、 0ベクトルを割り付 けた場合の評価値 DFDOを、内挿フレーム上の各画素における最小評価値として D FDテーブルに予め保持している。ベクトル選択部 705は、ベクトル評価部 704から の割付対象画素の評価値 DFDを入力すると、画素情報演算部 701からの割付対象 画素の位置の情報に基づいて、割付フラグメモリ 56のフラグを l(true)に書き換え、割 付対象画素の DFDテーブルの最小評価値を、その割付対象画素の評価値 DFDに 書き換える。また、ベクトル選択部 705は、画素情報演算部 701からの割付対象画素 の位置の情報に基づいて、割付ベクトルメモリ 55の割付対象画素に、画素情報演算 部 701からの動きベクトルを割り付ける。
[0691] なお、図 71の例においては、図 17および図 45の検出ベクトルメモリ 53の場合が説 明されているが、画素情報演算部 701は、図 68の例の検出ベクトルメモリ 53から、動 きベクトルを取得する際には、フレーム t上の画素に対応して書き込まれている 0ベタ トルフラグの値に応じて、フレーム t上の画素に検出された動きベクトル (検出ベクトル )、あるいは、 0ベクトルを取得する。
[0692] 次に、動きベクトルの画素以下精度を説明する。
[0693] 上述した式(1)で表される DFD評価の演算においては、フレーム tの画素位置 pを ベクトル V量分ずらした先のフレーム t+ 1上の位相 p+vは、実際には、 24p信号のフ レーム t+ 1上の画素位置と一致しない場合が多ぐその場合の輝度値は定義されて いない。したがって、画素以下精度を有する動きベクトル Vに対する評価値 DFDの演 算を行うためには、画素以下の位相における輝度値を何らかの方法で生成しなけれ ばならない。
[0694] これに対応して、フレーム tの画素位置 pをベクトル V量分ずらした先のフレーム t+ 1 上の位相 p+vに最も近い画素の輝度値をそのまま用いる方法がある。しかしながら、 この方法では、評価する動きベクトルの画素以下成分を丸めてしまうため、動きべタト ルの画素以下成分を捨てていることになり、これにより求められた評価値 DFDの信頼 度は、低くなつてしまう。 [0695] そこで、本発明においては、周辺 4画素の輝度値による 4点補間処理を用いている 。図 72は、本発明の 4点補間処理の概念を示す図である。図 72においては、矢印 X 力 フレーム t+1における水平方向を示しており、矢印 Yが、フレーム t+1における 垂直方向を示している。このフレーム t+1において、白丸は、フレーム t+1上の画素 位置を表しており、黒点は、画素以下の (粒度の)位置を表している。また、フレーム t + 1上における最左上の黒点 p+vとその周辺 4画素は、ウィンドウ Eに拡大して示さ れている。ウィンドウ Eにおいて、白丸内のアルファベットは、周辺 4画素の輝度値を 示している。
[0696] このフレーム t+1における最左上の黒点 p+v力 フレーム tの画素位置 pをベクトル V量分ずらした先の位相 p+vとすると、位相 p+vの輝度値 F (p+v)は、位相 p+v
t+1
の水平方向の画素以下成分 αおよび垂直方向の画素以下成分 β、並びに、位相 ρ + Vの周辺 4画素の輝度値 LO乃至 L4を用いて、周辺 4画素の距離の逆比の和で求 められる。すなわち、輝度値 F (p+v)は、次の式(31)で表される。
t+1
[0697] [数 30]
Ft+i (p+v) = (1-Qi) (]-β)10+α -β)υ + -α)β12+αβ13
•••(31)
[0698] 以上のように、 4点補間処理により求められる輝度値 F (p+v)を用いて、 DFD評
t+1
価の演算を行うことにより、ハードウェア実装上のコストを引き上げることなぐ評価値
DFDの信頼度の低下を抑制することができる。なお、以下においては、ベクトル割付 の際の評価値 DFDや輝度差分絶対値などの演算において、この 4点補間を適用し た例を説明する力 もちろん、上述した初期ベクトル選択処理やベクトル検出処理な どのベクトルを評価する場合の評価値 dfv (評価値 mDFD)の演算、後述する割付補 償処理などのベクトルを評価する場合の評価値 DFDの演算、または、後述する画像 補間の処理においても、この 4点補間は適用される。
[0699] 次に、図 73のフローチャートを参照して、ベクトル割付処理の詳細を説明する。 24 P信号の元フレームである、時刻 tの画像のフレーム tと、時刻 t+1の画像のフレーム t+1は、画素情報演算部 701、評価値演算部 61、および着目画素差分演算部 703 に入力される。 [0700] 画素情報演算部 701は、新しい元フレームが入力されると、ベクトル選択部 705を 制御し、ステップ S701において、割付フラグメモリ 56の割付フラグを O(False)で初期 化させ、ステップ S702において、割付ベクトルメモリ 55を 0ベクトルで初期化させる。 これにより、結果的に、動きベクトルが割り付けられない画素に、 0ベクトルが割り付け られる。
[0701] また、画素情報演算部 701は、ステップ S703において、評価値演算部 61を制御し 、内挿フレーム上のすべての画素に対して、 0ベクトルを用いて評価値 DFD0を算出 させ、ベクトル選択部 705を制御し、評価値演算部 61により算出された 0ベクトルの 評価値 DFD0を、内挿フレームの各画素に対する最小評価値として DFDテーブル に記憶させる。すなわち、ステップ S703において、評価値演算部 61は、内挿フレー ムすべての画素に対して、 0ベクトルを用いて評価値 DFD0を算出し、算出した評価 値 DFD0を、ベクトル評価部 704を介して、ベクトル選択部 705に出力する。そして、 ベクトル選択部 705は、ベクトル評価部 704を介して入力された評価値 DFD0を、 D FDテーブルの対応する画素の最小評価値として記憶する。
[0702] 画素情報演算部 701は、ステップ S704において、検出ベクトルメモリ 53上の元フ レームから画素を選択する。なお、この場合、フレームの左上からラスタスキャン順に 画素が選択される。
[0703] 画素情報演算部 701は、ステップ S705において、画素位置演算処理を実行する。
具体的には、画素情報演算部 701は、取得された動きベクトルと内挿フレームの交 点を算出し、動きべ外ルと内挿フレーム力 算出された交点から、割付対象画素を 設定する。このとき、画素情報演算部 701は、交点が内挿フレーム上の画素位置に 一致する場合には、交点を、割付対象画素に設定する。一方、画素情報演算部 701 は、交点が内挿フレーム上の画素位置に一致しない場合には、上述したように、内挿 フレーム上の交点の近傍 4画素を、割付対象画素に設定する。
[0704] 画素情報演算部 701は、評価値演算部 61および着目画素差分演算部 703が評 価値 DFDおよび輝度差分絶対値を求める上で必要である、各割付対象画素を基準 に、取得された動きベクトルで対応付けた元フレーム上の位置を、取得された動きべ タトルを、設定された割付対象画素にシフト (平行移動)し、シフトされた動きベクトル と、元フレーム上の交点の位置を求めることで、算出する。
[0705] 画素情報演算部 701は、ステップ S706において、算出された割付対象画素を選 択し、選択した割付対象画素と、その動きベクトルを、ベクトル選択部 705に出力する このとき、同時に、画素情報演算部 701は、選択した割付対象画素を基準に、その 動きベクトルで対応付けられる元フレーム上の位置の情報を、評価値演算部 61およ び着目画素演算部 703に出力する。なお、ステップ S706において、画素情報演算 部 701は、割付対象画素が複数存在する場合には、左上の画素から選択する。
[0706] ステップ S707において、画素情報演算部 701は、選択された割付対象画素に関し て、割付ベクトル評価処理を実行する。この割付ベクトル評価処理の詳細は、図 74を 参照して後述するが、この割付ベクトル評価処理により、割付対象画素における動き ベクトルの評価値 DFDおよび輝度差分絶対値が求められ、割付対象画素における 動きベクトルの信頼度が判定され、これらの判定の結果、信頼度が高いとされた動き ベクトルで、割付ベクトルメモリ 55の動きベクトルが書き換えられる。
[0707] 画素情報演算部 701は、ステップ S708において、すべての割付対象画素の処理 が終了した力否かを判定する。ステップ S708において、まだ、すべての割付対象画 素の処理が終了していないと判定された場合には、処理は、ステップ S706に戻り、 次の割付対象画素が選択され、それ以降の処理が繰り返される。
[0708] ステップ S708において、すべての割付対象画素の処理が終了したと判定された場 合、画素情報演算部 701は、ステップ S709において、検出ベクトルメモリ 53上の元 フレームのすべての画素の処理を終了したか否かを判定する。ステップ S709におい て、検出ベクトルメモリ 53上の元フレームのすべての画素の処理を終了していないと 判定された場合、処理は、ステップ S704に戻り、検出ベクトルメモリ 53上の元フレー ムの次の画素が選択され、それ以降の処理が繰り返される。また、ステップ S709に おいて、検出ベクトルメモリ 53のすベての画素についての処理を終了したと判定され た場合、ベクトル割付処理は終了される。
[0709] 次に、図 74のフローチャートを参照して、割付ベクトル評価処理の詳細を説明する なお、図 74は、図 73のステップ S 707の割付ベクトル評価処理の例を示している。
[0710] 図 73のステップ S706において、画素情報演算部 701により、選択した割付対象画 素を基準に、その動きベクトルで対応付けられる元フレーム上の位置が求められ、求 められた元フレーム上の位置の情報が、評価値演算部 61および着目画素差分演算 部 703に入力される。
[0711] 評価値演算部 61は、画素情報演算部 701から、元フレーム上の位置の情報が入 力されると、ステップ S741において、割付対象画素における動きベクトルの評価値 D FDを求めるために、フレーム tおよびフレーム t+ 1上の位置を中心とした DFD演算 範囲(m X n)をそれぞれ求め、ステップ S 742において、求められた DFD演算範囲 が画枠内にあるカゝ否かを判定する。
[0712] ステップ S742において、 DFD演算範囲が画枠からはみ出していると判定された場 合、その動きベクトルは、割付対象画素に割り付ける割付候補ベクトルにはならない と判定され、ステップ S743乃至 S749の処理は、スキップされ、割付ベクトル評価処 理は終了され、処理は、図 73のステップ S708〖こ戻る。これ〖こより、フレーム t上の点 P 、およびフレーム t+ 1上の点 Qを中心とした DFD演算範囲が画枠をはみ出てしまつ た場合の動きべ外ルは、候補から除外される。
[0713] ステップ S742において、求められた DFD演算範囲が画枠内にあると判定された場 合、評価値演算部 61は、ステップ S743において、画枠内にあると判定された DFD 演算範囲を用いて、割付対象画素の評価値 DFDを演算し、求められた評価値 DFD を、評価値判定部 712に出力する。なお、このとき、元フレーム上の位置が画素以下 であった場合には、上述した 4点補間を用いて、元フレーム上の交点の輝度値を求 めることにより、割付対象画素の評価値 DFDが演算される。
[0714] 一方、着目画素差分演算部 703は、画素情報演算部 701から、元フレーム上の位 置の情報が入力されると、ステップ S744において、割付対象画素における輝度差分 絶対値 dpを求め、求められた輝度差分絶対値 dpを、画素差分判定部 711に出力す る。なお、このときも、元フレーム上の位置が画素以下であった場合には、着目画素 差分演算部 703は、上述した 4点補間を用いて、元フレーム上の交点の輝度値を求 めることにより、割付対象画素における輝度差分絶対値 dpを演算する。 [0715] 画素差分判定部 711は、ステップ S745において、着目画素差分演算部 703から の割付対象画素の輝度差分絶対値 dpが、所定のしき!/、値以下であるカゝ否かを判定 する。
ステップ S745において、割付対象画素の輝度差分絶対値 dpが、所定のしきい値よ り大きいと判定された場合、フレーム tおよびフレーム t+ 1の交点がそれぞれ異なる オブジェクトに属する可能性が高いと判定され、すなわち、その動きベクトルは、割付 対象画素における信頼度が低ぐ割付対象画素に割り付ける割付候補ベクトルには ならないと判定され、処理は、ステップ S746乃至 S749をスキップし、割付ベクトル評 価処理を終了し、図 73のステップ S708〖こ戻る。
[0716] これにより、フレーム tおよびフレーム t+ 1の交点がそれぞれ異なるオブジェクトに 属する場合の動きベクトルは候補から外される。
[0717] ステップ S745において、割付対象画素の輝度差分絶対値 dpが、所定のしきい値 以下であると判定された場合、処理は、ステップ S746に進む。評価値判定部 712は 、ステップ S746において、ベクトル選択部 705の DFDテーブルを参照し、評価値演 算部 61からの割付対象画素の評価値 DFDが、 DFDテーブルに記憶されて 、る割 付対象画素の最小評価値 ( 、まの場合、 0ベクトルの評価値 DFDO)よりも小さ 、か 否かを判定する。ステップ S 746において、評価値演算部 61からの割付対象画素の 評価値 DFDが、 DFDテーブルに記憶されて ヽる割付対象画素の最小評価値以上 であると判定された場合、その動きベクトルは、割付対象画素において、信頼度が高 くないと判定され、ステップ S747乃至 S749の処理は、スキップされ、割付ベクトル評 価処理は終了され、処理は、図 73のステップ S708〖こ戻る。
[0718] 一方、ステップ S746において、評価値演算部 61からの割付対象画素の評価値 D FDが、 DFDテーブルに記憶されて 、る割付対象画素の最小評価値よりも小さ!/、と 判定された場合、評価値判定部 712は、その動きベクトルは、割付対象画素におい て、いままで比較した動きベクトルの中で最も、評価値 DFDに基づく信頼度が高いと 判定し、信頼度が高いと判定された割付対象画素の評価値 DFDを、ベクトル選択部 705に出力する。
[0719] ベクトル選択部 705は、評価値判定部 712からの割付対象画素の評価値 DFDを 入力すると、ステップ S747において、割付フラグメモリ 56の割付対象画素の割付フ ラグを l(True)に書き換え、ステップ S748において、 DFDテーブルの割付対象画素 が対応する最小評価値を、評価値判定部 712により信頼度が高いと判定された評価 値 DFDに書き換える。
[0720] ベクトル選択部 705には、ステップ S706において、画素情報演算部 701から選択 した割付対象画素とその動きベクトルが入力されている。したがって、ベクトル選択部 705は、ステップ S749において、割付ベクトルメモリ 55の割付対象画素に割り付けら れて 、る動きベクトルを、信頼度が高 、と判定された評価値 DFDに対応する動きべ タトルで書き換える。これにより、割付ベクトル評価処理は終了され、処理は、図 73の ステップ S708に戻る。
[0721] 以上のように、内挿フレームの割付対象画素に割り付けられる動きベクトルを選ぶと きに、評価値 DFDだけでなぐ割付対象画素を基準に動きベクトルで対応付けた元 フレーム上の位置に基づいて求められる、割付対象画素の輝度差分絶対値を別扱 いにし、評価するようにしたので、従来の評価値 DFDを用いるだけの場合よりも、割 付候補ベクトルの中から、最も確からしい動きベクトルを選んで、割付対象画素に割り 付けることができる。これにより、ベクトル割付の精度が向上し、後段の画像補間処理 にお 、て生成される画像の不連続性などを抑制することができ、画像の品質を向上 させることがでさる。
[0722] さらに、評価値 DFDや輝度差分絶対値を求める際などに、画素以下位置の画素 値が必要な場合に、その画素以下位置の近傍 4画素との距離を基にした線形補間 で値を求めるようにしたので、画素以下位置精度の処理が可能になり、さらに、従来 の画素以下成分を丸めてしまう方法よりも、輝度差分絶対値 dpや評価値 DFDを精 度よく求めることができ、これにより、割付候補ベクトルの中から、着目画素により確か らしい動きベクトルを割り付けることができる。すなわち、ベクトル割付処理の精度が 向上する。
[0723] 次に、割付補償部 57の構成の詳細について説明する。
[0724] 図 75は、割付補償部 57の構成を示すブロック図である。図 75に構成を示す割付 補償部 57は、割付ベクトル判定部 801およびベクトル補償部 802により構成され、ベ タトル割付部 54により動きベクトルが割り付けられな力つた 60P信号の内挿フレーム 上の画素に、その周辺画素の動きベクトルを補って割り付ける処理を行う。
[0725] 前段のベクトル割付部 54により、割付ベクトルメモリ 55上の内挿フレームの画素に は動きベクトルが割り付けられている。また、ベクトル割付部 54により動きベクトルが 割り付けられた画素の割付フラグメモリ 56の割付フラグには、 l(True)が書き込まれて おり、動きベクトルが割り付けられな力つた画素の割付フラグメモリ 56の割付フラグに は、 O(False)が書き込まれている。
[0726] 割付ベクトル判定部 801は、割付フラグメモリ 56の割付フラグを参照し、着目画素 に、ベクトル割付部 54により動きベクトルが割り付けられているか否かを判定する。そ して、割付ベクトル判定部 801は、ベクトル割付部 54により動きベクトルが割り付けら れなカゝつた着目画素を選択し、選択した着目画素に対して、ベクトル補償部 802を制 御し、その着目画素の周辺画素の動きベクトルを選択して、割付ベクトルメモリ 55の 内挿フレーム上に割り付けさせる。
[0727] ベクトル補償部 802は、補償処理部 811、および図 6を参照して上述した評価値演 算部 61により構成される。
[0728] 補償処理部 811は、最小評価値 DFDと、最小評価値 DFDの動きベクトルを候補 ベクトル (以下、補償候補ベクトルとも称する)として記憶するメモリ 821を有しており、 割付ベクトル判定部 801により選択された着目画素の初期値として、 0ベクトルの評 価値 DFDを最小評価値としてメモリ 821に記憶し、 0ベクトルを、補償候補ベクトルと してメモリ 821に記憶する。補償処理部 811は、割付フラグメモリ 56を参照して、着目 画素の周辺画素の動きベクトルの有無を判定し、割付ベクトルメモリ 55から、周辺画 素に割り付けられている動きベクトルを取得し、評価値演算部 61を制御し、その動き ベクトルの評価値 DFDを演算させる。
[0729] また、補償処理部 811は、評価値演算部 61により演算された評価値 DFDがメモリ 8 21に記憶されて 、る最小評価値よりも小さ!/、か否かを判定し、演算された評価値 DF Dが最小評価値よりも小さいと判定した場合、メモリ 821の補償候補ベクトルと最小評 価値を、演算された評価値 DFDとその動きベクトルに書き換え、最終的に、評価値 D FDが最も小さ ヽと判定された周辺画素の動きベクトル (補償候補ベクトル)を、着目 画素の動きベクトルとして、割付ベクトルメモリ 55の着目画素に割り付ける。さらに、補 償処理部 811は、動きベクトルが割り付けられた着目画素の割付フラグメモリ 56の割 付フラグを l(True)に書き換える。
[0730] 評価値演算部 61は、割付ベクトルメモリ 55から周辺画素の動きベクトルを取得する と、入力される時刻 tの 24P信号の画像のフレーム tと、時刻 t+ 1の画像のフレーム t + 1を用いて、割付ベクトルメモリ 55からの動きベクトルの評価値 DFDを演算し、演 算した評価値 DFDを補償処理部 811に出力する。
[0731] 次に、図 76のフローチャートを参照して、割付補償処理の詳細を説明する。前段の ベクトル割付部 54により、割付ベクトルメモリ 55上の内挿フレームの画素には動きべ タトルが割り付けられている。また、ベクトル割付部 54により動きベクトルが割り付けら れた画素の割付フラグメモリ 56の割付フラグには、 l(True)が書き込まれており、動き ベクトルが割り付けられな力つた画素の割付フラグメモリ 56の割付フラグには、 0(Fals e)が書き込まれている。
[0732] 割付ベクトル判定部 801は、ステップ S801において、割付フラグメモリ 56の内揷フ レームの画素を、着目画素として選択する。このとき、割付ベクトル判定部 801は、フ レームの左上の画素からラスタスキャン順に画素を選択する。
[0733] 割付ベクトル判定部 801は、ステップ S802において、割付フラグメモリ 56内の着目 画素の割付フラグ力 O(False)である力否かを判定し、割付フラグメモリ 56内の着目 画素の割付フラグ力 O(False)であると判定した場合、動きベクトルが割り付けられて いないと判定し、ステップ S803において、補償処理部 811を制御し、ベクトル補償処 理を実行させる。このベクトル補償処理の詳細は、図 77を参照して後述するが、この ベクトル補償処理により、周辺画素に割り付けられた動きベクトルの中から、評価値 D FDの最小の動きベクトルが補償候補ベクトルとしてメモリ 821に記憶される。
[0734] 補償処理部 811は、ステップ S804において、メモリ 821の補償候補ベクトルを、着 目画素の動きベクトルとして、割付ベクトルメモリ 55に割り付け、ステップ S805におい て、割付フラグメモリ 56の着目画素の割り付けフラグを、 l(True)に書き換える。
[0735] 一方、ステップ S802において、割付フラグメモリ 56内の着目画素の割付フラグが、 l(True)であると判定され場合、その着目画素にはすでに動きベクトルが割り付けられ ているとされ、処理は、ステップ S803乃至 S805のをスキップし、ステップ S806〖こ進 む。
[0736] 割付ベクトル判定部 801は、ステップ S806において、割付フラグメモリ 56の内揷フ レームのすべての画素の処理を終了したか否かを判定する。ステップ S806において 、すべての画素の処理を終了していないと判定された場合、処理は、ステップ S801 に戻り、割付フラグメモリ 56の内挿フレームの次の画素力 着目画素として選択され 、それ以降の処理が実行される。ステップ S806において、割付フラグメモリ 56の内 挿フレームのすべての画素の処理を終了したと判定された場合、割付補償処理は終 了される。
[0737] 次に、図 77のフローチャートを参照して、ベクトル補償処理の詳細を説明する。な お、図 77は、図 76のステップ S803のベクトル補償処理の例を示している。
[0738] 補償処理部 811は、ステップ S821において、評価値演算部 61を制御し、 0ベタト ルを用いて評価値 DFDOを算出させる。具体的には、評価値演算部 61は、ステップ S821において、入力される時刻 tの画像のフレーム tと、時刻 t+ 1の画像のフレーム t+ 1を用いて、例えば、図 62を参照して上述したように、着目画素について、 0ベタト ルでの評価値 DFDOを演算し、演算した評価値 DFDOを補償処理部 811に出力す る。
[0739] ステップ S822において、補償処理部 811は、評価値 DFDOを最小評価値としてメ モリ 821に記憶し、ステップ S823において、 0ベクトルを補償候補ベクトルとして、メ モリ 821に記憶する。補償処理部 811は、ステップ S824において、割付ベクトル判 定部 801により選択された着目画素の周辺 8画素のうち、 1つの周辺画素を選択する 。このとき、補償処理部 811は、周辺 8画素のうち、左上の画素力もラスタスキャン順 に周辺画素を選択する。
[0740] 補償処理部 811は、ステップ S825において、割付フラグメモリ 56を参照し、選択し た周辺画素の動きベクトルが存在する力否かを判定する。割付フラグメモリ 56の周辺 画素の割付フラグが l(True)であれば、ステップ S825において、選択した周辺画素 に割り付けられている動きベクトルが存在すると判定され、処理は、ステップ S826に 進み、補償処理部 811は、割付ベクトルメモリ 55から、周辺画素の動きベクトルを取 得する。このとき、割付ベクトルメモリ 55から評価値演算部 61にも周辺画素の動きべ タトルが出力される。
[0741] 評価値演算部 61は、割付ベクトルメモリ 55から周辺画素の動きベクトルが入力され ると、ステップ S827において、入力される時刻 tの画像のフレーム tと、時刻 t+ 1の画 像のフレーム t+ 1を用いて、着目画素について、割付ベクトルメモリ 55からの動きべ タトルの評価値 DFDを演算し、演算した評価値 DFDを、補償処理部 811に出力す る。
[0742] 補償処理部 811は、評価値演算部 61から評価値 DFDが入力されると、ステップ S 828において、評価値 DFD力 メモリ 821に記憶されている着目画素の最小評価値 よりも小さいか否かを判定する。ステップ S828において、評価値 DFD力 メモリ 821 に記憶されて!ヽる着目画素の最小評価値よりも小さ!、と判定された場合、補償処理 部 811は、ステップ S829において、メモリ 821の最小評価値を、最小評価値よりも小 さいと判定された評価値 DFDに書き換え、ステップ S830において、メモリ 821の補 償候補ベクトルを、その最小評価値の動きベクトルに書き換える。
[0743] 一方、ステップ S825において、割付フラグメモリ 56の周辺画素の割付フラグが 0(F alse)であると、選択した周辺画素に割り付けられている動きベクトルがないと判定され 、ステップ S826乃至 S830の処理はスキップされ、処理は、ステップ S831に進む。ま た、ステップ S828において、評価値 DFD力 メモリ 821に記憶されている着目画素 の最小評価値以上であると判定された場合、ステップ S829および S830の処理はス キップされ、処理は、ステップ S831〖こ進む。
[0744] 補償処理部 811は、ステップ S831において、着目画素の周辺 8画素すべてに対し て処理が終了したか否かを判定する。ステップ S831において、着目画素の周辺 8画 素すべてに対して処理が終了していないと判定された場合、処理は、ステップ S824 に戻り、次の周辺画素が選択され、それ以降の処理が繰り返される。また、ステップ S 831において、着目画素の周辺 8画素すべてに対して処理が終了したと判定された 場合、ベクトル補償処理は終了され、処理は、図 76のステップ S804に戻る。
[0745] 以上のように、ベクトル割付処理において、割り付けることができな力つた画素に関 しても、動き相関があることを利用して、その画素の周辺の動きベクトルの中から、評 価値 DFDに基づぐ最も信頼度がある、確からしい動きベクトルを得ることができる。 これにより、ベクトルが割り付けられず、 0ベクトルなどを割り付けておく場合よりも、ベ タトル割付の精度が向上し、後段の画像補間処理において生成される画像の不連続 性を抑制することができる。
[0746] また、上述した割付補償処理により動きベクトルが割り付けられた画素の割付フラグ を l(True)に書き換えるようにし、割付補償処理により割り付けられた動きベクトルも、 次の画素の補償候補ベクトルとして用いるようにしたので、オブジェクト内でほぼ同じ 動きをする画素には、ほぼ同一の動きベクトルが選択されるようになり、誤りの少ない 安定した動きベクトルを得ることができる。その結果、後段において生成される画像の ブロックノイズや粉状ノイズなどを抑制し、品質を向上させることができる。
[0747] なお、上記説明にお 、ては、ベクトル割付部 54にお 、て割り付けられな力つた画素 に対してベクトル補償処理を行っている力 ベクトル検出部 52において検出されなか つた(0ベクトルが検出された)画素など、何らかの処理において動きベクトルが求めら れな力つた画素に対してベクトル補償処理を行うようにしてもよい。また、さらに、検出 された動きベクトル、または、割り付けられた動きベクトルが確力 しくない (信頼度が 低 ヽ)とされる画素に対してベクトル補償処理を行うようにしてもょ ヽ。
[0748] また、上記説明にお 、ては、画素単位での割付補償処理を説明したが、所定のブ ロック単位でその周辺に位置する画素に割り付けられた動きベクトルのうちの確から しいものを、その所定のブロックの画素すべてに割り付けるようにしてもよい。なお、所 定のブロックにすでに動きベクトルが割り付けられている画素がある場合は、それ以 外の画素にだけ割り付けるようにしてもよ!、。
[0749] 次に、画像補間部 58の構成の詳細について説明する。
[0750] 図 78は、画像補間部 58の構成を示すブロック図である。図 78に構成を示す画像 補間部 58は、割付ベクトルメモリ 55の内挿フレームに割り付けられた動きベクトルと、 フレーム tおよびフレーム t+ 1の画素値を用いて、内挿フレームの画素値を補間生 成し、 60P信号の画像を出力する処理を行う。
[0751] 図 78の例において、時刻 tの画像のフレーム tは、空間フィルタ 92—1に入力され、 時刻 t+ 1の画像のフレーム t+ 1は、空間フィルタ 92— 2およびバッファ 95に入力さ れる。
[0752] 補間制御部 91は、割付ベクトルメモリ 55の内挿フレームの画素を選択し、選択した 画素に割り付けられている動きベクトルに基づいて、内挿フレーム上の画素と、 2枚の フレーム tおよびフレーム t+ 1の画素との位置関係(空間シフト量)をそれぞれ求める すなわち、補間制御部 91は、内挿フレームの画素を基準に、その動きベクトルで対 応付けられるフレーム t上の位置と、内挿フレームの画素に対応するフレーム t上の画 素の位置から、それらの空間シフト量を求め、求めた空間シフト量を空間フィルタ 92 —1に供給する。同様に、補間制御部 91は、内挿フレームの画素を基準に、その動 きベクトルで対応付けられるフレーム t+ 1上の位置と、内挿フレームの画素に対応す るフレーム t+ 1上の画素の位置から、それらの空間シフト量を求め、求めた空間シフ ト量を空間フィルタ 92— 2に供給する。
[0753] また、補間制御部 91は、予め設定されている内挿フレームの時間位相(時刻)に基 づいて、フレーム tとフレーム t+ 1の間における補間重みを求め、求めた補間重みを 、乗算器 93— 1および 93— 2に設定する。例えば、内挿フレームの時刻力 フレーム t+ 1の時刻 t+ 1から「k」離れた時刻で、かつ、フレーム tの時刻 tから「1 k」離れた 時刻である場合 (すなわち、内挿フレームが時刻 tと時刻 t+ 1を「1— k」:「k」に内分 する時刻に生成される場合)、補間制御部 91は、乗算器 93— 1に「1— k」の補間重 みを設定し、乗算器 93— 2に「k」の補間重みを設定する。
[0754] 空間フィルタ 92— 1および 92— 2は、例えば、キュービックフィルタなどにより構成さ れる。空間フィルタ 92— 1は、入力されるフレーム t上の画素の画素値と、補間制御 部 91から供給される空間シフト量に基づいて、内挿フレームの画素に対応する、フレ ーム t上の画素値を求め、求めた画素値を乗算器 93— 1に出力する。空間フィルタ 9 2— 2は、入力されるフレーム t+ 1上の画素の画素値と、補間制御部 91から供給され る空間シフト量に基づいて、内挿フレームの画素に対応する、フレーム t+ 1上の画 素値を求め、求めた画素値を乗算器 93— 2に出力する。
[0755] なお、内挿フレームの画素の位置力 フレーム tまたはフレーム t+ 1上の画素の位 置と一致しない場合(すなわち、内挿フレームの画素の位置力 フレーム tまたはフレ ーム t+ 1において画素以下成分である場合)、空間フィルタ 92— 1および 92— 2は、 フレーム tまたはフレーム t+ 1における内挿フレームの画素の位置の周辺 4画素の画 素値を用いて、周辺 4画素の距離の逆比の和を求めることにより、内挿フレームの画 素に対応するフレーム上の画素値を求める。すなわち、画素以下位置の画素値は、 図 72を参照して上述した周辺 4画素との距離を基にした線形補間で値が求められる
[0756] 乗算器 93— 1は、空間フィルタ 92— 1から入力されるフレーム t上の画素値に、補 間制御部 91により設定された補間重み「1—k」を乗算し、重み付けされた画素値を、 加算器 94に出力する。乗算器 93— 2は、空間フィルタ 92— 2から入力されるフレー ム t+ 1上の画素値に、補間制御部 91により設定された補間重み「k」を乗算し、重み 付けされた画素値を、加算器 94に出力する。
[0757] 加算器 94は、乗算器 93— 1から入力される画素値と、乗算器 93— 2から入力され る画素値を加算することにより、内挿フレームの画素の画素値を生成し、生成された 内挿フレームの画素値を、バッファ 95に出力する。バッファ 95は、入力されたフレー ム t+ 1をバッファしている。バッファ 95は、生成された内挿フレームを出力し、その次 に、予め設定されている 60Pフレームの時間位相(時刻)に基づいて、必要に応じて 、ノッファしているフレーム t+ 1を出力することにより、 60P信号の画像を、図示せぬ 後段に出力する。
[0758] 以上のように構成される画像補間部 58の画像補間処理の詳細を、図 79のフローチ ヤートを参照して説明する。
[0759] 補間制御部 91は、ステップ S901において、処理する内挿フレームの時間位相に 基づいて、フレーム tとフレーム t+ 1の間における内挿フレームの補間重み(例えば、 「k」および「1— k」)を求め、求められた補間重みを、乗算器 93— 1および 93— 2に それぞれ設定する。補間制御部 91は、ステップ S902において、割付ベクトルメモリ 5 5の内挿フレームの画素を選択する。なお、内挿フレーム上の画素は、フレームの左 上の画素力 ラスタスキャン順に選択される。
[0760] 補間制御部 91は、ステップ S903において、選択した画素に割り付けられている動 きベクトルに基づいて、内挿フレーム上の画素と、 2枚のフレーム tおよびフレーム t+ 1の画素との位置関係 (空間シフト量)をそれぞれ求め、求められた空間シフト量を、 それぞれ空間フィルタ 92— 1および 92— 2に供給する。具体的には、補間制御部 91 は、ステップ S903において、内挿フレームの画素を基準に、その動きベクトルで対応 付けられるフレーム t上の位置と、内挿フレームの画素に対応するフレーム t上の画素 の位置から、それらの空間シフト量を求め、求めた空間シフト量を空間フィルタ 92— 1 に供給する。同様に、補間制御部 91は、内挿フレームの画素を基準に、その動きべ タトルで対応付けられるフレーム t+ 1上の位置と、内挿フレームの画素に対応するフ レーム t+ 1上の画素の位置から、それらの空間シフト量を求め、求めた空間シフト量 を空間フィルタ 92— 2に供給する。
[0761] 時刻 tの画像のフレーム tの画素値は、空間フィルタ 92— 1に入力され、時刻 t+ 1 の画像のフレーム t+ 1の画素値は、空間フィルタ 92— 2に入力されている。ステップ S904において、空間フィルタ 92—1および 92— 2は、入力されるフレーム tおよび t + 1上の画素の画素値と、補間制御部 91から供給される空間シフト量に基づいて、 内挿フレームの画素に対応する、各フレーム上の画素値を求め、求めた画素値を乗 算器 93— 1および 93— 2にそれぞれ出力する。
[0762] 乗算器 93— 1および 93— 2は、ステップ S905において、空間フィルタ 92— 1また は 92— 2から入力される各フレーム上の画素値に、補間制御部 91により設定された 補間重みを重み付けし、重み付けされた画素値を、加算器 94に出力する。すなわち 、乗算器 93— 1は、空間フィルタ 92— 1から入力されるフレーム t上の画素値に、補 間制御部 91により設定された補間重み「1—k」を乗算し、重み付けされた画素値を、 加算器 94に出力する。乗算器 93— 2は、空間フィルタ 92— 2から入力されるフレー ム t+ 1上の画素値に、補間制御部 91により設定された補間重み「k」を乗算し、重み 付けされた画素値を、加算器 94に出力する。
[0763] 加算器 94は、ステップ S906において、乗算器 93— 1により重み付けされた画素値 と、乗算器 93— 2により重み付けされた画素値を加算することにより、内挿フレームの 画素の画素値を生成し、生成された画素値を、バッファ 95に出力する。補間制御部 91は、ステップ S907において、内挿フレーム上のすべての画素についての処理が 終了したか否かを判定する。ステップ S907において、内挿フレーム上のすべての画 素についての処理が終了していないと判定された場合、処理は、ステップ S902に戻 り、それ以降の処理が繰り返される。ステップ S907において、内挿フレーム上のすべ ての画素についての処理が終了したと判定された場合、画像補間処理は、終了され る。
[0764] 以上のように、内挿フレームに割り付けられた動きベクトルに基づいて、内挿フレー ムの画素値が生成されると、処理は、上述した図 16のステップ S85に戻り、ステップ S 86において、ノ ッファ 95により、内挿フレームが出力され、その次に、必要に応じて、 フレーム t+ 1が出力されることにより、 60P信号の画像力 後段に出力される。したが つて、内挿フレームの画素に、最も確力らしい動きベクトルが割り付くので、精度のよ Vヽ内挿フレームを生成することができる。
[0765] 本実施の形態においては、動きベクトルを選択する際の評価値として、差分絶対値 和である評価値 DFD、評価値 mDFD、および評価値 dfvを用いて説明した力 評価 値 DFD、評価値 mDFD、および評価値 dfvに限定されず、動きベクトルの信頼度を 評価するものであれば、他のものを用いるようにしてもょ 、。
[0766] また、本実施の形態にお!、ては、各処理を行うブロックを、例えば、 8画素 X 8画素 や 9画素 X 9画素などにより構成するようにして説明した力 これらは、一例であり、各 処理を行うブロックを構成する画素は、上記画素数に限定されな 、。
[0767] さらに、本実施の形態においては、 24P信号力も 60P信号への信号変換を例に、 説明を行ったが、本発明は、例えば、動画像のフレーム周波数変換として、インター レース信号や、他のフレームレート変換にも適用することができる。
[0768] 上述した一連の処理は、ハードウェアにより実行させることもできる力 ソフトウェア により実行させることもできる。一連の処理をソフトウェアにより実行させる場合には、 そのソフトウェアを構成するプログラム力 専用のハードウェアに組み込まれているコ ンピュータ、または、各種のプログラムをインストールすることで、各種の機能を実行 することが可能な、例えば汎用のパーソナルコンピュータなどに、プログラム格納媒 体からインストールされる。
[0769] コンピュータにインストールされ、コンピュータによって実行可能な状態とされるプロ グラムを格納するプログラム格納媒体は、図 1に示されるように、磁気ディスク 31 (フレ キシブルディスクを含む)、光ディスク 32 (CD- ROM(Compact Disc-Read Only Memo ry)、 DVD(Digital Versatile Disc)を含む)、光磁気ディスク 33 (MD(Mini- Disc) (商標) を含む)、もしくは半導体メモリ 34などよりなるリムーバブル記録媒体 (パッケージメデ ィァ)、または、プログラムが一時的もしくは永続的に格納される ROM12などにより構 成される。
なお、本明細書において、フローチャートに示されるステップは、記載された順序に 従って時系列的に行われる処理はもちろん、必ずしも時系列的に処理されなくとも、 並列的あるいは個別に実行される処理をも含むものである。

Claims

請求の範囲
[1] 動きベクトルを検出し、検出された動きベクトルに基づいて、画素値を生成する画像 処理装置において、
フレーム上の着目ブロックの動きベクトルを検出する過程にぉ 、て用いられる動き ベクトルの精度の信頼度を表す評価値を、対象となる動きベクトルの始点と終点をそ れぞれ含む 2フレームのブロックの輝度値から各ブロック内の輝度値の平均をそれぞ れ差し引いた値を用いて演算する評価値演算手段と、
前記評価値演算手段により演算された評価値を用いて、前記動きベクトルの精度 の信頼度を評価するベクトル評価手段と
を備える画像処理装置。
[2] 前記評価値演算手段は、
前記 2フレームのブロックのブロック間の輝度値差分の二乗和を演算する第 1の演 算手段と、
前記第 1の演算手段による演算と並列して、前記ブロック間の輝度値差分和の二乗 を演算する第 2の演算手段と
を備える請求項 1に記載の画像処理装置。
[3] 勾配法により着目ブロックの動きベクトルを求める勾配法演算手段をさらに備え、 前記評価値演算手段は、前記勾配法演算手段により求められる反復段階毎の動き ベクトルの評価値を演算し、
前記ベクトル評価手段は、前記評価値演算手段により演算された前記反復段階毎 の動きベクトルの評価値のうち、最も小さい評価値の動きベクトルを精度の信頼度が 高いと評価し、前記着目ブロックの動きベクトルとして後段に出力する
請求項 1に記載の画像処理装置。
[4] 前記フレーム上の着目ブロックの動きベクトルを検出するための勾配法の初期値と して用いられる初期ベクトルを選択する初期ベクトル選択手段をさらに備え、 前記評価値演算手段は、前記フレームの過去フレームにおいて検出された前記動 きベクトルの終点である終点ブロックと同じ位置にある前記フレーム上の着目ブロック を始点とした、前記動きベクトルと同じ大きさ、かつ、同じ向きの動きベクトルである前 記着目ブロックのシフト初期ベクトル、および、前記フレームまたは前記過去フレーム において検出された前記着目ブロックの所定の周辺ブロックの動きベクトルの評価値 を演算し、
前記ベクトル評価手段は、前記評価値演算手段により演算された前記着目ブロック のシフト初期ベクトル、および前記所定の周辺ブロックの動きベクトルの評価値のうち 、最も小さ!、評価値の動きベクトルを精度の信頼度が高!、と評価し、
前記初期ベクトル選択手段は、前記ベクトル評価手段により精度の信頼度が高いと 評価された動きベクトルを、前記着目ブロックの初期ベクトルとして選択する
請求項 1に記載の画像処理装置。
[5] 前記フレームの過去フレームにおいて検出された前記動きベクトルの終点である終 点ブロックと同じ位置にある前記フレーム上のブロックを始点とした、前記動きべタト ルと同じ大きさ、かつ、同じ向きの動きベクトルを、前記ブロックのシフト初期ベクトルと して設定するシフト初期ベクトル設定手段をさらに備え、
前記ベクトル評価手段は、前記過去フレームにおいて検出された前記動きベクトル の前記終点ブロックと同 f立置にある前記フレーム上の前記ブロックにおいて検出さ れた前記動きベクトルの評価値のうち、最も小さ!、評価値の動きベクトルを精度の信 頼度が高いと評価し、
前記シフト初期ベクトル設定手段は、前記ベクトル評価手段により精度の信頼度が 高いと評価された前記動きベクトルと同じ大きさ、かつ、同じ向きの動きベクトルを、前 記ブロックの前記シフト初期ベクトルとして選択する
請求項 3に記載の画像処理装置。
[6] 動きベクトルを検出し、検出された動きベクトルに基づいて、画素値を生成する画像 処理装置の画像処理方法にお!、て、
フレーム上の着目ブロックの動きベクトルを検出する過程にぉ 、て用いられる動き ベクトルの精度の信頼度を表す評価値を、対象となる動きベクトルの始点と終点をそ れぞれ含む 2フレームのブロックの輝度値から各ブロック内の輝度値の平均をそれぞ れ差し引いた値を用いて演算する評価値演算ステップと、
前記評価値演算ステップの処理により演算された評価値を用いて、前記動きべタト ルの精度の信頼度を評価するベクトル評価ステップと
を含む画像処理方法。
[7] 動きベクトルを検出し、検出された動きベクトルに基づいて、画素値を生成する処理 をコンピュータに行わせるプログラムであって、
フレーム上の着目ブロックの動きベクトルを検出する過程にぉ 、て用いられる動き ベクトルの精度の信頼度を表す評価値を、対象となる動きベクトルの始点と終点をそ れぞれ含む 2フレームのブロックの輝度値から各ブロック内の輝度値の平均をそれぞ れ差し引いた値を用いて演算する評価値演算ステップと、
前記評価値演算ステップの処理により演算された評価値を用いて、前記動きべタト ルの精度の信頼度を評価するベクトル評価ステップと
を含むプログラム。
[8] 請求項 7に記載のプログラムが記録されて 、る記録媒体。
PCT/JP2006/317448 2005-09-09 2006-09-04 画像処理装置および方法、プログラム、並びに記録媒体 WO2007029640A1 (ja)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN2006800418410A CN101305616B (zh) 2005-09-09 2006-09-04 图像处理装置和方法
US12/066,092 US20090167959A1 (en) 2005-09-09 2006-09-04 Image processing device and method, program, and recording medium

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2005261435A JP2007074592A (ja) 2005-09-09 2005-09-09 画像処理装置および方法、プログラム、並びに記録媒体
JP2005-261435 2005-09-09

Publications (1)

Publication Number Publication Date
WO2007029640A1 true WO2007029640A1 (ja) 2007-03-15

Family

ID=37835758

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2006/317448 WO2007029640A1 (ja) 2005-09-09 2006-09-04 画像処理装置および方法、プログラム、並びに記録媒体

Country Status (5)

Country Link
US (1) US20090167959A1 (ja)
JP (1) JP2007074592A (ja)
KR (1) KR20080053291A (ja)
CN (1) CN101305616B (ja)
WO (1) WO2007029640A1 (ja)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101930534A (zh) * 2009-06-25 2010-12-29 原相科技股份有限公司 用于人脸侦测的动态影像压缩方法
CN102300044A (zh) * 2010-06-22 2011-12-28 原相科技股份有限公司 处理图像的方法与图像处理模块

Families Citing this family (22)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7916141B2 (en) * 2006-04-10 2011-03-29 Choi Kum-Young Image processing system using vector pixel
JP4212109B2 (ja) * 2007-03-20 2009-01-21 パナソニック株式会社 撮影装置および撮影方法
JP2009207128A (ja) * 2008-01-29 2009-09-10 Sanyo Electric Co Ltd 表示装置及び表示方法
JP4813517B2 (ja) * 2008-05-29 2011-11-09 オリンパス株式会社 画像処理装置、画像処理プログラム、画像処理方法、および電子機器
US8443153B1 (en) 2010-01-06 2013-05-14 Netapp, Inc. Dynamic balancing of performance with block sharing in a storage system
JP5615136B2 (ja) * 2010-01-12 2014-10-29 三菱電機株式会社 立体画像補正方法、立体表示装置、および立体画像生成装置
US9124898B2 (en) * 2010-07-12 2015-09-01 Mediatek Inc. Method and apparatus of temporal motion vector prediction
JP5671957B2 (ja) * 2010-11-09 2015-02-18 ソニー株式会社 表示装置および表示方法
GB2487200A (en) * 2011-01-12 2012-07-18 Canon Kk Video encoding and decoding with improved error resilience
CN102812715B (zh) * 2011-01-27 2015-08-19 松下电器产业株式会社 三维图像摄影装置以及三维图像拍摄方法
US8732518B2 (en) 2011-04-13 2014-05-20 Netapp, Inc. Reliability based data allocation and recovery in a storage system
GB2491589B (en) 2011-06-06 2015-12-16 Canon Kk Method and device for encoding a sequence of images and method and device for decoding a sequence of image
CN103810695B (zh) * 2012-11-15 2017-03-22 浙江大华技术股份有限公司 一种光源定位方法及装置
CN103810696B (zh) * 2012-11-15 2017-03-22 浙江大华技术股份有限公司 一种目标对象图像检测方法及装置
US20150350671A1 (en) * 2013-01-04 2015-12-03 Samsung Electronics Co., Ltd. Motion compensation method and device for encoding and decoding scalable video
EP3054685A1 (en) * 2015-02-04 2016-08-10 Thomson Licensing Hierarchical motion estimation and video segmentation in presence of more than one moving object in a block
EP3096519A1 (en) * 2015-05-18 2016-11-23 Thomson Licensing A method for encoding/decoding a picture block
US10089089B2 (en) * 2015-06-03 2018-10-02 The Mathworks, Inc. Data type reassignment
US10198797B2 (en) * 2015-09-09 2019-02-05 Ichikawa Soft Laboratory Co., Ltd. Apparatus correcting shading without taking optical characteristics into consideration and method thereof
CN110324659B (zh) * 2018-03-29 2020-08-28 北京字节跳动网络技术有限公司 一种视频特征提取方法及装置
JP7488710B2 (ja) * 2020-07-21 2024-05-22 富士フイルムヘルスケア株式会社 超音波撮像装置
US20220022847A1 (en) * 2021-06-21 2022-01-27 Hitachi, Ltd. Ultrasound imaging apparatus

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS62206980A (ja) * 1986-03-07 1987-09-11 Kokusai Denshin Denwa Co Ltd <Kdd> 動画像の動き推定における初期偏位方式
JPH0478286A (ja) * 1990-07-18 1992-03-12 Oki Electric Ind Co Ltd 初期偏位ベクトルを用いた動きベクトルの検出方法
JPH05233814A (ja) * 1992-02-20 1993-09-10 N T T Data Tsushin Kk 移動ベクトル抽出方法
JPH0865684A (ja) * 1994-08-22 1996-03-08 Graphics Commun Lab:Kk 動画像の動ベクトル検出方法と装置
JPH08149472A (ja) * 1994-11-17 1996-06-07 Graphics Commun Lab:Kk 動きベクトル探索方法および装置
JPH08149482A (ja) * 1994-11-18 1996-06-07 Victor Co Of Japan Ltd 動きベクトル検出回路
JPH09219865A (ja) * 1996-02-09 1997-08-19 Matsushita Electric Ind Co Ltd 映像符号化装置
JP2002112274A (ja) * 2000-10-03 2002-04-12 Nippon Telegr & Teleph Corp <Ntt> 処理時間適応画像符号化方法およびそのプログラムの記録媒体
JP2003070001A (ja) * 2001-08-27 2003-03-07 Mitsubishi Electric Corp 動画像符号化装置
JP2003230150A (ja) * 2002-02-06 2003-08-15 Nippon Telegr & Teleph Corp <Ntt> 動画像符号化方法、この方法のプログラム、このプログラムを記録した記録媒体

Family Cites Families (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
FR2624682B2 (fr) * 1987-03-23 1990-03-30 Thomson Csf Procede et dispositif d'estimation de mouvement dans une sequence d'images animees
US6197819B1 (en) * 1990-11-27 2001-03-06 Northwestern University Gamma amino butyric acid analogs and optical isomers
JP3078140B2 (ja) * 1993-01-20 2000-08-21 沖電気工業株式会社 動きベクトル検出回路
US6320906B1 (en) * 1996-05-21 2001-11-20 Matsushita Electric Industrial Co., Ltd. Motion vector detecting circuit
EP1438839A1 (en) * 2001-10-08 2004-07-21 Koninklijke Philips Electronics N.V. Device and method for motion estimation
KR100490730B1 (ko) * 2002-10-22 2005-05-24 한국전자통신연구원 비디오 영상 압축 시스템에서의 적응적 패턴을 이용한움직임 예측 장치 및 방법
JP3715283B2 (ja) * 2003-02-04 2005-11-09 株式会社半導体理工学研究センター 動画像の画像圧縮符号化方法及び装置
KR101118981B1 (ko) * 2004-04-09 2012-03-13 소니 주식회사 화상 처리 장치 및 방법, 기록 매체, 및 프로그램
CN1947152A (zh) * 2004-04-09 2007-04-11 索尼株式会社 图像处理方法和设备、记录介质、及程序
TWI252695B (en) * 2004-07-21 2006-04-01 Realtek Semiconductor Corp Block-based motion estimation method
JP2006254349A (ja) * 2005-03-14 2006-09-21 Toshiba Corp 動きベクトル検出方法、動きベクトル検出装置およびコンピュータ上で動きベクトル検出処理を実行するコンピュータプログラム

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS62206980A (ja) * 1986-03-07 1987-09-11 Kokusai Denshin Denwa Co Ltd <Kdd> 動画像の動き推定における初期偏位方式
JPH0478286A (ja) * 1990-07-18 1992-03-12 Oki Electric Ind Co Ltd 初期偏位ベクトルを用いた動きベクトルの検出方法
JPH05233814A (ja) * 1992-02-20 1993-09-10 N T T Data Tsushin Kk 移動ベクトル抽出方法
JPH0865684A (ja) * 1994-08-22 1996-03-08 Graphics Commun Lab:Kk 動画像の動ベクトル検出方法と装置
JPH08149472A (ja) * 1994-11-17 1996-06-07 Graphics Commun Lab:Kk 動きベクトル探索方法および装置
JPH08149482A (ja) * 1994-11-18 1996-06-07 Victor Co Of Japan Ltd 動きベクトル検出回路
JPH09219865A (ja) * 1996-02-09 1997-08-19 Matsushita Electric Ind Co Ltd 映像符号化装置
JP2002112274A (ja) * 2000-10-03 2002-04-12 Nippon Telegr & Teleph Corp <Ntt> 処理時間適応画像符号化方法およびそのプログラムの記録媒体
JP2003070001A (ja) * 2001-08-27 2003-03-07 Mitsubishi Electric Corp 動画像符号化装置
JP2003230150A (ja) * 2002-02-06 2003-08-15 Nippon Telegr & Teleph Corp <Ntt> 動画像符号化方法、この方法のプログラム、このプログラムを記録した記録媒体

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101930534A (zh) * 2009-06-25 2010-12-29 原相科技股份有限公司 用于人脸侦测的动态影像压缩方法
CN101930534B (zh) * 2009-06-25 2014-04-16 原相科技股份有限公司 用于人脸检测的动态图像压缩方法
CN102300044A (zh) * 2010-06-22 2011-12-28 原相科技股份有限公司 处理图像的方法与图像处理模块
CN102300044B (zh) * 2010-06-22 2013-05-08 原相科技股份有限公司 处理图像的方法与图像处理模块

Also Published As

Publication number Publication date
JP2007074592A (ja) 2007-03-22
CN101305616B (zh) 2010-09-29
KR20080053291A (ko) 2008-06-12
US20090167959A1 (en) 2009-07-02
CN101305616A (zh) 2008-11-12

Similar Documents

Publication Publication Date Title
WO2007029640A1 (ja) 画像処理装置および方法、プログラム、並びに記録媒体
JP4752407B2 (ja) 画像処理装置および方法、プログラム、並びに記録媒体
CN100555330C (zh) 图像处理设备和方法、记录介质和程序
JP4687994B2 (ja) 画像処理装置および方法、記録媒体、並びにプログラム
EP1587032B1 (en) Image processing apparatus and method, recording medium, and program
JP4692846B2 (ja) 画像処理装置および方法、記録媒体、並びにプログラム
JP5777311B2 (ja) 低解像度ビデオから高解像度ビデオを生成する方法
JP4622264B2 (ja) 動きベクトル検出装置、および動きベクトル検出方法、並びにコンピュータ・プログラム
JP4835075B2 (ja) 画像処理装置および方法、プログラム、並びに記録媒体
JP4655214B2 (ja) 画像処理装置および方法、プログラム並びに記録媒体
JP4655217B2 (ja) 画像処理装置および方法、記録媒体、並びにプログラム
JP4512984B2 (ja) 画像処理装置および方法、記録媒体、並びにプログラム
JP4512982B2 (ja) 画像処理装置および方法、記録媒体、並びにプログラム
JP4655216B2 (ja) 画像処理装置および方法、並びにプログラム
JP4512985B2 (ja) 画像処理装置および方法、記録媒体、並びにプログラム
JPH11146401A (ja) 動画像信号の動きベクトル検出方法および動きベクトル検出回路
JP2007074586A (ja) 画像処理装置および方法、プログラム、並びに記録媒体

Legal Events

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

Ref document number: 200680041841.0

Country of ref document: CN

121 Ep: the epo has been informed by wipo that ep was designated in this application
WWE Wipo information: entry into national phase

Ref document number: 12066092

Country of ref document: US

Ref document number: 1020087005675

Country of ref document: KR

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 06797373

Country of ref document: EP

Kind code of ref document: A1