Package detection method and device
By using the partitioning method of fixed macroblocks and dynamic macroblocks in the package detection technology, combining the stability difference value and target classification, the problem of low parcel judgment accuracy in the prior art is solved, and a higher detection accuracy and faster detection speed are achieved.
Patent Information
- Application Number
- CN202111147451.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-09-28
- Publication Date
- 2025-05-16
- Estimated Expiration
- 2041-09-28
AI Technical Summary
When existing package detection technology determines whether the image contains a package, it is prone to misjudgment, resulting in low accuracy of package judgment.
By obtaining the image data of the object to be detected, dividing it into fixed macroblocks and dynamic macroblocks, calculating the stability difference of the image data, dynamically dividing the macroblocks for target classification, counting the number of dynamic macroblocks and the number of package targets of each macroblock, and determining whether it belongs to the package area.
It improves the accuracy of package detection, reduces unnecessary calculations, improves detection speed, reduces misjudgment situations, and is suitable for edge devices.
Smart Images

Figure CN113989734B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of image processing, and in particular to a package detection method and device. Background Art
[0002] With the increasing development of image processing technology, cameras have been integrated into all walks of life. Package detection has become an important function in the home and commercial camera market.
[0003] Existing package detection technology usually uses a camera to acquire and analyze package images. However, the existing technology can only determine whether an image contains a package. It is easy to misjudge a non-package as a package or a package as a non-package, resulting in low accuracy in package judgment. Summary of the invention
[0004] The technical problem to be solved by the embodiments of the present invention is to provide a package detection method and device to improve the accuracy of package detection.
[0005] In order to solve the above technical problems, in a first aspect, an embodiment of the present invention provides a package detection method, comprising:
[0006] Acquire image data of the object to be detected, and divide the image in the image data into M fixed macroblocks;
[0007] Calculating a first stability and a second stability of the image data based on two different parameters, and calculating a stability difference between the first stability and the second stability;
[0008] Dividing the image into Q dynamic macroblocks according to the stability difference; wherein Q>M;
[0009] Performing target classification on each of the dynamic macroblocks, and counting the total number of dynamic macroblocks in each of the fixed macroblocks and the first number of dynamic macroblocks containing a preset package target;
[0010] Determining whether each of the fixed macroblocks belongs to the wrapping area according to the total number of dynamic macroblocks and the ratio of the first number to the total number of dynamic macroblocks, and counting the second number of fixed macroblocks belonging to the wrapping area;
[0011] Whether the object to be detected is a package is determined according to the ratio of the second number to the total number of fixed macroblocks.
[0012] As a preferred solution, in a region where the stability difference is higher, the size of the dynamic macroblock is smaller.
[0013] As a preferred solution, the first stability is the variance or entropy of the image data, and the second stability is the variance or entropy of the image data.
[0014] As a preferred solution, the target classification of each dynamic macroblock is specifically as follows:
[0015] Performing target classification on each of the dynamic macroblocks through a deep learning model, and determining that the dynamic macroblock contains a preset package target when the dynamic macroblock meets a first target classification condition;
[0016] or,
[0017] Calculating the Euclidean distance of the image grayscale channel of each dynamic macroblock, and determining that the dynamic macroblock contains a preset package target when the Euclidean distance meets the second target classification condition;
[0018] or,
[0019] The color similarity of each of the dynamic macroblocks is calculated, and when the color similarity satisfies a third target classification condition, it is determined to contain a preset package target.
[0020] As a preferred solution, judging whether each of the fixed macroblocks belongs to the wrapping area according to the total number of dynamic macroblocks and the ratio of the first number to the total number of dynamic macroblocks is specifically as follows:
[0021] When the total number of dynamic macroblocks is greater than the first super parameter and the ratio is greater than the second super parameter, the fixed macroblock is determined to belong to the package area, otherwise, the fixed macroblock is determined to be a non-package area.
[0022] In order to solve the above technical problems, in a second aspect, an embodiment of the present invention provides a package detection device, including:
[0023] A fixed macroblock division module, used for acquiring image data of an object to be detected, and dividing an image in the image data into M fixed macroblocks;
[0024] a stability difference calculation module, configured to calculate a first stability and a second stability of the image data based on two different parameters, and calculate a stability difference between the first stability and the second stability;
[0025] A dynamic macroblock division module, used for dividing the image into Q dynamic macroblocks according to the stability difference; wherein Q<M;
[0026] A target classification module, used for performing target classification on each of the dynamic macroblocks, and counting the total number of dynamic macroblocks in each of the fixed macroblocks and the first number of dynamic macroblocks containing a preset package target;
[0027] a fixed macroblock determination module, configured to determine whether each of the fixed macroblocks belongs to a wrapping area according to the total number of dynamic macroblocks and the ratio of the first number to the total number of dynamic macroblocks, and to count a second number of fixed macroblocks belonging to the wrapping area;
[0028] A package determination module is used to determine whether the object to be detected is a package according to the ratio of the second number to the total number of fixed macroblocks.
[0029] As a preferred solution, in a region where the stability difference is higher, the size of the dynamic macroblock is smaller.
[0030] As a preferred solution, the first stability is the variance or entropy of the image data, and the second stability is the variance or entropy of the image data.
[0031] As a preferred solution, the target classification module specifically includes:
[0032] A first fixed macroblock determination unit is used to perform target classification on each of the dynamic macroblocks through a deep learning model, and when the dynamic macroblock meets a first target classification condition, determine that the dynamic macroblock contains a preset package target;
[0033] A second fixed macroblock determination unit is used to calculate the Euclidean distance of the image grayscale channel of each of the dynamic macroblocks, and when the Euclidean distance meets the second target classification condition, it is determined to contain a preset package target;
[0034] A third fixed macroblock determination unit is used to calculate the color similarity of each of the dynamic macroblocks, and when the color similarity satisfies a third target classification condition, determine that the dynamic macroblock contains a preset package target;
[0035] The quantity counting unit is used to count the total quantity of dynamic macroblocks in each of the fixed macroblocks and the first quantity of dynamic macroblocks containing a preset encapsulation target.
[0036] As a preferred solution, the fixed macroblock determination module is specifically used for:
[0037] When the total number of dynamic macroblocks is greater than the first super parameter and the ratio is greater than the second super parameter, the fixed macroblock is determined to belong to the package area, otherwise, the fixed macroblock is determined to be a non-package area.
[0038] Compared with the prior art, the package detection method and device provided by the embodiments of the present invention have the following beneficial effects: performing package detection based on fixed macroblocks and dynamic macroblocks has good adaptability, can greatly reduce unnecessary calculation amount, improve detection speed, and has multi-step judgment during detection, can greatly reduce the occurrence of misjudgment and improve detection accuracy; in addition, performing package detection based on fixed macroblocks and dynamic macroblocks does not require training of neural network models, and can run on various edge devices. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] In order to more clearly illustrate the technical features of the embodiments of the present invention, the drawings required for use in the embodiments of the present invention will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without paying any creative work.
[0040] Figure 1 It is a flow chart of a preferred embodiment of a package detection method provided by the present invention;
[0041] Figure 2 It is a structural schematic diagram of a preferred embodiment of a package detection device provided by the present invention;
[0042] Figure 3 It is a structural schematic diagram of a preferred embodiment of a package detection device provided by the present invention. DETAILED DESCRIPTION
[0043] In order to have a clearer understanding of the technical features, purposes and effects of the present invention, the specific embodiments of the present invention are further described in detail below in conjunction with the accompanying drawings and examples. The following examples are only used to illustrate the present invention, but are not intended to limit the scope of protection of the present invention. Based on the embodiments of the present invention, other embodiments obtained by those skilled in the art without paying creative work should all belong to the scope of protection of the present invention.
[0044] In the description of the present invention, it should be understood that the numbers themselves, such as "first", "second", etc., are only used to distinguish the objects described, have no sequential or technical meaning, and cannot be understood as stipulating or implying the importance of the objects described.
[0045] Figure 1 Shown is a flow chart of a preferred embodiment of a package detection method provided by the present invention.
[0046] like Figure 1 As shown, the method includes:
[0047] S10: Acquire image data of the object to be detected, and divide the image in the image data into M fixed macroblocks;
[0048] S20: calculating a first stability and a second stability of the image data based on two different parameters, and calculating a stability difference between the first stability and the second stability;
[0049] S30: Divide the image into Q dynamic macroblocks according to the stability difference; wherein Q<M;
[0050] S40: performing target classification on each of the dynamic macroblocks, and counting the total number of dynamic macroblocks in each of the fixed macroblocks and the first number of dynamic macroblocks containing a preset encapsulation target;
[0051] S50: judging whether each of the fixed macroblocks belongs to the package area according to the total number of dynamic macroblocks and the ratio of the first number to the total number of dynamic macroblocks, and counting the second number of fixed macroblocks belonging to the package area;
[0052] S60: Determine whether the object to be detected is a package according to the ratio of the second number to the total number of fixed macroblocks.
[0053] In the specific implementation of the present invention, first, image data of the object to be detected is obtained, wherein the image data can be in the form of a time-series sequence of images or a video, represented as P1, P2, ..., P n , and each frame image P in the sequence P k Divided into M fixed macroblocks B1, B2, ..., B M , M is a positive integer.
[0054] Secondly, for each frame image P in the sequence P k Model each pixel, count the historical statistical information of each pixel, that is, count the value of each pixel in the previous n frames, and calculate the first stability and the second stability based on two different parameters, and then calculate the difference between the first stability and the second stability. The stability of the image data is the stability of the pixel, which means the stability of the pixel. For example, if a pixel is always flashing, its stability is low. The measurement methods of stability include but are not limited to variance, entropy, etc.
[0055] Specifically, taking variance as an example, the calculation formula of the first stability is:
[0056]
[0057] In formula (1), S ij is the first stability, n is the number of frames, p1 is the first parameter, p1 is a positive integer greater than or equal to 1, Yij is the grayscale value or color value of pixel (i, j), and E represents the mathematical expectation;
[0058] The second stability is calculated as follows:
[0059]
[0060] In formula (2), Q ij is the second stability, n is the number of frames, p2 is the second parameter, p2 is a positive integer greater than or equal to 1, and p2≠p1, Y ij is the grayscale value or color value of pixel (i, j), and E represents the mathematical expectation.
[0061] The calculation formula of the stability difference is:
[0062] D ij =|S ij -Q ij | (3);
[0063] In formula (3), D ij is the stability difference.
[0064] Then, based on the stability difference, the image is divided into Q dynamic macroblocks DB1, DB2, ..., DB Q , Q is a positive integer greater than M. Wherein, the higher the stability difference value is in a region, the smaller the size of the dynamic macroblock is; and the lower the stability difference value is in a region, the larger the size of the dynamic macroblock is.
[0065] As an example, the boundaries r,l,b,t of a dynamic macroblock are determined by:
[0066]
[0067] In formula (4), r(right) is the right boundary, l(left) is the left boundary, b(bottom) is the bottom boundary, t(top) is the top boundary, and T D is the hyperparameter set, T D The role of is: as a stability threshold, that is, the dynamic macroblock instability threshold, to find the maximum area with dynamic macroblock stability so that the stability of the area does not exceed this limit.
[0068] Next, target classification is performed on each of the dynamic macroblocks M, and the total number N of dynamic macroblocks M in each of the fixed macroblocks B is counted. T , and counting a first number N of dynamic macroblocks containing a preset package target P .
[0069] It should be noted that the target classification method can use the features of the image to classify, including but not limited to color, texture, shape, etc., which can be implemented in any way:
[0070] (1) performing target classification on each of the dynamic macroblocks through a deep learning model, and determining that the dynamic macroblock contains a preset package target when the dynamic macroblock meets a first target classification condition;
[0071] (2) calculating the Euclidean distance of the image grayscale channel of each dynamic macroblock, and determining that the dynamic macroblock contains a preset package target when the Euclidean distance meets the second target classification condition;
[0072] (3) Calculating the color similarity of each of the dynamic macroblocks, and determining that the dynamic macroblock contains a preset package target when the color similarity satisfies a third target classification condition.
[0073] Then, according to the total number N of dynamic macroblocks M in each fixed macroblock B T and a first number N of dynamic macroblocks containing a preset wrapping target P , determine whether the fixed macroblock belongs to the parcel area, the judgment formula is as follows:
[0074]
[0075] In formula (5), B=1 indicates that the fixed macroblock is a parcel area, and B=0 indicates that the fixed macroblock is a non-parcel area, that is, when the total number of dynamic macroblocks is greater than the first hyperparameter and the ratio is greater than the second hyperparameter, the fixed macroblock is determined to belong to the parcel area, otherwise, the fixed macroblock is determined to be a non-parcel area; T PKG 、T BLK To set the hyperparameters, T PKG is the ratio threshold of the area belonging to the package, T BLK The dynamic macroblock threshold for the area to belong to the package.
[0076] After determining whether each fixed macroblock belongs to the package area, a second number N of all fixed macroblocks belonging to the package area is counted. B .
[0077] Finally, the second number N is calculated B Ratio to the total number of fixed macroblocks M:
[0078]
[0079] Then compare the result obtained by formula (6) with the package ratio value ρ0. When ρ is greater than ρ0, the object to be detected is determined to be a package. When ρ is not greater than ρ0, the object to be detected is determined not to be a package.
[0080] Among them, the value of ρ0 is determined by the number of dynamic macroblocks and fixed macroblocks, that is:
[0081] ρ0=f(M,Q) (7)
[0082] A package detection method provided by the present invention performs package detection based on fixed macroblocks and dynamic macroblocks, has good adaptability, can greatly reduce unnecessary calculation amount, improve detection speed, and has multi-step judgment during detection, which can greatly reduce the occurrence of misjudgment and improve detection accuracy; in addition, package detection based on fixed macroblocks and dynamic macroblocks does not require training of neural network models and can run on various edge devices.
[0083] It should be understood that the present invention can implement all or part of the processes in the above-mentioned package detection method by instructing related hardware through a computer program. The computer program can be stored in a computer-readable storage medium. When the computer program is executed by a processor, the steps of the above-mentioned package detection method can be implemented. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, USB flash drive, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electric carrier signal, telecommunication signal and software distribution medium. It should be noted that the content contained in the computer-readable medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, the computer-readable medium does not include electric carrier signals and telecommunication signals.
[0084] Figure 2 The figure shows a schematic structural diagram of a preferred embodiment of a package detection device provided by the present invention. The device can implement the entire process of the package detection method described in any of the above embodiments and achieve the corresponding technical effects.
[0085] like Figure 2 As shown, the device comprises:
[0086] A fixed macroblock division module 21 is used to obtain image data of the object to be detected and divide the image in the image data into M fixed macroblocks;
[0087] A stability difference calculation module 22, configured to calculate a first stability and a second stability of the image data based on two different parameters, and calculate a stability difference between the first stability and the second stability;
[0088] A dynamic macroblock division module 23, configured to divide the image into Q dynamic macroblocks according to the stability difference; wherein Q>M;
[0089] The target classification module 24 is used to perform target classification on each of the dynamic macroblocks, and count the total number of dynamic macroblocks in each of the fixed macroblocks and the first number of dynamic macroblocks containing a preset package target;
[0090] The fixed macroblock determination module 25 is used to determine whether each of the fixed macroblocks belongs to the package area according to the total number of dynamic macroblocks and the ratio of the first number to the total number of dynamic macroblocks, and to count the second number of fixed macroblocks belonging to the package area;
[0091] The package determination module 26 is used to determine whether the object to be detected is a package according to the ratio of the second number to the total number of fixed macroblocks.
[0092] In a preferred embodiment, in the image, the area where the stability difference is higher, the size of the dynamic macroblock is smaller; and the area where the stability difference is lower, the size of the dynamic macroblock is larger.
[0093] In a preferred embodiment, the first stability is the variance or entropy of the image data, and the second stability is the variance or entropy of the image data.
[0094] Preferably, the calculation formula of the first stability is:
[0095]
[0096] The second stability is calculated as follows:
[0097]
[0098] The calculation formula of the stability difference is:
[0099] D ij =|S ij -Q ij |.
[0100] The boundaries r, l, b, t of dynamic macroblocks are determined by the following formula:
[0101]
[0102] In a preferred embodiment, the target classification module 24 specifically includes:
[0103] A first fixed macroblock determination unit is used to perform target classification on each of the dynamic macroblocks through a deep learning model, and when the dynamic macroblock meets a first target classification condition, determine that the dynamic macroblock contains a preset package target;
[0104] A second fixed macroblock determination unit is used to calculate the Euclidean distance of the image grayscale channel of each of the dynamic macroblocks, and when the Euclidean distance meets the second target classification condition, it is determined to contain a preset package target;
[0105] A third fixed macroblock determination unit is used to calculate the color similarity of each of the dynamic macroblocks, and when the color similarity satisfies a third target classification condition, determine that the dynamic macroblock contains a preset package target;
[0106] The quantity counting unit is used to count the total quantity of dynamic macroblocks in each of the fixed macroblocks and the first quantity of dynamic macroblocks containing a preset encapsulation target.
[0107] Preferably, the judgment formula for whether a fixed macroblock belongs to a wrapping area is:
[0108]
[0109] In a preferred embodiment, the fixed macroblock determination module 25 is specifically used for:
[0110] When the total number of dynamic macroblocks is greater than the first super parameter and the ratio is greater than the second super parameter, the fixed macroblock is determined to belong to the package area, otherwise, the fixed macroblock is determined to be a non-package area.
[0111] The calculation formula for the ratio of the second number to the total number of fixed macroblocks is:
[0112]
[0113] After obtaining ρ, it is compared with the package ratio value ρ0. When ρ is greater than ρ0, the object to be detected is determined to be a package. When ρ is not greater than ρ0, the object to be detected is determined not to be a package.
[0114] Among them, the value of ρ0 is determined by the number of dynamic macroblocks and fixed macroblocks, that is:
[0115] ρ0=f(M,Q).
[0116] Figure 3 The figure shows a schematic structural diagram of a preferred embodiment of a package detection device provided by the present invention. The device can implement the entire process of the package detection method described in any of the above embodiments and achieve the corresponding technical effects.
[0117] like Figure 3 As shown, the device includes:
[0118] A memory 31, used for storing computer programs;
[0119] A processor 32, configured to execute the computer program;
[0120] Wherein, when the processor 32 executes the computer program, the package detection method as described in any of the above embodiments is implemented.
[0121] Exemplarily, the computer program may be divided into one or more modules / units, which are stored in the memory 31 and executed by the processor 32 to implement the present invention. The one or more modules / units may be a series of computer program instruction segments capable of implementing specific functions, which are used to describe the execution process of the computer program in the package detection device.
[0122] The processor 32 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc.
[0123] The memory 31 can be used to store the computer program and / or module, and the processor 32 realizes various functions of the package detection device by running or executing the computer program and / or module stored in the memory 31, and calling the data stored in the memory 31. The memory 31 can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc.; the data storage area can store data created according to the use of the mobile phone (such as audio data, a phone book, etc.), etc. In addition, the memory 31 can include a high-speed random access memory, and can also include a non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), at least one disk storage device, a flash memory device, or other volatile solid-state storage devices.
[0124] It should be noted that the above-mentioned package detection device includes, but is not limited to, a processor and a memory. Those skilled in the art can understand that Figure 3 The structural diagram is merely an example of the above-mentioned package detection device and does not constitute a limitation on the package detection device. The device may include more components than shown in the figure, or a combination of certain components, or different components.
[0125] The above description is only a preferred embodiment of the present invention, but the protection scope of the present invention is not limited thereto. It should be pointed out that for those skilled in the art, several equivalent obvious variations and / or equivalent substitutions can be made without departing from the technical principles of the present invention. These obvious variations and / or equivalent substitutions should also be regarded as the protection scope of the present invention.
Claims
1. A package detection method, characterized in that: include: Acquire image data of the object to be detected, and divide the image in the image data into M fixed macroblocks; Calculating a first stability and a second stability of the image data based on two different parameters, and calculating a stability difference between the first stability and the second stability; Dividing the image into Q dynamic macroblocks according to the stability difference; wherein Q>M; Performing target classification on each of the dynamic macroblocks, and counting the total number of dynamic macroblocks in each of the fixed macroblocks and the first number of dynamic macroblocks containing a preset package target; Determining whether each of the fixed macroblocks belongs to the wrapping area according to the total number of dynamic macroblocks and the ratio of the first number to the total number of dynamic macroblocks, and counting the second number of fixed macroblocks belonging to the wrapping area; Determining whether the object to be detected is a package according to a ratio of the second number to the total number of fixed macroblocks; The stability of the image data is the stability of the pixel, which indicates the degree of stability of the pixel; In the image, the area with a higher stability difference has a smaller size of the dynamic macroblock.
2. The package detection method according to claim 1, characterized in that: The first stability is the variance or entropy of the image data, and the second stability is the variance or entropy of the image data.
3. The package detection method according to claim 1, characterized in that: The target classification of each dynamic macroblock is specifically as follows: Performing target classification on each of the dynamic macroblocks through a deep learning model, and determining that the dynamic macroblock contains a preset package target when the dynamic macroblock meets a first target classification condition; or, Calculating the Euclidean distance of the image grayscale channel of each dynamic macroblock, and determining that the dynamic macroblock contains a preset package target when the Euclidean distance meets the second target classification condition; or, The color similarity of each of the dynamic macroblocks is calculated, and when the color similarity satisfies a third target classification condition, it is determined to contain a preset package target.
4. The package detection method according to claim 1, characterized in that: The determining whether each of the fixed macroblocks belongs to the wrapping area according to the total number of dynamic macroblocks and the ratio of the first number to the total number of dynamic macroblocks is specifically: When the total number of dynamic macroblocks is greater than the first super parameter and the ratio is greater than the second super parameter, the fixed macroblock is determined to belong to the package area, otherwise, the fixed macroblock is determined to be a non-package area.
5. A package detection device, characterized in that: include: A fixed macroblock division module, used for acquiring image data of an object to be detected, and dividing an image in the image data into M fixed macroblocks; a stability difference calculation module, configured to calculate a first stability and a second stability of the image data based on two different parameters, and calculate a stability difference between the first stability and the second stability; A dynamic macroblock division module, used for dividing the image into Q dynamic macroblocks according to the stability difference; wherein Q>M; A target classification module, used for performing target classification on each of the dynamic macroblocks, and counting the total number of dynamic macroblocks in each of the fixed macroblocks and the first number of dynamic macroblocks containing a preset package target; a fixed macroblock determination module, configured to determine whether each of the fixed macroblocks belongs to a wrapping area according to the total number of dynamic macroblocks and the ratio of the first number to the total number of dynamic macroblocks, and to count a second number of fixed macroblocks belonging to the wrapping area; a package determination module, configured to determine whether the object to be detected is a package according to a ratio of the second number to the total number of fixed macroblocks; The stability of the image data is the stability of the pixel, which indicates the degree of stability of the pixel; In the image, the area with a higher stability difference has a smaller size of the dynamic macroblock.
6. The package detection device according to claim 5, characterized in that: The first stability is the variance or entropy of the image data, and the second stability is the variance or entropy of the image data.
7. The package detection device according to claim 5, characterized in that: The target classification module specifically includes: A first fixed macroblock determination unit is used to perform target classification on each of the dynamic macroblocks through a deep learning model, and when the dynamic macroblock meets a first target classification condition, determine that the dynamic macroblock contains a preset package target; A second fixed macroblock determination unit is used to calculate the Euclidean distance of the image grayscale channel of each of the dynamic macroblocks, and when the Euclidean distance meets the second target classification condition, it is determined to contain a preset package target; A third fixed macroblock determination unit is used to calculate the color similarity of each of the dynamic macroblocks, and when the color similarity satisfies a third target classification condition, determine that the macroblock contains a preset package target; The quantity counting unit is used to count the total quantity of dynamic macroblocks in each of the fixed macroblocks and the first quantity of dynamic macroblocks containing a preset encapsulation target.
8. The package detection device according to claim 5, characterized in that: The fixed macroblock determination module is specifically used for: When the total number of dynamic macroblocks is greater than the first super parameter and the ratio is greater than the second super parameter, the fixed macroblock is determined to belong to the package area, otherwise, the fixed macroblock is determined to be a non-package area.
Citation Information
Patent Citations
Fire detection method and fire detection device
CN108335454A
Reference frame cache data compression method, computer device and computer readable storage medium
CN112887725A