Motion detection method, device, equipment and medium

By dividing the image blocks and comparing the pixel values ​​and color values, and calculating the color temperature comparison results, the motion region is judged, which solves the problem of motion misjudgment in the prior art and improves the time domain noise reduction effect.

CN119676578APending Publication Date: 2025-03-21QINGDAO HI-IMAGE TECH CO LTD
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202311225782.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-09-21
Publication Date
2025-03-21

AI Technical Summary

Technical Problem

The prior art is difficult to accurately judge the moving area in image signal processing, especially when the color temperature changes occasionally, it is easy to lead to large-area motion misjudgment, affecting the time-domain noise reduction effect.

Method used

By dividing the image blocks of the current frame image, and comparing the pixel value and color value of each image block with the corresponding values ​​of the same area in the previous N frame image, the color temperature comparison result is calculated. If the color temperature comparison result is greater than or equal to the preset threshold, it is determined that the image block is a moving area.

Benefits of technology

The accuracy and flexibility of image-based motion detection is improved, and the motion misjudgment caused by color temperature changes is reduced, thereby improving the time-domain noise reduction effect in image signal processing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119676578A_ABST
    Figure CN119676578A_ABST
Patent Text Reader

Abstract

The invention discloses a motion detection method and device, equipment and a medium, which are used for improving the accuracy and flexibility of image-based motion detection and further improving the time domain noise reduction effect in an image signal processing process. The method comprises the following steps: acquiring a current frame image, and dividing the current frame image into a plurality of image blocks according to a preset mode; for each image block, determining a first comparison result between the pixel value of the image block and the pixel value of the image block in the same area in the previous N frames of images, and determining a second comparison result between the color value of the image block and the color value of the image block in the same area in the previous N frames of images; based on the first comparison result and the second comparison result, determining a third comparison result of the color temperature of the image block and the color temperature of the image blocks in the same area in the previous N frames of images; wherein N is an integer greater than or equal to 1; and when the third comparison result is greater than or equal to a preset threshold value, determining that the region corresponding to the image block is a motion region with a motion target.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of image technology, and in particular to a motion detection method, device, equipment and medium. Background Art

[0002] Image Signal Processing (ISP) is a module that processes sensor images and is widely used in camera modules. The noise reduction processing of the noise reduction module in ISP mainly includes time domain and spatial domain noise reduction. Among them, time domain noise reduction is three-dimensional noise reduction, which requires accurate motion area judgment based on the relationship between frames to ensure good time domain noise reduction effect. Summary of the invention

[0003] The embodiments of the present application provide a motion detection method, apparatus, device and medium for improving the accuracy and flexibility of image-based motion detection, thereby improving the time domain noise reduction effect in the image signal processing process.

[0004] An embodiment of the present application provides a motion detection method, including:

[0005] Acquire a current frame image, and divide the current frame image into a plurality of image blocks according to a preset method;

[0006] For each of the image blocks:

[0007] Determine a first comparison result between a pixel value of the image block and a pixel value of an image block in the same region in the previous N frames of images, and determine a second comparison result between a color value of the image block and a color value of an image block in the same region in the previous N frames of images;

[0008] Determine, based on the first comparison result and the second comparison result, a third comparison result of the color temperature of the image block and the color temperature of the image block in the same area in the previous N frames of images;

[0009] Wherein, N is an integer greater than or equal to 1;

[0010] When the third comparison result is greater than or equal to a preset threshold, the area corresponding to the image block is determined to be a motion area where a moving target exists; when the third comparison result is less than the preset threshold, motion detection is continued for the next frame of image.

[0011] The embodiment of the present application obtains the current frame image through the method, and divides the current frame image into multiple image blocks in a preset manner; and, for each of the image blocks: a first comparison result of a pixel value of the image block and a pixel value of an image block in the same area in the previous N frames of images is determined, and a second comparison result of a color value of the image block and a color value of an image block in the same area in the previous N frames of images is determined; based on the first comparison result and the second comparison result, a third comparison result of a color temperature of the image block and a color temperature of an image block in the same area in the previous N frames of images is determined; wherein N is an integer greater than or equal to 1; when the third comparison result is greater than or equal to a preset threshold, it is determined that the area corresponding to the image block is a moving area where a moving target exists, thereby avoiding large-area motion misjudgment caused by occasional changes in the color temperature of the application scenario, thereby improving the accuracy and flexibility of image-based motion detection, and further improving the time domain noise reduction effect in the image signal processing process.

[0012] In some embodiments, determining a first comparison result between the pixel value of the image block and the pixel value of the image block in the same area in the previous N frames of images includes:

[0013] Determine the pixel value of the image block and the average value of the pixel values ​​of the image blocks in the same area in the previous N frames of images;

[0014] Determine the absolute value of the difference between the pixel value of the image block and the average value of the pixel values ​​of the image blocks in the same area in the previous N frames of images;

[0015] Based on the absolute value of the difference, a first comparison result between the pixel value of the image block and the pixel value of the image block in the same area in the previous N frames of images is determined.

[0016] In some embodiments, the first comparison result is determined using the following formula:

[0017] V1=|I-Ia|*Lgain+Loffset;

[0018] Wherein, V1 is the first comparison result;

[0019] I is the pixel value of the image block;

[0020] Ia is the average value of the pixel values ​​of the image blocks in the same area in the first N frames of images;

[0021] Lgain is the preset weight value of pixel value change;

[0022] Loffset is a preset compensation value for pixel value change.

[0023] In some embodiments, determining a second comparison result of the color value of the image block and the color value of the image block in the same area in the previous N frames of images includes:

[0024] Determine a first color value and a second color value of the image block, and an average value of the first color value and an average value of the second color value of the image block in the same area in the first N frames of images;

[0025] Determine a first absolute value of a difference between a first color value of the image block and an average value of first color values ​​of image blocks in the same region in the first N frames of images; and determine a second absolute value of a difference between a second color value of the image block and an average value of second color values ​​of image blocks in the same region in the first N frames of images;

[0026] Based on the first absolute value and the second absolute value, a second comparison result of the color value of the image block and the color value of the image block in the same area in the previous N frames of images is determined.

[0027] In some embodiments, the second comparison result is determined using the following formula:

[0028] V2=(|R / GR / Ga|+|B / GB / Ga|)*Cgain+Coffset;

[0029] Wherein, V2 is the second comparison result;

[0030] R / G is the first color value of the image block;

[0031] B / G is the second color value of the image block;

[0032] R / Ga is the average value of the first color values ​​of the image blocks in the same area of ​​the first N frames of images;

[0033] B / Ga is the average value of the second color values ​​of the image blocks in the same area of ​​the first N frames of images;

[0034] Cgain is the preset weight value of color change;

[0035] Coffset is the preset color change compensation value.

[0036] In some embodiments, the third comparison result is determined using the following formula:

[0037] V3=G1*V1+G2*V2;

[0038] Wherein, V3 is the third comparison result;

[0039] G1 is a preset first weighted value;

[0040] V1 is the first comparison result;

[0041] G2 is a preset second weighted value;

[0042] V2 is the second comparison result.

[0043] In some embodiments, the method further comprises:

[0044] Performing time domain noise reduction processing on the image blocks in the motion area of ​​the current frame image.

[0045] An embodiment of the present application provides a motion detection device, comprising:

[0046] The first unit is used to obtain a current frame image and divide the current frame image into a plurality of image blocks according to a preset method;

[0047] The second unit is configured to: for each of the image blocks:

[0048] Determine a first comparison result between a pixel value of the image block and a pixel value of an image block in the same region in the previous N frames of images, and determine a second comparison result between a color value of the image block and a color value of an image block in the same region in the previous N frames of images;

[0049] Determine, based on the first comparison result and the second comparison result, a third comparison result of the color temperature of the image block and the color temperature of the image block in the same area in the previous N frames of images;

[0050] Wherein, N is an integer greater than or equal to 1;

[0051] When the third comparison result is greater than or equal to a preset threshold, the area corresponding to the image block is determined to be a motion area where a moving target exists; when the third comparison result is less than the preset threshold, motion detection is continued for the next frame of image.

[0052] Another embodiment of the present application provides an electronic device, which includes a memory and a processor, wherein the memory is used to store program instructions, and the processor is used to call the program instructions stored in the memory and execute any of the above methods according to the obtained program.

[0053] Another embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer-executable instructions, and the computer-executable instructions are used to enable the computer to execute any of the above methods. BRIEF DESCRIPTION OF THE DRAWINGS

[0054] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0055] Figure 1 An operation scenario between a display device and a control device provided in an embodiment of the present application;

[0056] Figure 2 A hardware configuration block diagram of a control device 100 provided in an embodiment of the present application;

[0057] Figure 3 A hardware configuration block diagram of a display device 200 provided in an embodiment of the present application;

[0058] Figure 4 A software configuration diagram of the display device 200 provided in an embodiment of the present application;

[0059] Figure 5 A system framework diagram of image processing provided in an embodiment of the present application;

[0060] Figure 6 A schematic diagram of the overall flow of the motion detection method provided in the embodiment of the present application;

[0061] Figure 7 A schematic diagram of a specific process of the motion detection method provided in an embodiment of the present application;

[0062] Figure 8 A schematic diagram of a pixel unit structure provided in an embodiment of the present application;

[0063] Fig. 9 A schematic diagram of a motion detection process performed by each functional module corresponding to a specific process of the motion detection method provided in an embodiment of the present application;

[0064] Fig.10 A schematic diagram of the architecture of each functional module provided in the embodiment of the present application;

[0065] Fig.11 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application;

[0066] Fig.12 A schematic diagram of the structure of a motion detection device corresponding to the overall process of the motion detection method provided in an embodiment of the present application. DETAILED DESCRIPTION

[0067] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0068] The embodiments of the present application provide a motion detection method, apparatus, device and medium for improving the accuracy and flexibility of image-based motion detection, thereby improving the time domain noise reduction effect in the image signal processing process.

[0069] Among them, the method and the device, equipment, and medium are based on the same application concept. Since the principles of solving problems by the method and the device, equipment, and medium are similar, the implementation of the device, equipment, medium, and method can refer to each other, and the repeated parts will not be repeated.

[0070] The terms "first", "second", etc. (if any) in the specification and claims of the embodiments of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments described herein can be implemented in an order other than the content illustrated or described here. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0071] The following examples and embodiments are to be understood as illustrative examples only. Although this specification may refer to "one", "an" or "some" examples or embodiments in several places, this does not mean that each such reference relates to the same example or embodiment, nor does it mean that the feature applies only to a single example or embodiment. Individual features of different embodiments may also be combined to provide other embodiments. In addition, terms such as "including" and "comprising" should be understood as not limiting the described embodiments to only those features that have been mentioned; such examples and embodiments may also include features, structures, units, modules, etc. that are not specifically mentioned.

[0072] The following is a detailed description of each embodiment of the present application in conjunction with the accompanying drawings. It should be noted that the display order of the embodiments of the present application only represents the order of the embodiments, and does not represent the advantages and disadvantages of the technical solutions provided by the embodiments.

[0073] Figure 1FIG. 1 is a schematic diagram of an operation scenario between a display device and a control device according to an embodiment. Figure 1 As shown, the user can operate the display device 200 through the smart device 300 or the control apparatus 100 .

[0074] In some embodiments, the control device 100 may be a remote controller, and the communication between the remote controller and the display device includes infrared protocol communication or Bluetooth protocol communication, and other short-range communication methods, and the display device 200 is controlled wirelessly or wired. The user may control the display device 200 by inputting user commands through buttons on the remote controller, voice input, control panel input, etc.

[0075] In some embodiments, a smart device 300 (such as a mobile terminal, a tablet computer, a computer, a laptop computer, etc.) may also be used to control the display device 200. For example, the display device 200 is controlled using an application running on the smart device.

[0076] In some embodiments, the display device 200 can also be controlled in a manner other than the control device 100 and the smart device 300. For example, the user's voice command control can be directly received through a module for obtaining voice commands configured inside the display device 200, or the user's voice command control can be received through a voice control device set outside the display device 200.

[0077] In some embodiments, the display device 200 also communicates data with the server 400. The display device 200 may be allowed to communicate via a local area network (LAN), a wireless local area network (WLAN), and other networks. The server 400 may provide various content and interactions to the display device 200. The server 400 may be one cluster or multiple clusters, and may include one or more types of servers.

[0078] Figure 2 Schematically shows a block diagram of a configuration of the control device 100 according to an exemplary embodiment. Figure 2 As shown, the control device 100 includes a controller 110, a communication interface 130, a user input / output interface 140, a memory, and a power supply. The control device 100 can receive input operation instructions from the user, and convert the operation instructions into instructions that the display device 200 can recognize and respond to, playing the role of an interactive intermediary between the user and the display device 200.

[0079] Figure 3 A hardware configuration block diagram of a display device 200 according to an exemplary embodiment is shown.

[0080] In some embodiments, the display apparatus 200 includes at least one of a tuner 210, a communicator 220, a detector 230, an external device interface 240, a controller 250, a display 260, an audio output interface 270, a memory, a power supply, and a user interface.

[0081] In some embodiments, the controller includes a processor, a video processor, an audio processor, a graphics processor, a RAM, a ROM, and a first interface to an nth interface for input / output.

[0082] In some embodiments, the display 260 includes a display screen component for presenting images, and a driving component for driving image display, which is used to receive image signals output from a controller, display video content, image content, and a menu control interface component and a user control UI interface.

[0083] In some embodiments, the display 260 may be a liquid crystal display, an OLED display, and a projection display, and may also be a projection device and a projection screen.

[0084] In some embodiments, the communicator 220 is a component for communicating with an external device or server according to various communication protocol types. For example, the communicator may include at least one of a Wifi module, a Bluetooth module, a wired Ethernet module, and other network communication protocol chips or near field communication protocol chips, and an infrared receiver. The display device 200 can establish transmission and reception of control signals and data signals with the external control device 100 or the server 400 through the communicator 220.

[0085] In some embodiments, the user interface may be used to receive a control signal from the control device 100 (eg, an infrared remote controller, etc.).

[0086] In some embodiments, the detector 230 is used to collect signals of the external environment or external interaction. For example, the detector 230 includes a light receiver, a sensor for collecting the intensity of ambient light; or, the detector 230 includes an image collector, such as a camera, which can be used to collect external environment scenes, user attributes or user interaction gestures; or, the detector 230 includes a sound collector, such as a microphone, etc., for receiving external sounds.

[0087] In some embodiments, the external device interface 240 may include, but is not limited to, any one or more of the following interfaces: a high-definition multimedia interface (HDMI), an analog or digital high-definition component input interface (component), a composite video input interface (CVBS), a USB input interface (USB), an RGB port, etc. It may also be a composite input / output interface formed by the above multiple interfaces.

[0088] In some embodiments, the tuner-demodulator 210 receives broadcast television signals via wired or wireless reception, and demodulates audio and video signals, such as EPG data signals, from a plurality of wireless or wired broadcast television signals.

[0089] In some embodiments, the controller 250 and the tuner-demodulator 210 may be located in different separate devices, that is, the tuner-demodulator 210 may also be located in an external device of the main device where the controller 250 is located, such as an external set-top box.

[0090] In some embodiments, the controller 250 controls the operation of the display device and responds to user operations through various software control programs stored in the memory. The controller 250 controls the overall operation of the display device 200. For example, in response to receiving a user command for selecting a UI object to be displayed on the display 260, the controller 250 can perform operations related to the object selected by the user command.

[0091] In some embodiments, the object may be any one of the selectable objects, such as a hyperlink, an icon or other operable controls. Operations related to the selected object include: displaying a page, document, image, etc. connected to the hyperlink, or executing a program corresponding to the icon.

[0092] In some embodiments, the controller includes a central processing unit (CPU), a video processor, an audio processor, a graphics processing unit (GPU), RAM Random Access Memory (RAM), ROM (Read-Only Memory, ROM), a first interface to an nth interface for input / output, a communication bus (Bus), etc.

[0093] CPU processor. Used to execute operating system and application instructions stored in the memory, and to execute various applications, data and content according to various interactive instructions received from external input, so as to finally display and play various audio and video content. CPU processor may include multiple processors. For example, it includes a main processor and one or more sub-processors.

[0094] In some embodiments, the graphics processor is used to generate various graphic objects, such as icons, operation menus, and user input command display graphics. The graphics processor includes an operator, which performs operations by receiving various interactive instructions input by the user and displays various objects according to display attributes; and a renderer, which renders various objects obtained based on the operator, and the rendered objects are used to be displayed on the display.

[0095] In some embodiments, the video processor is used to receive an external video signal and perform video processing such as decompression, decoding, scaling, noise reduction, frame rate conversion, resolution conversion, and image synthesis according to the standard codec protocol of the input signal to obtain a signal that can be directly displayed or played on the display device 200.

[0096] In some embodiments, the video processor includes a demultiplexing module, a video decoding module, an image synthesis module, a frame rate conversion module, a display formatting module, etc. Among them, the demultiplexing module is used to demultiplex the input audio and video data stream. The video decoding module is used to process the demultiplexed video signal, including decoding and scaling processing. The image synthesis module, such as an image synthesizer, is used to superimpose and mix the GUI signal generated by the graphics generator according to the user input or itself with the video image after scaling processing to generate an image signal for display. The frame rate conversion module is used to convert the input video frame rate. The display formatting module is used to receive the video output signal after frame rate conversion and change the signal to conform to the display format signal, such as outputting RGB data signal.

[0097] In some embodiments, the audio processor is used to receive an external audio signal, and perform decompression and decoding, as well as noise reduction, digital-to-analog conversion, and amplification processing according to a standard codec protocol of the input signal to obtain a sound signal that can be played in a speaker.

[0098] In some embodiments, the user may input a user command in a graphical user interface (GUI) displayed on the display 260, and the user input interface receives the user input command through the graphical user interface (GUI). Alternatively, the user may input a user command by inputting a specific sound or gesture, and the user input interface receives the user input command by recognizing the sound or gesture through a sensor.

[0099] In some embodiments, the "user interface" is a medium interface for interaction and information exchange between an application or operating system and a user, which realizes the conversion between the internal form of information and the form acceptable to the user. The commonly used form of user interface is the graphical user interface (GUI), which refers to a user interface related to computer operation displayed in a graphical manner. It can be an interface element such as an icon, window, control, etc. displayed on the display screen of an electronic device, where the control can include icons, buttons, menus, tabs, text boxes, dialog boxes, status bars, navigation bars, widgets, and other visual interface elements.

[0100] In some embodiments, the system of the display device may include a kernel, a command parser (shell), a file system, and an application. The kernel, shell, and file system together constitute the basic operating system structure, which allows users to manage files, run programs, and use the system. After power-on, the kernel starts, activates the kernel space, abstracts hardware, initializes hardware parameters, etc., runs and maintains virtual memory, schedulers, signals, and inter-process communication (IPC). After the kernel starts, the shell and user applications are loaded. After startup, the application is compiled into machine code to form a process.

[0101] See also Figure 4 In some embodiments, the system is divided into four layers, from top to bottom, namely, the application layer (Applications) layer (referred to as "application layer"), the application framework layer (Application Framework) layer (referred to as "framework layer"), the Android runtime (Android runtime) and system library layer (referred to as "system runtime library layer"), and the kernel layer.

[0102] In some embodiments, at least one application is running in the application layer, and these applications can be window programs, system settings programs, clock programs, etc. provided by the operating system, or applications developed by third-party developers. In specific implementations, the application packages in the application layer are not limited to the above examples.

[0103] The framework layer provides application programming interfaces (APIs) and programming frameworks for applications. The application framework layer includes some predefined functions. The application framework layer is equivalent to a processing center that determines the actions that applications in the application layer take. Through the API interface, applications can access system resources and obtain system services during execution.

[0104] like Figure 4As shown, in the embodiment of the present application, the application framework layer includes managers, content providers, etc., wherein the manager includes at least one of the following modules: an activity manager (ActivityManager) is used to interact with all activities running in the system; a location manager (Location Manager) is used to provide system services or applications with access to system location services; a package manager (Package Manager) is used to retrieve various information related to the application package currently installed on the device; a notification manager (NotificationManager) is used to control the display and clearing of notification messages; a window manager (Window Manager) is used to manage icons, windows, toolbars, wallpapers, and desktop components on the user interface.

[0105] In some embodiments, the activity manager is used to manage the life cycle of each application and the common navigation back function, such as controlling the exit, opening, and back of the application. The window manager is used to manage all window programs, such as obtaining the display screen size, determining whether there is a status bar, locking the screen, capturing the screen, and controlling the display window changes (for example, reducing the display window, shaking the display, distorting the display, etc.).

[0106] In some embodiments, the system runtime layer provides support for the upper layer, namely the framework layer. When the framework layer is used, the Android operating system will run the C / C++ library contained in the system runtime layer to implement the functions to be implemented by the framework layer.

[0107] In some embodiments, the kernel layer is a layer between hardware and software. Figure 4 As shown, the kernel layer includes at least one of the following drivers: audio driver, display driver, Bluetooth driver, camera driver, WIFI driver, USB driver, HDMI driver, sensor driver (such as fingerprint sensor, temperature sensor, pressure sensor, etc.), and power driver, etc.

[0108] The electronic device described in the embodiments of the present application may be the above-mentioned display device such as a television.

[0109] During the image processing process, changes in color temperature will cause changes in color. Therefore, in the embodiment of the present application, the judgment of color temperature is reflected through the calculation and judgment of color during motion detection, thereby avoiding excessive brightness calculation errors and inaccurate motion judgment caused by color temperature changes.

[0110] Furthermore, in some embodiments, multi-level and differentiated color temperature judgments can be performed for different scenes or different image blocks in the same scene, thereby ensuring that the ISP has more accurate motion judgments in different scenes and complex scenes, and improving the flexibility and accuracy of motion detection.

[0111] Among them, regarding the multiple gears: for example, in different brightness scenes of daytime illumination and nighttime lighting, two sets of different gain and threshold parameters can be used to perform judgment calculations on color temperature.

[0112] Regarding the differentiation: for example, during the user's use, there may be similar functions such as middle preference or upper image preference. According to different needs, the middle or upper image block area can be given a higher weight to ensure that different image block areas can be adjusted differently.

[0113] That is to say, the method provided in the embodiment of the present application can ensure that when the scene color temperature occasionally changes, there will be no large-scale motion misjudgment, thereby ensuring the accuracy of motion detection and improving the reliability of time domain noise reduction.

[0114] The following is a detailed example description of the technical solution provided in the embodiments of the present application.

[0115] ISP (Image Signal Processor) is an image signal processor. Its main function is to process the signal output by the front-end image sensor and output an image that meets the expectations. Its main functions include white balance, automatic exposure, noise reduction, color correction, etc.

[0116] Figure 5 This is a functional unit block diagram of a UVC (USB Video Class) camera. The ISP receives the original image (RAW image) input by the image sensor, and after color correction, noise reduction and other processing, outputs the YUV image to the video processing unit (VPU) for encoding and decoding, and then outputs the image through the UVC interface. At the same time, the ISP can also control the image sensor and lens through firmware to achieve automatic exposure and autofocus. Users can use the image quality debugging tool (PQ tool) to debug the parameters of the ISP to ensure that the output image meets expectations. Among them, YUV is a color encoding method, Y represents brightness, that is, grayscale value; U and V represent chromaticity, which is used to describe image color and saturation.

[0117] ISP motion detection module (included in Figure 5In the hardware shown in the figure), it is generally implemented in the RAW domain, and the RAW image data input by the image sensor is processed, and the processed image is compared with the N frames of image information stored previously, and the motion area in the image is determined according to the change of pixel values. For example: the current frame information is subtracted from the N frames of information stored previously (for example, the pixel value is subtracted to reflect the brightness change), and after weighted processing (the difference in pixel values ​​is weighted), it is compared with the preset threshold. The area where the difference after weighted processing is greater than the threshold is the motion area. If there is a moving object in the image, the pixel values ​​of two consecutive frames of images in the scene where the object is moving will have a large difference. Motion detection is to determine which part of the image has object movement. The area where the object is moving is called the motion area of ​​the image, so that the part of the image with movement, that is, the motion area, uses a different noise reduction algorithm from other areas.

[0118] When using TV cameras, motion detection can produce misjudgments in flat areas. Unlike conventional cameras, TV cameras are affected by the TV's own display light source. Changes in the image displayed on the TV screen will cause the color of some areas of the image captured by the TV camera to change. The large difference in pixel values ​​on the image will lead to inaccurate motion detection, which in turn leads to poor temporal noise reduction effects.

[0119] In order to solve the above problems, Figure 5 The ISP side of the hardware shown is shown in Figure 6 , the embodiment of the present application provides a motion detection method, including:

[0120] Step S101, obtaining a current frame image, and dividing the current frame image into a plurality of image blocks according to a preset method;

[0121] That is to say, in the embodiment of the present application, for each frame of image acquired, the region blocks are divided in the same manner, for example, each frame of image is divided into mxn image blocks (referred to as blocks), where m and n are both integers greater than or equal to 1. Specifically, for example, each frame of image is divided into 15x 15 blocks.

[0122] The current frame image may be an original RAW image input by an image sensor and not processed by ISP.

[0123] Step S102, for each of the image blocks: determine a first comparison result (for example, expressed as V1) between a pixel value of the image block and a pixel value of an image block in the same area in the previous N frames of images, and determine a second comparison result (for example, expressed as V2) between a color value of the image block and a color value of an image block in the same area in the previous N frames of images; based on the first comparison result and the second comparison result, determine a third comparison result (for example, expressed as V3) between a color temperature of the image block and a color temperature of an image block in the same area in the previous N frames of images; wherein N is an integer greater than or equal to 1; when the third comparison result is greater than or equal to a preset threshold, determine that the area corresponding to the image block is a moving area where a moving target exists; when the third comparison result is less than the preset threshold, continue to perform motion detection on the next frame of image.

[0124] That is to say, the present application obtains whether the area corresponding to the current image block of the current frame image is a moving area where a moving target exists by comparing the pixel values ​​and color values ​​of the image blocks in the same area of ​​multiple consecutive frames of images. Thereby, it is ensured that when the color temperature of the scene changes occasionally, there will be no large-scale motion misjudgment, and the accuracy of motion detection is guaranteed. For example, if a pink image area suddenly appears near the gray image area displayed on the TV screen, it will cause motion misjudgment, that is, the gray image area is mistakenly identified as a moving area, and time domain noise reduction processing is used, resulting in abnormal gray display of the gray image area. However, the technical solution provided by the embodiment of the present application can avoid such motion misjudgment and thus avoid unnecessary time domain noise reduction processing. That is, the embodiment of the present application ensures the accuracy of motion detection for images, improves the reliability of time domain noise reduction for images, and ultimately improves the picture display quality.

[0125] In some embodiments, determining a first comparison result between the pixel value of the image block and the pixel value of the image block in the same area in the previous N frames of images includes:

[0126] Determine the pixel value of the image block and the average value of the pixel values ​​of the image blocks in the same area in the previous N frames of images;

[0127] Determine the absolute value of the difference between the pixel value of the image block and the average value of the pixel values ​​of the image blocks in the same area in the previous N frames of images;

[0128] Based on the absolute value of the difference, a first comparison result between the pixel value of the image block and the pixel value of the image block in the same area in the previous N frames of images is determined.

[0129] In the embodiment of the present application, various constant items may be set for calculating the first comparison result, the second comparison result, and the third comparison result, for example, a weight value of a pixel value change, a compensation value of a pixel value change, etc. may be set for the first comparison result, a weight value of a color value change, a compensation value of a color value change, etc. may be set for the second comparison result, and weighted values ​​of various parameters, threshold values, etc. may be set for the third comparison result. For example, if the image is divided into mxn image blocks, and the constant items used to calculate the first comparison result, the second comparison result, and the third comparison result are regarded as an array, then there may be mxn different arrays, and different arrays may be set for different scenes.

[0130] In the embodiment of the present application, different weight values, compensation values, and threshold values ​​can be set for different scenes, and different weight values, compensation values, and threshold values ​​can also be set for image blocks in different areas of the same scene. That is, multi-level and differentiated color temperature judgments can be performed for different scenes and different areas of the same scene, thereby ensuring that the ISP has accurate motion judgment in different scenes and complex scenes, thereby improving the flexibility and accuracy of motion detection.

[0131] The scenes include different scenes such as indoor, outdoor, day, night, etc.

[0132] In some embodiments, determining a first comparison result between the pixel value of the image block and the pixel value of the image block in the same area in the previous N frames of images based on the absolute value of the difference includes:

[0133] The absolute value of the difference is multiplied by a preset weight value of the pixel value change, and then a preset compensation value of the pixel value change is added to obtain the first comparison result of the image block.

[0134] In some embodiments, determining a second comparison result of the color value of the image block and the color value of the image block in the same area in the previous N frames of images includes:

[0135] Determine a first color value (e.g., R / G) and a second color value (B / G) of the image block, and an average value (e.g., expressed as R / Ga) of the first color value and an average value (e.g., expressed as B / Ga) of the second color value of the image block in the same area in the first N frames of images;

[0136] Determine a first absolute value of a difference between a first color value of the image block and an average value of first color values ​​of image blocks in the same region in the first N frames of images; and determine a second absolute value of a difference between a second color value of the image block and an average value of second color values ​​of image blocks in the same region in the first N frames of images;

[0137] Based on the first absolute value and the second absolute value, a second comparison result of the color value of the image block and the color value of the image block in the same area in the previous N frames of images is determined.

[0138] In some embodiments, determining, based on the first absolute value and the second absolute value, a second comparison result of the color value of the image block and the color value of the image block in the same area in the previous N frames of images includes:

[0139] The sum of the first absolute value and the second absolute value is multiplied by a preset weight value of the color value change, and then added with a preset compensation value of the color value change to obtain the second comparison result of the image block.

[0140] In some embodiments, determining, based on the first comparison result and the second comparison result, a third comparison result of the color temperature of the image block and the color temperature of the image block in the same area in the previous N frames of images includes:

[0141] The first comparison result and the second comparison result are weightedly summed (for example, the product obtained by multiplying the first comparison result by the first weighted value plus the product obtained by multiplying the second comparison result by the second weighted value) to obtain a third comparison result of the color temperature of the image block and the color temperature of the image block in the same area in the previous N frames of images.

[0142] In some embodiments, the method further comprises:

[0143] The image blocks in the motion region of the current frame image are subjected to temporal noise reduction processing. The specific noise reduction processing method is not limited in the embodiment of the present application.

[0144] The motion detection method provided in the embodiment of the present application, after dividing the current frame image into image blocks according to the preset rules, the specific process of the subsequent comparison and judgment operations performed on the current image block of the current frame can be found in Figure 7 As shown, including:

[0145] S201, determining a pixel value of a current image block in a current frame and an average value of pixel values ​​of the same image block in previous N frames of images.

[0146] Specifically, the pixel value of the current frame must be obtained in the RAW domain, that is, before demosaicing. At the same time, the image of the current frame must also be obtained before the ISP's black level correction, lens shading correction and RAW domain noise reduction.

[0147] Among them, demosaicing is to convert the RAW image of the Bayer array into an RGB image.

[0148] The black level correction of ISP is to correct the black level value of the image;

[0149] Lens shading correction is to correct the inconsistency of brightness and color between the center and edge of the image;

[0150] RAW domain noise reduction is a preliminary noise reduction in the RAW domain.

[0151] De-mosaicing performs color interpolation on each pixel. Before de-mosaicing, the acquisition calculation is performed. Each pixel has only one color channel value, which can effectively reduce the amount of calculation and storage, saving resources and memory. Black level correction, lens shading correction and RAW domain noise reduction will compensate for the pixel value. In order to ensure the accuracy of the calculation, the acquisition of the current frame image must be completed before these modules.

[0152] S202: Determine a color value of a current image block in a current frame and an average value of color values ​​of the same image block in previous N frames of images.

[0153] Image sensor output RAW Figure 1 Generally, it is a Bayer array of red, green, green and blue (RGGB), with four pixels as a unit, which are the pixel values ​​of R (red), G (green), G (green), and B (blue) channels. Each pixel can only contain the value of one of the RGB channels, and the corresponding first color value R / G and second color value B / G can be calculated with four pixels as a group.

[0154] In some embodiments, in order to reduce the amount of calculation, the length and width can be reduced to one-half in actual use. After the image is reduced to 1 / 4 (that is, only one pixel is retained in each pixel group), it can be ensured that each pixel has corresponding R / G and B / G. R / G and B / G will change with the color temperature, which can help judge the color change.

[0155] S203 . Calculate a first comparison value V1 corresponding to the current image block in the current frame according to the pixel value of the current image block in the current frame and the average value of the pixel values ​​of the same image block in the previous N frames of images.

[0156] For example, use the following formula 1 to calculate V1:

[0157] V1=|I-Ia|*Lgain+Loffset Formula 1;

[0158] Where I is the pixel value of the current image block;

[0159] Ia is the average value of the pixel values ​​of the image blocks in the same area in the previous N frames of images;

[0160] Lgain is the preset weight value of pixel value change;

[0161] Loffset is a preset compensation value for pixel value change.

[0162] Lgain and Loffset may be preset constants.

[0163] Lgain and Loffset can also be modified according to actual needs, so that users can configure them according to the scenario when tuning the ISP.

[0164] S204 , calculating a second comparison value V2 corresponding to the current image block in the current frame according to the color value of the current image block in the current frame and the average color value of the same image block in the previous N frames of images.

[0165] For example, use the following formula 2 to calculate V2:

[0166] V2=(|R / GR / Ga|+|B / GB / Ga|)*Cgain+Coffset Formula 2;

[0167] Wherein, the first color value R / G is r / ((gr+gb) / 2));

[0168] The second color value B / G is b / ((gr+gb) / 2));

[0169] Among them, in the Bayer array, see Figure 8 , with four pixels as a unit, each unit contains four pixel points: R (red), Gr (green adjacent to red), B (blue), and Gb (green adjacent to blue). The above r, gr, b, and gb represent the pixel values ​​of these four pixel points respectively.

[0170] R / Ga is the average value of the first color value of the image block in the same area of ​​the previous N frames of images;

[0171] B / Ga is the average value of the second color values ​​of the image blocks in the same area of ​​the previous N frames of images.

[0172] Cgain is the preset weight value of color change;

[0173] Coffset is the preset color change compensation value.

[0174] Cgain and Coffset can be preset constants;

[0175] Cgain and Coffset can also be modified according to actual needs, so that users can configure them according to the scenario when adjusting ISP parameters.

[0176] It can be seen that in the embodiment of the present application, the pixel value of the pixel point is used to calculate the color value.

[0177] S205 , according to the first comparison value V1 and the second comparison value V2 , obtain a third comparison value V3 by weighting, compare the third comparison value V3 with a preset threshold, and perform motion region recognition according to the comparison result.

[0178] For example, the following formula 3 is used for calculation:

[0179] V3=G1*V1+G2*V2Formula 3;

[0180] Among them, G1 and G2 represent the preset first weighted value and second weighted value respectively, which are parameters provided to the user for debugging and give different weights to brightness and color.

[0181] It should be noted that the various weight values, compensation values, threshold values, etc. provided in the embodiments of the present application are all values ​​that can be modified according to actual needs, so that users can configure them according to the scenarios when adjusting the ISP parameters, thereby improving the flexibility of adjusting the parameters.

[0182] In the embodiment of the present application, for each frame image, the image is divided into mxn areas, so that different weight values, compensation values ​​and thresholds can be set for each area when adjusting parameters. Each set of parameters is an mxn array. Because mxn areas are set, in order to achieve differentiated debugging, each area can use its own unique parameters. In this way, there are mxn groups of parameters, thereby ensuring flexible processing of complex scenes.

[0183] Regarding the division of the image blocks, for example, the image is divided into 15x 15 or 20x 20 regions.

[0184] In addition, in some embodiments, for different scenes, the image sensor gain or brightness value can be used to distinguish different gears according to the intensity of scene illumination, and different parameter groups are used for different scenes to ensure that this method can be applied to different scenes such as indoors, outdoors, during the day, and at night. Specifically, the ISP has the function of detecting brightness LUX (brightness unit), and different gear parameters such as 100, 200, 300, 400... can be set. Linearization is performed before the gear, so that different LUX values ​​are different for different scenes, and different parameter groups can be used.

[0185] In some embodiments, the above Figure 7 Each step of the process shown has a corresponding functional module. For example, see Fig. 9 , the processes executed by each module include:

[0186] S901, a first acquisition module, obtains pixel values ​​of a current image block in a current frame.

[0187] The first acquisition module is implemented before demosaicing, that is, completed in the RAW domain. At the same time, the module is designed to be completed before black level, lens shading correction and RAW noise reduction to avoid image pixel changes introduced by these modules.

[0188] S902: A second acquisition module acquires an average value of pixel values ​​of image blocks in the same area of ​​the previous N frames of images.

[0189] S903: A third acquisition module acquires an average value of color values ​​of image blocks in the same area of ​​N frames of images.

[0190] S904: The first calculation module calculates the color value of the current image block of the current frame. The color value of the current image block of the current frame is calculated according to the pixel value of the current image block of the current frame acquired by the first acquisition module.

[0191] S905 , a second calculation module, using the above formula 1 to obtain a first comparison value V1 according to the pixel value obtained by the first acquisition module and the average value of the pixel value obtained by the second acquisition module.

[0192] S906: A third calculation module obtains a second comparison value V2 using the above formula 2 according to the color value obtained by the first calculation module and the average value of the color value obtained by the third acquisition module.

[0193] S907, a fourth calculation module, according to V1 obtained by the second calculation module and V2 obtained by the third calculation module, adopts the above formula to perform three-weighted calculation to obtain a third comparison value V3.

[0194] S908. The detection module compares V3 obtained by the fourth calculation module with a preset motion threshold to obtain motion region information.

[0195] S909, a first storage module stores pixel values ​​of a current image block of a current frame for comparison and judgment of subsequent frames (ie, calculating an average value of pixel values ​​of image blocks in the same area of ​​N frames of images).

[0196] S910, a second storage module stores the color value of the current image block of the current frame for comparison and judgment of subsequent frames (ie, calculating the average color value of the image blocks in the same area of ​​N frames of images).

[0197] In some embodiments, the specific position relationship of the above modules in the motion detection device is as follows: Fig.10 As shown, for example:

[0198] The first acquisition module obtains the pixel value of the current image block of the current frame image. This module should be implemented before demosaicing, that is, completed in the RAW domain. At the same time, this module is designed to be completed before black level, lens shading correction and RAW noise reduction to avoid image pixel changes introduced by these modules. In theory, the pixel value output by the image sensor is obtained.

[0199] The second acquisition module obtains the average value of pixels of the image block in the same area of ​​the previous N frames of images, reads the recorded data from the memory, and N can be set to 1 to reduce the calculation of the average value. The length and width of the image can also be proportionally reduced to reduce memory usage.

[0200] The third acquisition module obtains the average color of the image block in the same area of ​​the preset N frames of image, reads the recorded data from the memory, and can set N to 1 to reduce the calculation of the average value. The image length and width can also be reduced to 1 / 2 to ensure that each pixel has corresponding R / G and B / G, which can also reduce the memory usage.

[0201] The first calculation module calculates the color value of the current image block of the current frame image. The color value of the current frame image is calculated according to the current frame pixel value obtained by the first acquisition module. The corresponding color value is calculated with a complete RGGB four pixels as the minimum unit, R / G is r / ((gr+gb) / 2)), B / G is b / ((gr+gb) / 2)).

[0202] The second calculation module calculates weighted values ​​to obtain a first comparison value V1 according to the average value of the pixel value of the first acquisition module and the pixel value of the second acquisition module. The weighted value can be configured through user communication.

[0203] The third calculation module calculates weighted values ​​to obtain a second comparison value V2 according to the average value of the color value obtained by the first calculation module and the color value obtained by the third acquisition module. The weighted value can be configured through user communication.

[0204] The fourth calculation module calculates a third comparison value V3 by weighted calculation according to V1 of the second calculation module and V2 of the third calculation module.

[0205] The detection module compares V3 of the fourth calculation module with a preset motion threshold to obtain motion area information.

[0206] In the embodiment of the present application, the motion information of the entire image can be obtained by comparing each block and each pixel, and then provided to the time domain noise reduction. The motion information of the entire image, that is, after all image blocks are compared, the position information of the pixel points in all motion areas needs to be stored, and then the information is passed to the noise reduction module for use.

[0207] The first storage module stores the pixel values ​​of each image block of the current frame, and stores the pixel values ​​of the current frame in the memory for use as an average value reference for the next frame. When the preset number of frames is set to 1 (i.e., N=1), the current frame can be used as a reference for the next frame, thereby reducing memory consumption.

[0208] The second storage module stores the color values ​​of each image block in the current frame, and stores the color values ​​of the current frame in the memory for use as an average value reference for the next frame. When the preset number of frames is set to 1 (i.e. N=1), the current frame can be used as a reference for the next frame, thereby reducing memory consumption.

[0209] It can be seen that in some embodiments, Fig.10 The motion detection device shown in is a module in the noise reduction module in the ISP. In the noise reduction module in the ISP, the motion detection device needs to receive the input signal of the image sensor, access the memory to obtain the preset frame information and store the current frame information, and output the motion information for time domain noise reduction.

[0210] In some embodiments, the first acquisition module in the motion detection device needs to acquire the image sensor image from the input module of the ISP, and the second acquisition module and the third acquisition module need to access the memory to read the pixel value and color value of the preset frame. The first calculation module, the second calculation module, the third calculation module, the fourth calculation module and the detection module are internal modules of the device, and do not interact with the outside and only perform calculation comparisons. Hardware is used for calculation during IP design.

[0211] In some embodiments, the first storage module and the second storage module write the pixel values ​​and color values ​​of each image block of the current frame into the memory for use in motion detection of the next frame of image.

[0212] In some embodiments, an electronic device (which may be any type of terminal device, such as a television, a computer, a mobile phone, etc.) provided in an embodiment of the present application includes, for example, a display. Fig.11 , and also include, for example:

[0213] The processor 600 is used to read the program in the memory 620 and execute the following process:

[0214] Acquire a current frame image, and divide the current frame image into a plurality of image blocks according to a preset method;

[0215] For each of the image blocks:

[0216] Determine a first comparison result between a pixel value of the image block and a pixel value of an image block in the same region in the previous N frames of images, and determine a second comparison result between a color value of the image block and a color value of an image block in the same region in the previous N frames of images;

[0217] Determine, based on the first comparison result and the second comparison result, a third comparison result of the color temperature of the image block and the color temperature of the image block in the same area in the previous N frames of images;

[0218] Wherein, N is an integer greater than or equal to 1;

[0219] When the third comparison result is greater than or equal to a preset threshold, the area corresponding to the image block is determined to be a motion area where a moving target exists; when the third comparison result is less than the preset threshold, motion detection is continued for the next frame of image.

[0220] In some embodiments, determining a first comparison result between the pixel value of the image block and the pixel value of the image block in the same area in the previous N frames of images includes:

[0221] Determine the pixel value of the image block and the average value of the pixel values ​​of the image blocks in the same area in the previous N frames of images;

[0222] Determine the absolute value of the difference between the pixel value of the image block and the average value of the pixel values ​​of the image blocks in the same area in the previous N frames of images;

[0223] Based on the absolute value of the difference, a first comparison result between the pixel value of the image block and the pixel value of the image block in the same area in the previous N frames of images is determined.

[0224] In some embodiments, determining a first comparison result between the pixel value of the image block and the pixel value of the image block in the same area in the previous N frames of images based on the absolute value of the difference includes:

[0225] The absolute value of the difference is multiplied by a preset weight value of the pixel value change, and then a preset compensation value of the pixel value change is added to obtain the first comparison result of the image block.

[0226] In some embodiments, determining a second comparison result of the color value of the image block and the color value of the image block in the same area in the previous N frames of images includes:

[0227] Determine a first color value and a second color value of the image block, and an average value of the first color value and an average value of the second color value of the image block in the same area in the first N frames of images;

[0228] Determine a first absolute value of a difference between a first color value of the image block and an average value of first color values ​​of image blocks in the same region in the first N frames of images; and determine a second absolute value of a difference between a second color value of the image block and an average value of second color values ​​of image blocks in the same region in the first N frames of images;

[0229] Based on the first absolute value and the second absolute value, a second comparison result of the color value of the image block and the color value of the image block in the same area in the previous N frames of images is determined.

[0230] In some embodiments, determining, based on the first absolute value and the second absolute value, a second comparison result of the color value of the image block and the color value of the image block in the same area in the previous N frames of images includes:

[0231] The sum of the first absolute value and the second absolute value is multiplied by a preset weight value of the color value change, and then added with a preset compensation value of the color value change to obtain the second comparison result of the image block.

[0232] In some embodiments, determining, based on the first comparison result and the second comparison result, a third comparison result of the color temperature of the image block and the color temperature of the image block in the same area in the previous N frames of images includes:

[0233] The first comparison result and the second comparison result are weightedly summed to obtain a third comparison result of the color temperature of the image block and the color temperature of the image block in the same area in the previous N frames of images.

[0234] In some embodiments, the processor 600 is further configured to read a program in the memory 620 and execute the following process:

[0235] Performing time domain noise reduction processing on the image blocks in the motion area of ​​the current frame image.

[0236] The transceiver 610 is configured to receive and send data under the control of the processor 600 .

[0237] Among them, Fig.11 In the embodiment, the bus architecture may include any number of interconnected buses and bridges, specifically one or more processors represented by processor 600 and various circuits of memory represented by memory 620 are linked together. The bus architecture may also link together various other circuits such as peripherals, voltage regulators, and power management circuits, which are well known in the art and are therefore not further described herein. The bus interface provides an interface. The transceiver 610 may be a plurality of components, namely, a transmitter and a receiver, providing a unit for communicating with various other devices on a transmission medium, including wireless channels, wired channels, optical cables, and other transmission media. For different user devices, the user interface 630 may also be an interface capable of externally and internally connecting required devices, and the connected devices include but are not limited to a keypad, a display, a speaker, a microphone, a joystick, and the like.

[0238] The processor 600 is responsible for managing the bus architecture and general processing, and the memory 620 can store data used by the processor 600 when performing operations.

[0239] In some embodiments, the processor 600 may be a CPU (central processing unit), an ASIC (Application Specific Integrated Circuit), an FPGA (Field-Programmable Gate Array) or a CPLD (Complex Programmable Logic Device), and the processor may also adopt a multi-core architecture.

[0240] The processor calls the computer program stored in the memory to execute any of the methods provided in the embodiments of the present application according to the obtained executable instructions. The processor and the memory can also be arranged physically separately.

[0241] It should be noted here that the above-mentioned device provided in the embodiment of the present application can implement all the method steps implemented in the above-mentioned method embodiment, and can achieve the same technical effect. The parts and beneficial effects of this embodiment that are the same as those in the method embodiment will not be described in detail here.

[0242] In some embodiments, Figure 6 The method flow shown corresponds to Fig.12 , a motion detection device provided in an embodiment of the present application includes:

[0243] The first unit 11 is used to obtain a current frame image and divide the current frame image into a plurality of image blocks according to a preset method;

[0244] The second unit 12 is configured to: for each of the image blocks:

[0245] Determine a first comparison result between a pixel value of the image block and a pixel value of an image block in the same region in the previous N frames of images, and determine a second comparison result between a color value of the image block and a color value of an image block in the same region in the previous N frames of images;

[0246] Determine, based on the first comparison result and the second comparison result, a third comparison result of the color temperature of the image block and the color temperature of the image block in the same area in the previous N frames of images;

[0247] Wherein, N is an integer greater than or equal to 1;

[0248] When the third comparison result is greater than or equal to a preset threshold, the area corresponding to the image block is determined to be a motion area where a moving target exists; when the third comparison result is less than the preset threshold, motion detection is continued for the next frame of image.

[0249] In some embodiments, determining a first comparison result between the pixel value of the image block and the pixel value of the image block in the same area in the previous N frames of images includes:

[0250] Determine the pixel value of the image block and the average value of the pixel values ​​of the image blocks in the same area in the previous N frames of images;

[0251] Determine the absolute value of the difference between the pixel value of the image block and the average value of the pixel values ​​of the image blocks in the same area in the previous N frames of images;

[0252] Based on the absolute value of the difference, a first comparison result between the pixel value of the image block and the pixel value of the image block in the same area in the previous N frames of images is determined.

[0253] In some embodiments, determining a first comparison result between the pixel value of the image block and the pixel value of the image block in the same area in the previous N frames of images based on the absolute value of the difference includes:

[0254] The absolute value of the difference is multiplied by a preset weight value of the pixel value change, and then a preset compensation value of the pixel value change is added to obtain the first comparison result of the image block.

[0255] In some embodiments, determining a second comparison result of the color value of the image block and the color value of the image block in the same area in the previous N frames of images includes:

[0256] Determine a first color value and a second color value of the image block, and an average value of the first color value and an average value of the second color value of the image block in the same area in the first N frames of images;

[0257] Determine a first absolute value of a difference between a first color value of the image block and an average value of first color values ​​of image blocks in the same region in the first N frames of images; and determine a second absolute value of a difference between a second color value of the image block and an average value of second color values ​​of image blocks in the same region in the first N frames of images;

[0258] Based on the first absolute value and the second absolute value, a second comparison result of the color value of the image block and the color value of the image block in the same area in the previous N frames of images is determined.

[0259] In some embodiments, determining, based on the first absolute value and the second absolute value, a second comparison result of the color value of the image block and the color value of the image block in the same area in the previous N frames of images includes:

[0260] The sum of the first absolute value and the second absolute value is multiplied by a preset weight value of the color value change, and then added with a preset compensation value of the color value change to obtain the second comparison result of the image block.

[0261] In some embodiments, determining, based on the first comparison result and the second comparison result, a third comparison result of the color temperature of the image block and the color temperature of the image block in the same area in the previous N frames of images includes:

[0262] The first comparison result and the second comparison result are weightedly summed to obtain a third comparison result of the color temperature of the image block and the color temperature of the image block in the same area in the previous N frames of images.

[0263] In some embodiments, the second unit 12 is further configured to:

[0264] Performing time domain noise reduction processing on the image blocks in the motion area of ​​the current frame image.

[0265] It should be noted that the division of units in the embodiments of the present application is schematic and is only a logical function division. There may be other division methods in actual implementation. In addition, each functional unit in each embodiment of the present application may be integrated into a processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0266] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) or a processor (processor) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory, ROM), random access memory (Random Access Memory, RAM), disk or optical disk and other media that can store program codes.

[0267] Any of the devices or apparatuses provided in the embodiments of the present application may specifically be a desktop computer, a portable computer, a smart phone, a tablet computer, a personal digital assistant (PDA), etc. It may include a central processing unit (CPU), a memory, an input / output device, etc. The input device may include a keyboard, a mouse, a touch screen, etc. The output device may include a display device, such as a liquid crystal display (LCD), a cathode ray tube (CRT), etc.

[0268] The memory may include a read-only memory (ROM) and a random access memory (RAM), and provides the processor with program instructions and data stored in the memory. In an embodiment of the present application, the memory may be used to store the program of any of the methods provided in the embodiments of the present application.

[0269] The processor calls the program instructions stored in the memory, and the processor is used to execute any of the methods provided in the embodiments of the present application according to the obtained program instructions.

[0270] The present application embodiment also provides a computer program product or computer program, which includes a computer instruction, which is stored in a computer-readable storage medium. The processor of the computer device reads the computer instruction from the computer-readable storage medium, and the processor executes the computer instruction so that the computer device executes any of the methods described in the above embodiments. The program product can use any combination of one or more readable media. The readable medium can be a readable signal medium or a readable storage medium. The readable storage medium can be, for example, - but not limited to - an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of readable storage media (non-exhaustive list) include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.

[0271] The embodiment of the present application provides a computer-readable storage medium for storing computer program instructions used by the apparatus provided in the embodiment of the present application, which includes a program for executing any of the methods provided in the embodiment of the present application. The computer-readable storage medium may be a non-transitory computer-readable medium.

[0272] The computer-readable storage medium can be any available medium or data storage device that can be accessed by a computer, including but not limited to magnetic storage (such as floppy disks, hard disks, magnetic tapes, magneto-optical disks (MO), etc.), optical storage (such as CD, DVD, BD, HVD, etc.), and semiconductor storage (such as ROM, EPROM, EEPROM, non-volatile memory (NANDFLASH), solid-state drive (SSD)), etc.

[0273] It should be understood that:

[0274] The access technology through which entities in the communication network transmit traffic can be any suitable current or future technology, such as WLAN (Wireless Local Access Network), WiMAX (Worldwide Interoperability for Microwave Access), LTE, LTE-A, 5G, Bluetooth, infrared, etc.; in addition, the embodiments can also apply wired technology, for example, IP-based access technology, such as a wired network or a fixed line.

[0275] Embodiments suitable for being implemented as software code or a portion thereof and running using a processor or processing functionality are independent of the software code and may be specified using any known or future developed programming language, such as a high-level programming language such as objective-C, C, C++, C#, Java, Python, Javascript, other scripting languages, etc., or a low-level programming language such as machine language or assembler.

[0276] The implementation of the embodiments is hardware independent and may be implemented using any known or future developed hardware technology or any mixture thereof, such as a microprocessor or CPU (central processing unit), MOS (metal oxide semiconductor), CMOS (complementary MOS), BiMOS (bipolar MOS), BiCMOS (bipolar CMOS), ECL (emitter coupled logic) and / or TTL (transistor-transistor logic).

[0277] Embodiments may be implemented as separate devices, apparatuses, units, components, or functions, or in a distributed manner, for example, one or more processors or processing functions may be used or shared in a process, or one or more processing segments or processing portions may be used and shared in a process, wherein one physical processor or more than one physical processor may be used to implement one or more processing portions dedicated to a specific process as described.

[0278] The device may be implemented by a semiconductor chip, a chipset, or a (hardware) module including such a chip or chipset.

[0279] The embodiments may also be implemented as any combination of hardware and software, such as ASIC (Application Specific IC (Integrated Circuit)) components, FPGA (Field Programmable Gate Array) or CPLD (Complex Programmable Logic Device) components or DSP (Digital Signal Processor) components.

[0280] The embodiments may also be implemented as a computer program product including a computer usable medium having computer readable program code embodied therein, the computer readable program code being adapted to perform the processes as described in the embodiments, wherein the computer usable medium may be a non-transitory medium.

[0281] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage and optical storage, etc.) that contain computer-usable program code.

[0282] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0283] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0284] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.

[0285] Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.

Claims

1. A motion detection method, characterized in that: The method comprises: Acquire a current frame image, and divide the current frame image into a plurality of image blocks according to a preset method; For each of the image blocks: Determine a first comparison result between a pixel value of the image block and a pixel value of an image block in the same region in the previous N frames of images, and determine a second comparison result between a color value of the image block and a color value of an image block in the same region in the previous N frames of images; Determine, based on the first comparison result and the second comparison result, a third comparison result of the color temperature of the image block and the color temperature of the image block in the same area in the previous N frames of images; Wherein, N is an integer greater than or equal to 1; When the third comparison result is greater than or equal to a preset threshold, the area corresponding to the image block is determined to be a motion area where a moving target exists; when the third comparison result is less than the preset threshold, motion detection is continued for the next frame of image.

2. The method according to claim 1, characterized in that The determining of a first comparison result between the pixel value of the image block and the pixel value of the image block in the same area in the previous N frames of images includes: Determine the pixel value of the image block and the average value of the pixel values ​​of the image blocks in the same area in the previous N frames of images; Determine the absolute value of the difference between the pixel value of the image block and the average value of the pixel values ​​of the image blocks in the same area in the previous N frames of images; Based on the absolute value of the difference, a first comparison result between the pixel value of the image block and the pixel value of the image block in the same area in the previous N frames of images is determined.

3. The method according to claim 2, characterized in that The first comparison result is determined using the following formula: V1=|I-Ia|*Lgain+Loffset; Wherein, V1 is the first comparison result; I is the pixel value of the image block; Ia is the average value of the pixel values ​​of the image blocks in the same area in the first N frames of images; Lgain is the preset weight value of pixel value change; Loffset is a preset compensation value for pixel value change.

4. The method according to claim 1, characterized in that: The determining of a second comparison result of the color value of the image block and the color value of the image block in the same area in the previous N frames of images includes: Determine a first color value and a second color value of the image block, and an average value of the first color value and an average value of the second color value of the image block in the same area in the first N frames of images; Determine a first absolute value of a difference between a first color value of the image block and an average value of first color values ​​of image blocks in the same region in the first N frames of images; and determine a second absolute value of a difference between a second color value of the image block and an average value of second color values ​​of image blocks in the same region in the first N frames of images; Based on the first absolute value and the second absolute value, a second comparison result of the color value of the image block and the color value of the image block in the same area in the previous N frames of images is determined.

5. The method according to claim 4, characterized in that The second comparison result is determined using the following formula: V2=(|R / GR / Ga|+|B / GB / Ga|)*Cgain+Coffset; Wherein, V2 is the second comparison result; R / G is the first color value of the image block; B / G is the second color value of the image block; R / Ga is the average value of the first color values ​​of the image blocks in the same area of ​​the first N frames of images; B / Ga is the average value of the second color values ​​of the image blocks in the same area of ​​the first N frames of images; Cgain is the preset weight value of color change; Coffset is the preset color change compensation value.

6. The method according to claim 1, characterized in that The third comparison result is determined using the following formula: V3=G1*V1+G2*V2; Wherein, V3 is the third comparison result; G1 is a preset first weighted value; V1 is the first comparison result; G2 is a preset second weighted value; V2 is the second comparison result.

7. The method according to claim 1, characterized in that The method further comprises: Performing time domain noise reduction processing on the image blocks in the motion area of ​​the current frame image.

8. A motion detection device, characterized in that: The device comprises: The first unit is used to obtain a current frame image and divide the current frame image into a plurality of image blocks according to a preset method; The second unit is configured to: for each of the image blocks: Determine a first comparison result between a pixel value of the image block and a pixel value of an image block in the same region in the previous N frames of images, and determine a second comparison result between a color value of the image block and a color value of an image block in the same region in the previous N frames of images; Determine, based on the first comparison result and the second comparison result, a third comparison result of the color temperature of the image block and the color temperature of the image block in the same area in the previous N frames of images; Wherein, N is an integer greater than or equal to 1; When the third comparison result is greater than or equal to a preset threshold, the area corresponding to the image block is determined to be a motion area where a moving target exists; when the third comparison result is less than the preset threshold, motion detection is continued for the next frame of image.

9. An electronic device, characterized in that: include: A memory for storing program instructions; A processor, configured to call the program instructions stored in the memory, and execute the method according to any one of claims 1 to 7 according to the obtained program.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, and the computer-executable instructions are used to enable the computer to execute the method according to any one of claims 1 to 7.

Citation Information

Cited By

  • Method and equipment for monitoring personnel intrusion in operation area of scraper conveyor and medium

    CN120635808A

  • A method, apparatus, and medium for monitoring personnel intrusion in a flight zone of a dragline

    CN120635808B