CN1274146C - Sports image detecting method - Google Patents

Sports image detecting method Download PDF

Info

Publication number
CN1274146C
CN1274146C CN 02131392 CN02131392A CN1274146C CN 1274146 C CN1274146 C CN 1274146C CN 02131392 CN02131392 CN 02131392 CN 02131392 A CN02131392 A CN 02131392A CN 1274146 C CN1274146 C CN 1274146C
Authority
CN
Grant status
Grant
Patent type
Prior art keywords
image
blit
pointer
block
frame
Prior art date
Application number
CN 02131392
Other languages
Chinese (zh)
Other versions
CN1489112A (en )
Inventor
俞青
卢波
赵鑫
李铁夫
华楠
Original Assignee
北京中星微电子有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Grant date

Links

Abstract

本发明公开了一种对运动图像进行检测的方法,其在背景不变的前提下,对运动影像文件中的运动图像进行识别与跟踪:程序对指定的运动影像文件进行处理,并生成目标文件;然后在所生成的目标文件中,将上述运动影像文件图像中所有运动部分的外缘表示出来,并且被外缘圈定的部分随着图像的移动而相应移动。 The present invention discloses a method of detecting a moving image, which in the context of the same premise, moving image motion video file identification and tracking: procedures specified in the motion video file for processing, and generate an object file ; then the generated object file, all moving parts of the outer periphery of the moving image of the document image represented, and the outer edge of the circled portion with the movement of the corresponding moving image. 本发明的优点在于:本发明直接通过微机进行运动检测分析,不需要对图像进行分离,不需要人参与检测。 Advantage of the present invention is that: the present invention is performed by the microcomputer directly detecting motion analysis, the image does not need to be isolated, detected no human participation. 本发明对目标运动轮廓的勾勒更加清晰,可直观的显示出目标运动轨迹,更方便于对运动参数的检测。 The present invention is more clearly to outline the contours of the target motion, can directly display the target trajectory is more convenient for detection of motion parameters. 将运动检测在软件中进行实现,可移植性强。 The motion detection is implemented in software, portability.

Description

运动图像检测方法 Detection method for moving image

技术领域 FIELD

本发明涉及运动检测方法,特别涉及一种对运动图像进行检测的方法,在背景不变的情况下,获得运动物体的边缘轮廓以显示待测目标的运动。 The present invention relates to a motion detection method, particularly to a method of detecting a moving image, in the case of the same background, the edge profile is obtained moving object to display a moving target to be measured.

背景技术 Background technique

一组运动图像的变化其实质对应于一帧画面中某个/些具体部分的亮度变化。 A set change of the moving image which substantially correspond to a change in luminance of a picture / these specific portions. 将每个像素的亮度值变化与阈值相比较,就可以判断其静动状态,进而勾画出它的运动边缘轮廓。 The change in luminance value of each pixel is compared with a threshold value, it can be determined that static and dynamic state, and then lays out its movement edge contour.

目前已经提出了很多关于运动检测和分析的方法:中国专利CN 91111320.7用运动目标的图像来分析运动特性。 Many methods on motion detection and analysis have been proposed: Chinese patent CN 91111320.7 image moving target to analyze the motion characteristics. 它对运动目标的一组连续图像,在每一帧图像到来时,用比较灰度的方法记录这帧图像上运动目标所在位置的灰度值,从而形成灰度轨迹图。 A group of successive images of moving objects it, when the arrival of each frame, comparing with a method of recording gray tone value of the target movement position where this frame image, thereby forming a gradation trajectories. 在记录这帧图像上目标所在位置的灰度值的同时,将另一帧图中对应目标位置的像素值写为该帧编号,从而形成带帧号的轨迹图。 While the value of the pixel gray scale value where the position of the target, another frame picture corresponding to a target position in the recording frame image write this number for the frame to form a track with a frame number in FIG. 然后将灰度轨迹图或带帧号轨迹图通过接口电路输入计算机进行分析。 Then the gray or with the frame number of trajectories trajectories analyzed by computer input interface circuit.

现在已经有多种保安系统,运用对运动图像进行分析的方法来录取进入保护区的人员图像,用来对保护区进行监视。 There are already a variety of security systems, the use of moving image analysis methods to admissions personnel access to protected areas of the image, is used to monitor protected areas. 中国专利申请文件CN 96193009.8中提出了将一系列分离的景致画面的数字图像数据存入存储器,进而对画面中的目标的运动进行检测,以达到保护监视的目的。 Chinese patent application CN 96193009.8 proposes a series of discrete digital image data stored in the memory of a screen view, and thus moving picture of a target is detected, in order to achieve the purpose of protecting the monitor. 通常这些系统很昂贵,而且需要很多现场检查人员。 Often these systems are expensive and require a lot of on-site inspectors.

又如中国专利申请文件CN 95113626.7。 Another example is the Chinese patent application CN 95113626.7. 它是一种测量技术领域的基于图像识别的运动物体测量方法,它所提供的测量方法,是由同步时钟指挥对被测运动物体打标记的同时摄取图像,然后识别标记并计算出标记特征点的坐标,再计算出被测物体运动轨迹、沿轨迹的长度和当前的运动速度等参数。 It is a measure of the art method of measuring the moving object based on image recognition, it provides measurements are conducted by the synchronous clock for marking a moving object measured simultaneously captured images, then the marker identification mark and the feature point is calculated It coordinates, and then to calculate the trajectory of the object, and a length along the trajectory parameters of the current movement speed.

然而这些发明更偏向于通过运动检测来提取自己所需的参数,针对性强,但是在图像的处理上,可观测性差,尤其是应用于图像监测方面,其直观性和可操作性显然还需进一步完善。 However, these more inclined to the invention to extract the required parameters themselves through motion detection, targeted, but on the processing of the image, poor observability, in particular applied to the image monitoring, intuitive operability and obviously need further improvement.

本发明的目的在于提供这样一种运动检测方法,其在背景不变的前提下,对运动影像文件中的运动图像进行识别与跟踪:程序对指定的运动影像文件进行处理,并生成目标文件。 Object of the present invention is to provide a motion detection method, which in the context of the same premise, moving image motion video file identification and tracking: procedures specified in the motion video file for processing, and generate an object file. 然后在所生成的目标文件中,将上述运动影像文件图像中所有运动部分的外缘表示出来,并且被外缘圈定的部分随着图像的移动而相应移动。 Then the generated object file, all moving parts of the outer periphery of the moving image of the document image represented, and the outer edge of the circled portion with the movement of the corresponding moving image.

发明内容 SUMMARY

本发明提出的目的通过以下方案来实现:一种运动图像检测方法,从一组运动图像中顺次连续提取两帧静态图像,来依次判断该两帧图像的差异;其中判断差异采取采用了这样的方法:将每帧图像分解为若干个BLIT*BLIT(像素)的小块,将每个BLIT块中所有像素G值进行累加,并在累加完毕后求平均值,然后计算两帧图像对应BLIT块G值平均值的差,若该差值大于设定的阈值则将该有差异的BLIT块的外缘表示出来,进而将运动区域最外面的边缘显示出来。 The object of the present invention proposed to achieve the following solutions: A method for detecting image motion, sequentially extracted two consecutive still images from a set of motion images, sequentially determines the difference between the two images; wherein determining such differences taken using method: each frame image is decomposed into a number of BLIT * BLIT (pixels) small, the value of each of all the pixels G BLIT block accumulates and averages the accumulated after completion, and then calculate the two image corresponding BLIT difference block average G value, if the difference is greater than the threshold value is set to the outer edge of the block BLIT differentially represented, in turn outermost edge region of the motion is displayed.

所述将运动区域最外面的边缘显示出来采用了这样的方法:让相邻BLIT块相互重叠一个像素,并对差值大于设定阈值的BLIT块的外缘像素进行反色处理。 The outermost edge of the moving area is displayed using this method: Let the outer edge of the adjacent pixels overlap each other BLIT a pixel block, and the difference is greater than the set threshold BLIT block inverse color processing.

所述BLIT块中参与G值累加的像素的选取原则为:将BLIT块按从下至上,从右至左的反向顺序,且像素行列值从0到BLIT-1来进行处理。 BLIT the block selection principle involved in the G value of the pixel is accumulated to: BLIT press block from the bottom, from right to left in reverse order, and the pixel value of the ranks from 0 to BLIT-1 for processing.

所述顺次连续提取两帧静态图像是这样来实现的:从运动图像文件中连续提取静态图像,先将第1帧图像读到指针fp1所指的内存区域,将下一帧图像读到指针fp2所指向的内存区域,对两帧图像进行比较;然后将指针fp1指向的内存区域的数据写到目标文件中相应的位置,接着交换fp1、fp2两指针的值,完成一次循环;下一次循环将新一帧图像读入fp2指向的内存区域。 Sequentially extracting the two consecutive still images is achieved: extracting a still image from a continuous moving image file, the first frame image read pointer fp1 referred memory area, the read pointer to the next frame fp2 the memory pointed region of two images are compared; fp1 and the data pointer points to the memory area is written in a position corresponding to the target file, then the exchange value fp1, fp2 two pointers, one circulation; next iteration a new point fp2 image reading memory area.

与现有技术相比,本发明的优点在于:1.本发明直接通过微机进行运动检测分析,不需要对图像进行分离,不需要人参与检测。 Compared with the prior art, advantages of the present invention is that: 1. The present invention directly by computer analysis of the motion detection, the image does not need to be isolated, detected no human participation.

2.本发明对目标运动轮廓的勾勒更加清晰,可直观的显示出目标运动轨迹,更方便于对运动参数的检测。 2. The present invention is more clearly to outline the contour of the target motion, can directly display the target trajectory is more convenient for detection of motion parameters.

3.将运动检测在软件中进行实现,可移植性强。 3. The motion detection is implemented in software, portability. 对任何一个图像文件都可以将其运动轨迹勾画出来。 For any image file can be sketched out its trajectory. 本程序是一个很基本的程序模块,可以为进行实时监控、作为安全装置、进行静动力检测等方面的应用奠定基础。 This program is a very basic program modules, which can be monitored in real time, as a safety device, perform application of static and dynamic testing and other foundation.

附图说明 BRIEF DESCRIPTION

下面结合附图和并非特定的实施例来对本发明作更详尽的说明。 Drawings and specific embodiments are not to be described in more detail below in conjunction with the present invention.

图1是24bits未压缩BMP图像的存储结构。 FIG 1 is a storage structure 24bits uncompressed BMP images.

图2是未压缩AVI文件视频数据的存储结构。 FIG 2 is not stored in the AVI file structure of video data compression.

图3是使用“重叠边缘反色”法的前后对比。 FIG 3 is used "in reverse color overlapping edge" method before and after comparison.

图4是本发明所述方法的程序流程图。 FIG 4 is a flowchart showing the procedure of the method of the present invention.

具体实施例下面将以AVI影像文件为例来对本发明作出更详细的说明。 DETAILED EXAMPLE The following embodiment will AVI video file, for example to make a more detailed description of the present invention.

对于24bits的非压缩BMP文件,其文件头和图像头中的相关参数见表1(只列出与本程序相关的参数和结构);图像像素的存储结构见附图1(设图像尺寸为M*N,单位:像素)。 For 24bits uncompressed BMP file having a header and an image header parameters in Table 1 (listed only relevant parameters and structure of the Program); image pixel memory structure see Figure 1 (set image size is M * N, unit: pixels).

表1 文件头和图像头中的相关参数图像像素的存储遵从由左至右、由下至上的原则。 Table compliance from left to right, from the bottom of the file header and the principle of a storage-related parameters of the image pixel in the image head. 譬如,对于一个24bits的BMP图像来说,左下角的像素存在文件数据区的最前面,而右上角的的像素存在文件最后面。 For example, for a BMP image of 24bits, the front lower left corner of the pixel present file data area, and the pixel of file rearmost upper-right corner. 每一个像素占据3个字节,依次存放其B、G、R通道值,从0至255。 Each pixel occupies 3 bytes, which are sequentially store B, G, R channel values, from 0 to 255. 这三个通道分别代表蓝、绿、红光学三原色,它们的值表示其各自的光强,其中0为无光、255为光强最大。 These three channels represent the blue, green and red optical primary colors whose values ​​represent their respective light intensity, where 0 is no light, 255 is the maximum light intensity. 因此(0,0,0)代表纯黑色,(255,255,255)代表纯白色。 So (0,0,0) on behalf of pure black (255,255,255) represents the pure white. 为方便文件存储,BMP文件中规定图像每一行像素占据4的整数倍个字节。 For the convenience store files, BMP files occupy predetermined image for each pixel row of an integer multiple of 4 bytes. 不足部分需在末尾补0。 Need to fill the shortage at the end of 0. 例如有一个24bitsBMP图像宽度为6个像素,则应该在其每一行第六个像素的R值后补两个0。 For example, a width of 6 24bitsBMP image pixels, should fill each of its two 0 after the sixth row of pixels R value. (20-3*6=2)而对于仅存在视频流的非压缩24bits AVI文件,其文件结构文件头的相关参数见表2(只列出与本程序相关的参数和结构)。 (6 = 2 * 20-3) exists only for the video stream and non-compressed 24bits AVI file, its file structure parameters in Table 2 header (only lists the parameters related to the structure of the Program).

表2 文件头和图像头中的相关参数AVI文件的存储结构(见图2)和BMP文件一样,AVI文件也包括了主头标,它定义了有关此文件的一般信息,比如文件中的流块数,AVI序列的宽、高度,总数据帧数等等。 Table 2 header file structure and parameters stored in the AVI file header image (see FIG. 2) and as BMP files, AVI files also include a main header, which defines the general information about the file, such as file stream blocks, AVI sequences width, height, and so the total number of data frames. 主头标后紧跟着一个或多个流头块和流格式块,它们包含了文件有关流的信息。 After the main header followed by one or more flow stream format header blocks and the block, which contains information about the file stream. 例如说明了流的数据类型(视频或音频)、压缩特性、演示特性,流中的数据格式等等。 For example illustrates the data stream type (video or audio), compression characteristics, presentation characteristics, like the stream data format. 紧接着存放的是实际的数据块。 Followed by the actual data is stored in blocks. 其中音频数据用“##wb”标识(“##”为流标识符),视频数据(压缩)用“##dc”标识,视频数据(未压缩)用“##db”标识(如图2)。 Wherein the audio data "## WB" identifier ( "##" as a stream identifier), video data (compressed) by "DC ##" identification, the video data (uncompressed) with "## DB" identity (FIG. 2). 此外还有索引块等其他可选块,不过它们和本程序关系不大,故不做详细介绍。 There are also optional index blocks and other blocks, but they are not and this program, and would therefore not described in detail.

对AVI动态影像文件的识别与跟踪最终要归结到对两幅静态图像的处理上来。 AVI movie file for identification and tracking ultimately comes down to two processing still images up. 程序变量、指针说明见表3。 Program variables, pointers are described in Table 3.

表3 程序变量、指针表参照附图4本发明所述方法的程序流程图可对本发明实施例作更清楚的了解。 Table 3 program variables, pointer table may flowchart embodiment of the present invention will be clearer understanding of the invention with reference to the accompanying drawings procedure of Method 4. 对AVI文件的处理通过了一种下面所述的方法来实现,本发明暂称之为“顺次取帧”法。 Processing of the AVI file is achieved by a method described below, the present invention is temporarily called "framing sequential" method. 所述“顺次取帧”法就是从AVI文件中连续提取静态图像的方法。 The "framing sequential" method is a method still image is continuously extracted from the AVI file. 简而言之,就是先将第1帧图像读到fp1所指的内存区域,将下一帧图像读到fp2所指向的内存区域,对两帧图像进行比较。 In short, the first frame image is read into memory area fp1 referred to in the next frame image to read the memory area pointed fp2, comparison of two images. 将fp1指向的内存区域的数据写到目标文件中相应的位置。 The data point fp1 memory region is written in a position corresponding to the target file. 接着交换fp1、fp2两指针的值,完成一次循环。 Then exchange values ​​fp1, fp2 two pointers, one circulation. 下一次循环将新一帧图像读入fp2指向的内存区域。 The next cycle a new point fp2 image reading memory area. 由于fp1、fp2已提前交换,相当于将上上帧图像覆盖。 Since fp1, fp2 has been exchanged in advance, it corresponds to the upper cover frame image. 这样,顺次将静态图像进行比较。 In this way, sequential static images are compared.

在读入每帧图像前通过loc=2056+(bmpbytes+8)*k语句对其定位,其中k=0、1、2...,为即将处理的帧序列号。 Before each image read by loc = 2056 + (bmpbytes + 8) * k their positioning statement, where k = 0,1,2 ..., to be processed as the frame sequence number. 将一帧图像读入内存是(以读入fp1指向的内存区域为例)通过语句fread(fp1,bmpbytes,1,file1)实现的。 The one-frame image is read into memory (fp1 to read in the memory region pointed to as an example) is achieved by means of the statement fread (fp1, bmpbytes, 1, file1). 交换内存指针的语句为fp2=fp1s-1和fp1=fp2s-1。 Statement of the exchange memory pointer fp2 = fp1s-1 and fp1 = fp2s-1.

然后本发明通过“块平均值”法来判断相邻两帧图像的差异,其也是本程序的核心算法。 The present invention, then the difference between two images is determined by the adjacent "block mean value" method, which is the core algorithm of the present program. 简单的说是将每帧图像分解为若干个BLIT*BLIT(像素)的小块,并计算每个BLIT块中所有像素G值的平均值。 Simply put, each frame image is decomposed into a number BLIT BLIT * (pixel) pieces, and calculates the average of the pixel values ​​G BLIT each block. 然后求两帧图像对应BLIT块G值平均值的差。 BLIT difference between the mean value of the block G and then find two images correspond. 如果它大于设定的阈值CON,则将此BLIT块的外缘圈定。 If it is greater than the set threshold value CON, the outer edge of this BLIT block delineation. 其中,阈值的选择是很重要的,通常阈值是固定的,本发明针对不同的背景,不同的运动图像,阈值的设定是有针对性的。 Wherein the selected threshold is important, usually a fixed threshold, the present invention is directed to a different background, different from the moving image, a threshold value is targeted. 要恰当的判断各帧之间的运动,就要适当选取阈值。 To properly determined motion between frames, it is necessary to select an appropriate threshold value. 如果判定系数小,则许多静止图像间被判定为运动图像,如果判定系数太大,将难以准确区分目标的运动。 If it is determined coefficient is small, it is judged to be a lot of moving images between a still image, if the coefficient of determination is too large, it will be difficult to accurately distinguish target movement. 待所有需圈定的BLIT块外缘被圈定后,将内存中的数据写到目标文件中相应的位置。 After all the required delineation of the outer edge BLIT circled after the memory data is written in a position corresponding to the target file.

其中所述将有差异的BLIT块的外缘圈定处理,本发明采用了一种新颖的方法来实现,此处暂称之为“重叠边缘反色”法。 Wherein the outer edge of the BLIT difference block delineation process, the present invention employs a novel approach to achieve, temporarily called herein "anti-color overlapping edge" method. 所谓的“重叠边缘反色”法通过下文进行说明。 So-called "anti-color overlapping edge" method will be described hereinafter.

针对对每个BLIT块的外边缘着色,存在以下两个问题:一是应该用什么颜色着色? For coloring the outer edge of each BLIT block, there are two questions: First, what color tint should? 如果用一固定颜色,此颜色必定会和某些图像某些区域的颜色相近,与原图很难区分;二是在相临几个BLIT块均存在差异的情况下,外边缘着色很容易形成“栅格效应”(见图3)。 If a fixed color, the color and the color of certain bound to certain areas of the image similar to the original is difficult to distinguish; in the case of two adjacent blocks have several BLIT there is a difference, very easy to form the outer edges of the colored "grid effect" (see Figure 3). 然而我们只是想描绘出运动物体的外边缘,并不想在它们上面画格子。 However, we just wanted to depict the outer edges of moving objects, I do not want to draw a grid on them. “重叠边缘反色”法简单说就是让相邻BLIT块相互重叠一个像素。 "Overlapping edge anti-color" approach simply is to make BLIT adjacent blocks overlap one pixel each other. 因为外边缘着色也是一个像素,这样如果相邻BLIT块都进行外边缘着色的话,重叠区域将被着色两次或四次。 Because the outer edges of a pixel is colored, so that if the neighboring blocks are BLIT be colored, then the outer edges of the overlap area will be colored two or four. 试想如果将“着色”改为“反色”,经过两次(或四次)反色颜色还原,栅格会消失。 Imagine if the "colored" to "anti-color" after two (or four) anti-color color reduction, the grid will disappear. 对于运动物体的外缘,只进行一次反色,故在这个外缘有一个像素宽度的像素组被反色,无论图像如何,均能形成最大的反差。 For the outer edge of the moving object, only one anti-color, so that the outer edge of the pixel width of a pixel group is anti-color, regardless of the image, the maximum contrast can be formed. 而且,实践中可以发现,BLIT块重叠的角部会被反色四次,这正好形成了“虚线边缘”的理想效果。 Moreover, in practice can be found, BLIT corner portion of overlapping blocks are four anti-color, which formed just a "line edge" desired effect. 于是,采用“重叠边缘反色”法将运动区域最外面的边缘显示出来。 Thus, the use of "anti-color overlapping edge" method displayed outermost edge of the moving region. 在判断了两帧图像的某个对应BLIT块存在差异后,通过“重叠边缘反色”法可以对这种差异进行标记,并最后输出到文件。 After the determination of a block corresponding to BLIT two images are different, this method can be marked by difference "anti-color overlapping edges", and finally output to a file.

例如要处理一个160*120的AVI文件,假设BLIT值设为10。 AVI file to be processed, for example, a 160 * 120, BLIT value of 10 is assumed. 那么每行分为160/10=16块,每列分为120/10=12块。 Then each row is divided into 160/10 = 16, each row is divided into 120/10 = 12. 将16*12=192个BLIT块编号(blitnum=0--191),依次对其处理。 16 * 12 = 192 BLIT block number (blitnum = 0--191), the processing sequence thereof.

先求每一个BLIT块的行列坐标值:blity=width/BLIT-fmod(blitnum,width/BLIT)-1;blitx=height/BLIT-(blitnum-blity)/(width/BLIT)-1;再计算此块第一个G值在内存中的偏置(以fp1为例):fp1=fp1s+(blitx*BLIT)*(4*(int)(3*width/4.0-0.1)+4)+blity*BLIT*3;之后将此块每个像素的G值进行累加,通过累加变量s1、s2。 BLIT seeking a first block of each row and column coordinates value: blity = width / BLIT-fmod (blitnum, width / BLIT) -1; blitx = height / BLIT- (blitnum-blity) / (width / BLIT) -1; recalculation this offset value G in the first block of memory (as an example in fp1): fp1 = fp1s + (blitx * BLIT) * (4 * (int) (3 * width / 4.0-0.1) +4) + blity * BLIT * 3; G value after each pixel of this block is accumulated by accumulating variables s1, s2. 在所有像素值累加完毕后求平均值:s1=s1/(double)(BLIT*BLIT);s2=s2/(double)(BLIT*BLIT);如果此时s1、s2差值的绝对值大于预设阈值CON,则用“重叠边缘反色”法将此BLIT块的外缘圈定。 After completion of all pixel values ​​of the cumulative averaging: s1 = s1 / (double) (BLIT * BLIT); s2 = s2 / (double) (BLIT * BLIT); In this case, if the absolute value of s1, s2 greater than a predetermined difference thresholding CON, with the "anti-color overlapping edge" method of this outer edge BLIT block delineation. 后将s1、s2清0,blitnum加1,进行下一个BLIT块的操作。 After s1, s2 clear 0, blitnum plus 1, the next block BLIT operation.

用分块平均的方法,可以找到有差异的块。 The method for block averaging, the difference can be found in the block. 但是像素究竟是从(i1,j1)移到(i2,j2)还是从(i2,j2)移到(i1,j1)却无法判断。 But what is the pixel (i1, j1) move (i2, j2) or from (i2, j2) move (i1, j1) can not judge. 事实上由于“壁纸效应”的存在,仅通过两帧静态图像是根本不可能对其判断的。 In fact due to "wallpaper" effect by merely two still images it is simply impossible for its judgment. (“壁纸效应”就是仅通过两帧静态图像无法判断(i1,j1)和(i2,j2)谁是壁纸谁是物的效应。)然而,由于前面提过的“顺次取帧”法可以从根本上减弱“壁纸效应”的影响。 ( "Wallpaper effect" is only by two still images can not be determined (i1, j1) and (i2, j2) who is who effectors wallpaper.) However, as mentioned earlier, "sequentially framing" process may weaken the influence of "wallpaper effect" fundamentally.

如果将某个BLIT块中的所有像素全进行累加,即像素行列值(在BLIT块中的)均从0到BLIT。 If all the pixels in a block BLIT full accumulated, i.e., pixel values ​​of the ranks (BLIT in the block) are from 0 to BLIT. 发现如果这样则在最后会多出一行一列(多出一列的影响不大),超出内存区域,造成比较错误;如果令像素行列值均从0到BLIT-1,但若前一个BLIT块已做完比较,fp1指向的内存区域数据变了,行(或列)值为0的像素已进行了反色,这样比较会发生差错;如果像素行列值均从1到BLIT-1,当BLIT为1时会出错;BLIT不为1但很小时会出现很大误差,也不可取。 Found that if this is the last will be more than one line one (extra little effect on one's), out of memory area, resulting in relatively error; if so pixel row values ​​are from 0 to BLIT-1, but if the previous BLIT block has been done After comparison, the data memory area pointed fp1 changed, the row (or column) of the pixel value of 0 have been reverse color, this is more an error occurs; if the pixel values ​​are from 1 to row BLIT-1, when 1 BLIT it is wrong; BLIT is not a very small but significant errors occur, nor desirable. 所以,BLIT块中参与G值累加的像素的选取原则是这样的:将BLIT块按从下至上,从右至左的反向顺序处理,且像素行列值从0到BLIT-1,可以很好地解决以上问题。 Therefore, the block selection principle involved BLIT accumulated value of the pixel G is this: the press from the bottom, from right to left in reverse order BLIT processing block, and the pixel value of the ranks from 0 to BLIT-1, can be well to solve the above problem.

本发明所述的对运动图像进行检测的方法,不仅仅限于说明书和实施方式中所列运用,它完全可以被适用于各种适合本发明之领域,对于熟悉本领域的人员而言可容易地实现另外的优点和进行修改,因此在不背离权利要求及等同范围所限定的一般概念的精神和范围的情况下,本发明并不限于特定的细节、代表性的设备和这里示出与描述的图示示例。 The method of detecting a moving image according to the present invention, use is not limited to the description set forth and described embodiments, which can be applied to various fields suitable for the present invention, for the person skilled in the art can readily achieve further advantages and modifications, and therefore without departing from the spirit and scope of the general concept of the claims and equivalents as defined by the scope of the present invention is not limited to the specific details, representative devices shown and described herein and in illustrated example.

Claims (7)

  1. 1.一种运动图像检测方法,对一组连续图像进行比较,其特征在于:从一组运动图像中顺次连续提取两帧静态图像,来依次判断该两帧图像的差异;其中判断差异采取采用了这样的方法:将每帧图像分解为若干个BLIT*BLIT的小块,将每个BLIT块中所有像素G值进行累加,并在累加完毕后求平均值,然后计算两帧图像对应BLIT块G值平均值的差,若该差值大于设定的阈值则将该有差异的BLIT块的外缘表示出来,进而将运动区域最外面的边缘显示出来;所述将运动区域最外面的边缘显示出来采用了这样的方法:让相邻BLIT块相互重叠一个像素,并对差值大于设定阈值的BLIT块的外缘像素进行反色或着色处理。 An image motion detecting method of comparing a group of consecutive images, characterized in that: sequentially extracting two consecutive still images from a set of motion images, sequentially determines the difference between the two images; wherein determining differences taken such methods employed: each frame image is decomposed into a number of pieces BLIT BLIT *, G values ​​of all pixels in each block BLIT accumulated, and the accumulated averaged after completion, and then calculate the two image corresponding BLIT difference block average G value, if the difference is greater than the threshold value is set to the outer edge of the block BLIT differentially expressed out, further movement of the outermost edge area is displayed; the motion of the outermost region edge shown using this method: let the outer edge of the adjacent pixels overlap each other BLIT a pixel block, and the difference is greater than the set threshold BLIT color block or anti-coloring treatment.
  2. 2.根据权利要求1所述的运动图像检测方法,其特征在于,所述BLIT块中参与G值累加的像素的选取原则为:将BLIT块按从下至上,从右至左的反向顺序,且像素行列值从0到BLIT-1来进行处理。 The moving image detecting method according to claim 1, wherein the pixel selection principle involved in G block BLIT accumulated value is: the block BLIT press from the bottom, from right to left in reverse order , and the pixel value of the ranks from 0 to BLIT-1 for processing.
  3. 3.根据权利要求1所述的运动图像检测方法,其特征在于,所述顺次连续提取两帧静态图像是这样来实现的:从运动图像文件中连续提取静态图像,先将第1帧图像读到指针fp1所指的内存区域,将下一帧图像读到指针fp2所指向的内存区域,对两帧图像进行比较;然后将指针fp1指向的内存区域的数据写到目标文件中相应的位置,接着交换fp1、fp2两指针的值,完成一次循环;下一次循环将新一帧图像读入fp2指向的内存区域。 The moving image detecting method according to claim 1, wherein said two sequentially consecutive extraction is achieved in a still image of: extracting a still image from a continuous moving image file, the first frame image read memory area pointer fp1 referred to, the memory area to read the next frame pointer is pointing fp2, of two images are compared; fp1 and the data pointer points to the memory area of ​​the target file is written in the corresponding position followed by exchange FP1, fp2 two pointer values, to complete a cycle; cycle a new image reading point fp2 lower memory area.
  4. 4.根据权利要求3所述的运动图像检测方法,其特征在于,在读入每帧图像前通过loc=2056+(bmpbytes+8)*k语句对其定位,其中k=0、1、2...,为即将处理的帧序列号,loc为第k帧第一个像素的B值在内存中的偏置,bmpbytes为一帧图像所占据的空间。 The image motion detection method according to claim 3, characterized in that, by loc = 2056 + (bmpbytes + 8) * k is positioned in front of their statement is read each frame, where k = 0,1,2 ..., for the frame sequence number to be processed is, LOC is the B value of the first pixel in the k-th frame offset memory, bmpbytes is a space occupied by the image.
  5. 5.根据权利要求3所述的运动图像检测方法,其特征在于,将一帧图像读入内存是通过语句fread(fp1,bmpbytes,1,file1)实现的,其中交换内存指针的语句为fp2=fp1s-1和fp1=fp2s-1,其中file1为输入文件指针,bmpbytes为一帧图像所占据的空间,fp1为指向第1帧图像所在内存的指针,fp2为指向第2帧图像所在内存的指针,fp1s为fp1的归位指针,fp2s为fp2的归位指针。 The moving image detecting method according to claim 3, characterized in that an image is read into memory by the statement fread (fp1, bmpbytes, 1, file1) implementation in which the statement is swap memory pointer fp2 = fp1s-1 and fp1 = fp2s-1, where file1 is the input file pointer, bmpbytes spatial image of one frame occupied, fp1 to point to the memory of the first frame image where the pointer, fp2 to point to the memory of the second frame image where the pointer , fp1s for the homing of pointer fp1, fp2s is fp2 homing pointer.
  6. 6.根据从1到5中任一权利要求所述的运动图像检测方法,其特征在于,所述运动图像文件为AVI动态影像文件。 The detection method of the moving image from 1 to 5 according to any one of the preceding claims, wherein the moving image file to AVI movie file.
  7. 7.根据权利要求6所述的运动图像检测方法,其特征在于,文件中规定图像每一行像素占据4的整数倍个字节,不足部分在末尾补0。 The moving image detecting method according to claim 6, wherein the predetermined image file each row of pixels occupied by an integral multiple of 4 bytes, and the gap at the end of 0s.
CN 02131392 2002-10-10 2002-10-10 Sports image detecting method CN1274146C (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN 02131392 CN1274146C (en) 2002-10-10 2002-10-10 Sports image detecting method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN 02131392 CN1274146C (en) 2002-10-10 2002-10-10 Sports image detecting method

Publications (2)

Publication Number Publication Date
CN1489112A true CN1489112A (en) 2004-04-14
CN1274146C true CN1274146C (en) 2006-09-06

Family

ID=34144917

Family Applications (1)

Application Number Title Priority Date Filing Date
CN 02131392 CN1274146C (en) 2002-10-10 2002-10-10 Sports image detecting method

Country Status (1)

Country Link
CN (1) CN1274146C (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101271672A (en) * 2007-03-23 2008-09-24 奇美电子股份有限公司 Dynamic image detector for LCD device and its detection method

Families Citing this family (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1333327C (en) * 2004-05-26 2007-08-22 凌阳科技股份有限公司 Optimum correlation matching method and system used to judge locus behavior
JP2006098803A (en) 2004-09-29 2006-04-13 Toshiba Corp Moving image processing method, moving image processing apparatus and moving image processing program
JP4290164B2 (en) 2006-01-31 2009-07-01 キヤノン株式会社 Display method for displaying a display indicating the identification area together with the image, the program to be executed by a computer device, and an imaging device
CN100450148C (en) 2006-02-02 2009-01-07 日本胜利株式会社 Video signal processing apparatus and edge enhancement apparatus
JP4187748B2 (en) 2006-03-23 2008-11-26 株式会社コナミデジタルエンタテインメント Image generating apparatus, image generating method, and program
CN101184235B (en) * 2007-06-21 2010-07-28 腾讯科技(深圳)有限公司 Method and apparatus for implementing background image extraction from moving image
CN101593348B (en) 2008-05-26 2012-09-26 英华达(上海)电子有限公司 Mobile call terminal with image processing function and image processing method thereof
JP4507129B2 (en) 2008-06-06 2010-07-21 ソニー株式会社 Tracking point detecting device and method, program, and recording medium
CN101447078B (en) * 2008-12-10 2011-06-15 东软集团股份有限公司 Method for obstacle segmentation and device thereof
CN101567087B (en) 2009-05-25 2012-05-23 北京航空航天大学 Method for detecting and tracking small and weak target of infrared sequence image under complex sky background
CN101909145B (en) 2009-06-05 2012-03-28 鸿富锦精密工业(深圳)有限公司 Image noise filtering system and method
CN101882217B (en) * 2010-02-26 2012-06-27 杭州海康威视软件有限公司 Target classification method of video image and device
EP2538372A1 (en) * 2011-06-23 2012-12-26 Alcatel Lucent Dynamic gesture recognition process and authoring system
CN103885461B (en) * 2012-12-21 2017-03-01 宗经投资股份有限公司 The method of automatically moving makeup cosmetics machine tools

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101271672A (en) * 2007-03-23 2008-09-24 奇美电子股份有限公司 Dynamic image detector for LCD device and its detection method
CN101271672B (en) 2007-03-23 2013-08-14 群创光电股份有限公司 Dynamic image detector for LCD device and its detection method

Also Published As

Publication number Publication date Type
CN1489112A (en) 2004-04-14 application

Similar Documents

Publication Publication Date Title
Hampapur et al. Production model based digital video segmentation
US6639998B1 (en) Method of detecting a specific object in an image signal
US6873341B1 (en) Detection of video windows and graphics windows
Yeo et al. Rapid scene analysis on compressed video
US20020097893A1 (en) Apparatus and method for generating object-labeled image in video sequence
US6243419B1 (en) Scheme for detecting captions in coded video data without decoding coded video data
US7254268B2 (en) Object extraction
US6157744A (en) Method and apparatus for detecting a point of change in a moving image
US20030091235A1 (en) Shot boundary detection
US20070036432A1 (en) Object detection in images
US6545705B1 (en) Camera with object recognition/data output
US20090219379A1 (en) Average Calculation in Color Space, Particularly for Segmentation of Video Sequences
US7003135B2 (en) System and method for rapidly tracking multiple faces
US6546185B1 (en) System for searching a particular character in a motion picture
US7218751B2 (en) Generating super resolution digital images
US20030085908A1 (en) Method and apparatus for an automated reference indicator system for photographic and video images
US20070126868A1 (en) Image processing apparatus, image processing system, and recording medium for programs therefor
Venkatesh et al. Efficient object-based video inpainting
CN101464946A (en) Detection method based on head identification and tracking characteristics
US20050232476A1 (en) Image analysis method, image analysis program and pixel evaluation system having the sames
Cavallaro et al. Shadow-aware object-based video processing
US20060115178A1 (en) Artifact reduction in a digital video
JPH1115979A (en) Face detection and method and device for tracing face
US6549659B1 (en) Method and apparatus for determining the location of a reflective object within a video field
JP2005309746A (en) Method and program for tracking moving body, recording medium therefor, and moving body tracking device

Legal Events

Date Code Title Description
C06 Publication
C10 Request of examination as to substance
C14 Granted
ASS Succession or assignment of patent right

Owner name: GUANGDONG ZHONGXING ELECTRONICS CO., LTD.

Free format text: FORMER OWNER: BEIJING VIMICRO CORPORATION

Effective date: 20150228

C41 Transfer of the right of patent application or the patent right
COR Bibliographic change or correction in the description

Free format text: CORRECT: ADDRESS; FROM: 100083 HAIDIAN, BEIJING TO: 519031 ZHUHAI, GUANGDONG PROVINCE