CN109948626A - A kind of object detection method and device - Google Patents

A kind of object detection method and device Download PDF

Info

Publication number
CN109948626A
CN109948626A CN201910176247.1A CN201910176247A CN109948626A CN 109948626 A CN109948626 A CN 109948626A CN 201910176247 A CN201910176247 A CN 201910176247A CN 109948626 A CN109948626 A CN 109948626A
Authority
CN
China
Prior art keywords
pixel
detection
integrated value
detected
length
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201910176247.1A
Other languages
Chinese (zh)
Inventor
刘若堃
肖立波
张涛
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Wangwei Technology (zhejiang) Co Ltd
Original Assignee
Wangwei Technology (zhejiang) Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Wangwei Technology (zhejiang) Co Ltd filed Critical Wangwei Technology (zhejiang) Co Ltd
Priority to CN201910176247.1A priority Critical patent/CN109948626A/en
Publication of CN109948626A publication Critical patent/CN109948626A/en
Pending legal-status Critical Current

Links

Landscapes

  • Image Analysis (AREA)

Abstract

The invention discloses a kind of object detection method and device, method includes: acquisition image to be detected, and for the detection block size of image to be detected;And calculate the integrated value of each pixel;Judge whether the integrated value for detecting the pixel in frame region is greater than setting threshold value;If, it will test frame and slide the first step-length, obtain the pixel within the scope of correspondingly-sized, obtain the integrated value of each pixel, and return to execute the step of whether integrated value for detecting the pixel in frame region is greater than setting threshold value judged, it is completed until image to be detected is detected;If not, it will test frame and slide the first step-length, obtain the pixel within the scope of correspondingly-sized, obtain the integrated value of each pixel, and return to execute the step of whether integrated value for detecting the pixel in frame region is greater than setting threshold value judged, it is completed until image to be detected is detected.Using the embodiment of the present invention, the consumption of memory can be saved.

Description

A kind of object detection method and device
Technical field
The present invention relates to a kind of detection method and device, it is more particularly to a kind of object detection method and device.
Background technique
Image object detection has become important subject in machine vision, it is by image procossing, pattern-recognition etc. Subject organically combines, and forms a kind of technology that dbjective state is found, detected and judged from video image.Currently, a kind of ratio More common detection algorithm is the detection (being discussed in detail see chapter 5) of Harr feature, and the detection of Harr feature is in target detection A kind of effective technical method, needs that integrogram is cooperated to be further processed, and has that operation is low, there is certain recognition accuracy The features such as.
Currently, needing the integrated value by each pixel in image to be detected to count when carrying out the detection of Harr feature It calculates and is stored in memory, sliding detection then is carried out to image to be detected after calculating integral value using detection block, according to Integrogram characteristic, picture is bigger, and integrogram value is bigger.It is H with height, width is Harr characteristic value needs for the image of W The complete integrogram of two category feature value of sum, sqsum (for calculating variance) is saved simultaneously as a result, therefore, one time integrogram needs Preservation partial data size is H*W* (bit wide of the bit wide+sqsum of sum).Since the quantity of above-mentioned data is more, it is therefore desirable to Occupy more memory headroom.Therefore, the prior art exists, the more technical problem of committed memory.
Summary of the invention
Technical problem to be solved by the present invention lies in a kind of object detection method and device is provided, to solve existing skill The more technical problem of EMS memory occupation in art.
The present invention is to solve above-mentioned technical problem by the following technical programs:
The present invention provides a kind of object detection methods, which comprises
Image to be detected is obtained, and for the detection block size of described image to be detected, and the detection block size is not Greater than the size of image to be detected;
The pixel within the scope of correspondingly-sized is obtained in described image to be detected according to the size of the detection block, and is counted Calculate the integrated value of each pixel;
Judge whether the integrated value of the pixel in the detection frame region is greater than setting threshold value;
If so, the detection block is slided the first step-length, obtains the picture within the scope of correspondingly-sized according to horizontal glide direction Vegetarian refreshments, obtains the integrated value of each pixel, and returns to the product for executing the pixel in the judgement detection frame region Whether score value is greater than the step of setting threshold value, until the detection block slides into the edge of described image to be detected;
If it is not, the detection block is slided the second step-length, obtains the picture within the scope of correspondingly-sized according to horizontal glide direction Vegetarian refreshments, obtains the integrated value of each pixel, and returns to the product for executing the pixel in the judgement detection frame region Whether score value is greater than the step of setting threshold value, until the detection block slides into the edge of described image to be detected;
According to vertical sliding direction, the detection block is slided into the first step-length, obtains the pixel within the scope of correspondingly-sized, The integrated value of each pixel is obtained, and the integrated value for returning to the pixel in the execution judgement detection frame region is No the step of being greater than setting threshold value, until the target in described image to be detected is detected and completes.
Optionally, described according to horizontal glide direction, the detection block is slided into the first step-length, obtains correspondingly-sized range Interior pixel, comprising:
It will test frame and slide the first step-length in the horizontal direction, using the new pixel of the detection circle choosing as newly-increased picture Vegetarian refreshments will test the pixel being still located in detection frame region after frame slides as preimage vegetarian refreshments, by the newly-increased pixel Set with the preimage vegetarian refreshments is as the pixel within the scope of acquired correspondingly-sized.
Optionally, described according to horizontal glide direction, the detection block is slided into the second step-length, obtains correspondingly-sized range Interior pixel, comprising:
It will test frame and slide the second step-length in the horizontal direction, using the new pixel of the detection circle choosing as newly-increased picture Vegetarian refreshments will test the pixel being still located in detection frame region after frame slides as preimage vegetarian refreshments, by the newly-increased pixel Set with the preimage vegetarian refreshments is as the pixel within the scope of acquired correspondingly-sized.
Optionally, the integrated value for obtaining each pixel, comprising:
Obtain the integrated value of newly-increased pixel, and by the integral of the integrated value of the newly-increased pixel and the preimage vegetarian refreshments Integrated value of the set of value as each acquired pixel.
Optionally, it according to vertical sliding direction, when the detection block is slided the first step-length, will frame shift with the detection It is detached from the data of pixel integrated value in the pixel column of the first number of steps of the detection block when dynamic, is removed from memory.
The embodiment of the invention also provides a kind of object detecting device, described device includes:
Module is obtained, for obtaining image to be detected, and for the detection block size of described image to be detected, and it is described Detection block size is not more than the size of image to be detected;
Computing module obtains within the scope of correspondingly-sized in described image to be detected for the size according to the detection block Pixel, and calculate the integrated value of each pixel;
Judgment module, for judging whether the integrated value of the pixel in the detection frame region is greater than setting threshold value;
First sliding block, in the case where the judging result of the judgment module, which is, is, according to horizontal sliding side To, by the detection block slide the first step-length, obtain correspondingly-sized within the scope of pixel, obtain the integral of each pixel Value, and trigger the judgment module;
First sliding block, in the case where the judging result of the judgment module is no, according to horizontal sliding side To, by the detection block slide the second step-length, obtain correspondingly-sized within the scope of pixel, obtain the integral of each pixel Value, and trigger the judgment module;
Second sliding block obtains corresponding ruler for according to vertical sliding direction, the detection block to be slided the first step-length Pixel in very little range, obtains the integrated value of each pixel, and triggers the judgment module.
Optionally, first sliding block, is used for:
It will test frame and slide the first step-length in the horizontal direction, using the new pixel of the detection circle choosing as newly-increased picture Vegetarian refreshments will test the pixel being still located in detection frame region after frame slides as preimage vegetarian refreshments, by the newly-increased pixel Set with the preimage vegetarian refreshments is as the pixel within the scope of acquired correspondingly-sized.
Optionally, first sliding block, is used for:
It will test frame and slide the second step-length in the horizontal direction, using the new pixel of the detection circle choosing as newly-increased picture Vegetarian refreshments will test the pixel being still located in detection frame region after frame slides as preimage vegetarian refreshments, by the newly-increased pixel Set with the preimage vegetarian refreshments is as the pixel within the scope of acquired correspondingly-sized.
Optionally, first sliding block, is used for:
Obtain the integrated value of newly-increased pixel, and by the integral of the integrated value of the newly-increased pixel and the preimage vegetarian refreshments Integrated value of the set of value as each acquired pixel.
Optionally, the second sliding block, for according to vertical sliding direction, the detection block to be slided the first step-length When, by the number of pixel integrated value in the pixel column for the first number of steps for being detached from the detection block when mobile with the detection block According to being removed from memory.
The present invention has the advantage that compared with prior art
Each is individually calculated by each detection block when carrying out the identification of Harr feature using the embodiment of the present invention The size of integrated value in detection block, the negligible amounts of the pixel calculated each time, required memory headroom is also less, relatively In the size for the integrated value for calculating all pixels point first in the prior art, it is then store in memory, reduces accounting for for memory With.
Detailed description of the invention
Fig. 1 is a kind of flow diagram of object detection method provided in an embodiment of the present invention;
Fig. 2 is a kind of schematic illustration of object detection method provided in an embodiment of the present invention;
Fig. 3 is a kind of effect picture of Harr feature detection provided in an embodiment of the present invention;
Fig. 4 is a kind of schematic diagram of the first sliding detection of object detection method provided in an embodiment of the present invention;
Fig. 5 is a kind of schematic diagram of the first sliding detection of object detection method provided in an embodiment of the present invention;
Fig. 6 is the Memory control schematic diagram in a kind of object detection method provided in an embodiment of the present invention;
Fig. 7 is a kind of structural schematic diagram of object detecting device provided in an embodiment of the present invention.
Specific embodiment
It elaborates below to the embodiment of the present invention, the present embodiment carries out under the premise of the technical scheme of the present invention Implement, the detailed implementation method and specific operation process are given, but protection scope of the present invention is not limited to following implementation Example.
The embodiment of the invention provides a kind of object detection method and devices, just provided in an embodiment of the present invention first below A kind of object detection method is introduced.
Fig. 1 is a kind of flow diagram of object detection method provided in an embodiment of the present invention, and Fig. 2 is the embodiment of the present invention A kind of schematic illustration of the object detection method provided, as depicted in figs. 1 and 2, which comprises
S101: image to be detected is obtained, and for the detection block size of described image to be detected, and the detection block ruler The very little size no more than image to be detected.
Illustratively, the image data of complete image to be detected is obtained, it is highly H that wherein width, which is W, the present embodiment The value that the value of middle H is 640, W is 480.
Running integral figure is defined, the fixed width of integral graph region is complete integrogram width W, a height of detection window height.Definition Detection window peak width is detect_w, is highly detect_h, and detec_w is 25, detec_h 35 in the present embodiment.
S102: the pixel within the scope of correspondingly-sized is obtained in described image to be detected according to the size of the detection block Point, and calculate the integrated value of each pixel.
Illustratively, for the pixel in detection frame region 25*35 size, the integrated value of each pixel is calculated. Under normal conditions, the integrated value of each pixel can be with are as follows:
Sum [x] [y] indicates the integrated value of respective coordinates, then the integrated value for increasing point newly is the previous point of current line Integrated value adds cumulative (the including current point) of all point values before forefront, wherein x is the coordinate or the pixel pair The line number answered;Y is the coordinate or the corresponding row number of the pixel.
S103: judge whether the integrated value of the pixel in the detection frame region is greater than setting threshold value;If so, executing S104;If it is not, executing S105;
Illustratively, Fig. 3 is a kind of effect picture of Harr feature detection provided in an embodiment of the present invention.It can be set one Detection unit carries out the detection of integrated value using detection unit;Judge whether detection block corresponding region is full using detection unit Sufficient Harr characteristic value.
Fig. 4 is a kind of schematic diagram of the first sliding detection of object detection method provided in an embodiment of the present invention, such as Fig. 4 It is shown,
By taking the sum characteristic value in Harr characteristic value as an example, the region of frame institute's frame choosing of overstriking is the corresponding pixel of detection block The region of point, the region in entire wire are all pixels point of image to be detected;Src [y] indicates the numerical value of y column coordinate, Sum [x] [y] indicates coordinate is the integrated value of xth row y column.
The integrated value of each pixel in the region of detection block first time frame choosing is calculated first, for example, can be according to from a left side The integrated value that each column are calculated to right sequence, often has been calculated the integrated value of a column pixel, while renewal sequence number: Integral_col_num++;
Then, when Integral_col_num is equal to detection window width detect_w (A point in corresponding diagram), detection trigger Device unit, while by trigger flag detect_trig=1, that is, show that detection unit has been triggered and is carrying out detection behaviour Make.Under normal conditions, after detection unit end operation, trigger flag can be reset: detect_trig=0.
Meanwhile updating the condition triggered next time according to testing result, i.e., need which is completed in integrogram next time Column could trigger next_trig_col_num (row number of next column).
Then, when the Harr feature of the detection zone is greater than or equal to predefined thresholding, S104 step is executed,
When the Harr feature of the detection zone is less than predefined thresholding, S105 step is executed.
Whenever the integrogram for completing corresponding detection window region, one-time detection unit, the meter of detection unit and integrogram are triggered Calculation can execute parallel.
S104: according to horizontal glide direction, the detection block is slided into the first step-length, obtains the picture within the scope of correspondingly-sized Vegetarian refreshments, obtains the integrated value of each pixel, and returns to the product for executing the pixel in the judgement detection frame region Whether score value is greater than the step of setting threshold value, until the detection block slides into the edge of described image to be detected.
Specifically, can will test frame slides the first step-length in the horizontal direction, by the new pixel of the detection circle choosing Point will test the pixel being still located in detection frame region after frame slides as preimage vegetarian refreshments, by institute as newly-increased pixel The set of newly-increased pixel and the preimage vegetarian refreshments is stated as the pixel within the scope of acquired correspondingly-sized.
Illustratively, in this step, sliding step 1, the corresponding B into Fig. 4 of next_trig_col_num are arranged, i.e. Fig. 4 Middle secondary series to the region between column b is the detection frame region after sliding.
Integrated value due to increasing pixel newly is that the integrated value of the previous point of current line adds all points before forefront Value adds up, and therefore, the calculating of newly-increased pixel can carry out incremental on original integrogram:
1st point: Sum [m+1] [0]=Sum [m] [0]+src [0];
2nd point: Sum [m+1] [1]=Sum [m] [1]+src [0]+src [1];
And so on.
The sliding process of detection block is described in detail below, for example, start time, the pixel of detection circle choosing Region is the first row to fifth line, and first row is to the region of the 5th column;If slided when a length of 1 pixel of the first step Detection block afterwards includes: the first row to fifth line, and the region that secondary series is arranged to the 6th, then and so on.
Then, judge whether next_trig_col_num is not more than Integral_col_num, i.e., currently calculated Last column of detection block after the column (when forefront) of integrated value are up to or over sliding;
If so, illustrating the trigger condition for meeting detection device unit next time, the triggering of detection unit next time is carried out, together When by trigger flag detect_trig=1.
If it is not, illustrating that the integral column for meeting trigger condition do not calculate completion, judgement is interrupted.
Then, it completes after forefront integrogram calculates, whether judgement symbol detect_trig is 1, illustrates detection dress for 1 It sets unit calling, then directly carries out the operation of next column integrogram;It is called again after the completion of detection device is called.If Detect_trig=0 illustrates that detection device unit free, next_trig_col_num are not more than Integral_col_num, Detection trigger unit slided after detection block in pixel integrated value detection.Then proceed to row next column integrogram fortune It calculates.
It moves in circles in the manner described above, until the right side boundary of the detection block in Fig. 4 reaches mapping to be checked shown in Fig. 4 The right side edge of picture.
Fig. 5 is a kind of schematic diagram of the first sliding detection of object detection method provided in an embodiment of the present invention, such as Fig. 5 Shown, detection process shown in fig. 5 is identical as detection process principle shown in Fig. 4, and difference is only the difference of glide direction.
Further, the integrated value of available newly-increased pixel, and by the integrated value of the newly-increased pixel with it is described Integrated value of the set of the integrated value of preimage vegetarian refreshments as each acquired pixel.
It should be noted that when detection block is slided, it will usually it is slided simultaneously in vertical and horizontal direction, I.e. the glide direction of detection block is mutually orthogonal both direction.
Using the above embodiment of the present invention, every sliding is primary, only calculates the integrated value of newly-increased pixel, examines relative to calculating Survey the integrated value of all pixels point in frame, it is possible to reduce the calculation amount of integrated value.
S105: according to horizontal glide direction, the detection block is slided into the second step-length, obtains the picture within the scope of correspondingly-sized Vegetarian refreshments, obtains the integrated value of each pixel, and returns to the product for executing the pixel in the judgement detection frame region Whether score value is greater than the step of setting threshold value, until the detection block slides into the edge of described image to be detected.
Specifically, can will test frame slides the second step-length in the horizontal direction, by the new pixel of the detection circle choosing Point will test the pixel being still located in detection frame region after frame slides as preimage vegetarian refreshments, by institute as newly-increased pixel The set of newly-increased pixel and the preimage vegetarian refreshments is stated as the pixel within the scope of acquired correspondingly-sized.
The sliding process of detection block is described in detail below, for example, start time, the pixel of detection circle choosing Region is the first row to fifth line, and first row is to the region of the 5th column;If a length of 1 pixel of the first step, the second step-length When for 2 pixels, then the detection block after sliding includes:
Second row is to fifth line, and third is arranged to the region of the 7th column, then and so on.
In this step, sliding step 2, the corresponding C into figure of next_trig_col_num are arranged.That is in Fig. 4 third arrange to Region between column c is the detection frame region after sliding.
Illustratively, the Computing Principle in S105 step is identical as the Computing Principle in S104 step, and difference is only to slide The difference of dynamic step-length, details are not described herein for the embodiment of the present invention.
S106: according to vertical sliding direction, the detection block is slided into the first step-length, obtains the picture within the scope of correspondingly-sized Vegetarian refreshments, obtains the integrated value of each pixel, and returns to the product for executing the pixel in the judgement detection frame region Whether score value is greater than the step of setting threshold value, until the target in described image to be detected is detected and completes.
Illustratively, in S104 step or S105 step, as shown in figure 4, the right side boundary of detection block reaches Fig. 4 institute The right side edge of the image to be detected shown illustrates that the sliding of this horizontal direction is over.
It will test frame and slide the first step-length in vertical direction, if a length of 1 pixel of the first step, detection block is vertical The pixel region for including after sliding can be with are as follows:
Second row to the 6th row, and first row to the 6th column region pixel;
Or be, shown in Fig. 4, the second row to the 6th row, and the 10th arranges to the pixel in the region of the 15th column.
After detection block vertical sliding motion, horizontal sliding is then carried out in the second row to the region of the 6th row, then, is being examined Survey frame rightmost side edge reach the rightmost side edge of image to be detected after, or at the leftmost side edge of detection block reach to be checked Behind the leftmost side edge of altimetric image, then vertical sliding motion is carried out, and so on, until completing all Lis Hartel signs in band detection image It is worth the detection of (target).It is understood that the detection method of Lis Hartel value indicative is the prior art, the embodiment of the present invention is herein not It repeats again.
It is individually calculated when carrying out the identification of harr feature by each detection block using embodiment illustrated in fig. 1 of the present invention The size of integrated value in each detection block, the negligible amounts of the pixel calculated each time, required memory headroom also compared with It is few, compared with the existing technology in calculate first all pixels point integrated value size, be then store in memory, reduce in The occupancy deposited.
In a kind of specific embodiment of the embodiment of the present invention, according to vertical sliding direction, the detection block is slided When dynamic first step-length, by pixel in the pixel column for the first number of steps for being detached from the detection block when mobile with the detection block The data of integrated value, are removed from memory.
Fig. 6 is the Memory control schematic diagram in a kind of object detection method provided in an embodiment of the present invention, as shown in fig. 6, Started for the first time using first time detection buffer initial address when memory in corresponding diagram 6, it, will after the completion of detecting first time The occupied memory release of the integrated value of first row or the first row in this time detection, by increasing pixel in detecting for the second time newly Integrated value is called, and therefore, second of detection buffer initial address in Fig. 6, which is physically located detection buffer for the first time, to be terminated Before address.And so on, it is completed until image to be detected is detected.
The reset procedure of memory is described in detail below,
(1), as shown in figure 4, detection block first carries out horizontal sliding from left to right, for example, start time, detection circle choosing Pixel region be the first row to fifth line, and first row is to the region of the 4th column.The first row is stored in memory extremely at this time Fifth line, and the integrated value of first row pixel into the area encompassed of the 4th column.
If the step-length that detection block is slided in the horizontal direction is the first step-length, if a length of pixel of the first step, Then the pixel region of the detection circle choosing after horizontal sliding is the first row to fifth line, and the region that secondary series is arranged to the 5th.
If the step-length that detection block is slided in the horizontal direction is the second step-length, if a length of two pixels of the first step, Then the pixel region of the detection circle choosing after horizontal sliding is the first row to fifth line, and third is arranged to the region of the 6th column.
And so on, until the right side edge of detection block arrives at the right side edge of image to be detected.
(2), each sub-level slide after, detection block vertical direction the first step-length of sliding, for example, sliding after Detection block include: the second row to the 6th row, and first row, to the region of the 6th column, detection block carries out water after vertical sliding motion Smooth dynamic, the mode of level sliding is identical as the mode in aforementioned (1), and details are not described herein for the embodiment of the present invention.It at this time will be interior The integrated value for depositing the pixel of the first row of middle storage is removed;After detection block carries out vertical sliding motion next time, it will be deposited in memory The integrated value of the pixel of second row of storage is removed, and so on.
By original (position of the bit wide+sqsum of sum scheme integrogram memory overhead H*W* by way of running integral figure It is wide), it is reduced to detect_h*W* (bit wide of the bit wide+sqsum of sum), while running integral figure is used and is based on full picture The mode that integrogram is calculated does not increase new computational complexity;
The operational efficiency of target detection is improved to the mode of detection device unit and running integral parallel processing.
To sum up, which reduces the memory overhead of integrogram during Project Realization, improves the fortune of target detection Line efficiency, effective reduction chip power-consumption and cost.
Using embodiment illustrated in fig. 6 of the present invention, from the perspective of memory use, the first row integrated value of original integrogram The memory of occupancy is released, and is multiplexed by the integrated value of new line increment, therefore completes picture in its entirety running integral, it is only necessary to memory Detect_h*W* (bit wide of the bit wide+sqsum of sum).
It is understood that if the pixel in detection frame region 25*35 size is not by calculating integral value, meter Calculate the integrated value of each pixel.
Corresponding with embodiment illustrated in fig. 1 of the present invention, the embodiment of the invention also provides a kind of object detecting devices.
Fig. 7 is a kind of structural schematic diagram of object detecting device provided in an embodiment of the present invention, as shown in fig. 7, the dress It sets and includes:
Module 701 is obtained, for obtaining image to be detected, and for the detection block size of described image to be detected, and The detection block size is not more than the size of image to be detected;
Computing module 702 obtains correspondingly-sized model for the size according to the detection block in described image to be detected Interior pixel is enclosed, and calculates the integrated value of each pixel;
Judgment module 703, for judging whether the integrated value of the pixel in the detection frame region is greater than setting thresholding Value;
First sliding block 704, for being slided according to level in the case where the judging result of the judgment module, which is, is The detection block is slided the first step-length, obtains the pixel within the scope of correspondingly-sized, obtain the product of each pixel by direction Score value, and trigger the judgment module 703;
First sliding block 704, for being slided according to level in the case where the judging result of the judgment module is no The detection block is slided the second step-length, obtains the pixel within the scope of correspondingly-sized, obtain the product of each pixel by direction Score value, and trigger the judgment module 703;
Second sliding block 705, for according to vertical sliding direction, the detection block to be slided the first step-length, acquisition pair The pixel in size range is answered, the integrated value of each pixel is obtained, and triggers the judgment module 703.
Each is individually calculated by each detection block when carrying out the identification of harr feature using the embodiment of the present invention The size of integrated value in detection block, the negligible amounts of the pixel calculated each time, required memory headroom is also less, relatively In the size for the integrated value for calculating all pixels point first in the prior art, it is then store in memory, reduces accounting for for memory With.
In a kind of specific embodiment of the embodiment of the present invention, first sliding block 704 is used for:
It will test frame and slide the first step-length in the horizontal direction, using the new pixel of the detection circle choosing as newly-increased picture Vegetarian refreshments will test the pixel being still located in detection frame region after frame slides as preimage vegetarian refreshments, by the newly-increased pixel Set with the preimage vegetarian refreshments is as the pixel within the scope of acquired correspondingly-sized.
In a kind of specific embodiment of the embodiment of the present invention, first sliding block 704 is used for:
It will test frame and slide the second step-length in the horizontal direction, using the new pixel of the detection circle choosing as newly-increased picture Vegetarian refreshments will test the pixel being still located in detection frame region after frame slides as preimage vegetarian refreshments, by the newly-increased pixel Set with the preimage vegetarian refreshments is as the pixel within the scope of acquired correspondingly-sized.
In a kind of specific embodiment of the embodiment of the present invention, first sliding block 704 is used for:
Obtain the integrated value of newly-increased pixel, and by the integral of the integrated value of the newly-increased pixel and the preimage vegetarian refreshments Integrated value of the set of value as each acquired pixel.
In a kind of specific embodiment of the embodiment of the present invention, the second sliding block 705, for according to vertical sliding Direction when the detection block is slided the first step-length, will be detached from the first step-length of the detection block with the detection block when mobile The data of pixel integrated value, are removed from memory in the pixel column of quantity.
The foregoing is merely illustrative of the preferred embodiments of the present invention, is not intended to limit the invention, all in essence of the invention Made any modifications, equivalent replacements, and improvements etc., should all be included in the protection scope of the present invention within mind and principle.

Claims (10)

1. a kind of object detection method, which is characterized in that the described method includes:
Image to be detected is obtained, and for the detection block size of described image to be detected, and the detection block size is not more than The size of image to be detected;
The pixel within the scope of correspondingly-sized is obtained in described image to be detected according to the size of the detection block, and is calculated every The integrated value of one pixel;
Judge whether the integrated value of the pixel in the detection frame region is greater than setting threshold value;
If so, the detection block is slided the first step-length, obtains the pixel within the scope of correspondingly-sized according to horizontal glide direction Point, obtains the integrated value of each pixel, and returns to the integral for executing the pixel in the judgement detection frame region Whether value is greater than the step of setting threshold value, until the detection block slides into the edge of described image to be detected;
If it is not, the detection block is slided the second step-length, obtains the pixel within the scope of correspondingly-sized according to horizontal glide direction Point, obtains the integrated value of each pixel, and returns to the integral for executing the pixel in the judgement detection frame region Whether value is greater than the step of setting threshold value, until the detection block slides into the edge of described image to be detected;
According to vertical sliding direction, the detection block is slided into the first step-length, obtains the pixel within the scope of correspondingly-sized, is obtained The integrated value of each pixel, and whether return to the execution integrated value for judging the pixel in the detection frame region big In the step of setting threshold value, until the target in described image to be detected is detected and completes.
2. a kind of object detection method according to claim 1, which is characterized in that it is described according to horizontal glide direction, it will The detection block slides the first step-length, obtains the pixel within the scope of correspondingly-sized, comprising:
It will test frame and slide the first step-length in the horizontal direction, using the new pixel of the detection circle choosing as newly-increased pixel Point, will test the pixel being still located on after frame sliding in detection frame region as preimage vegetarian refreshments, by the newly-increased pixel and The set of the preimage vegetarian refreshments is as the pixel within the scope of acquired correspondingly-sized.
3. a kind of object detection method according to claim 1, which is characterized in that it is described according to horizontal glide direction, it will The detection block slides the second step-length, obtains the pixel within the scope of correspondingly-sized, comprising:
It will test frame and slide the second step-length in the horizontal direction, using the new pixel of the detection circle choosing as newly-increased pixel Point, will test the pixel being still located on after frame sliding in detection frame region as preimage vegetarian refreshments, by the newly-increased pixel and The set of the preimage vegetarian refreshments is as the pixel within the scope of acquired correspondingly-sized.
4. a kind of object detection method according to claim 2 or 3, which is characterized in that described each pixel of acquisition Integrated value, comprising:
Obtain the integrated value of newly-increased pixel, and by the integrated value of the newly-increased pixel and the integrated value of the preimage vegetarian refreshments Gather the integrated value as each acquired pixel.
5. a kind of object detection method according to claim 2 or 3, which is characterized in that according to vertical sliding direction, incite somebody to action When the detection block slides the first step-length, the picture of the first number of steps of the detection block will be detached from when mobile with the detection block The data of pixel integrated value, are removed from memory in plain row.
6. a kind of object detecting device, which is characterized in that described device includes:
Module is obtained, for obtaining image to be detected, and for the detection block size of described image to be detected, and the detection Frame size is not more than the size of image to be detected;
Computing module obtains the picture within the scope of correspondingly-sized for the size according to the detection block in described image to be detected Vegetarian refreshments, and calculate the integrated value of each pixel;
Judgment module, for judging whether the integrated value of the pixel in the detection frame region is greater than setting threshold value;
First sliding block, for according to horizontal glide direction, inciting somebody to action in the case where the judging result of the judgment module, which is, is The detection block slides the first step-length, obtains the pixel within the scope of correspondingly-sized, obtains the integrated value of each pixel, and Trigger the judgment module;
First sliding block, for according to horizontal glide direction, inciting somebody to action in the case where the judging result of the judgment module is no The detection block slides the second step-length, obtains the pixel within the scope of correspondingly-sized, obtains the integrated value of each pixel, and Trigger the judgment module;
Second sliding block, for the detection block being slided the first step-length, obtains correspondingly-sized model according to vertical sliding direction Interior pixel is enclosed, obtains the integrated value of each pixel, and trigger the judgment module.
7. a kind of object detecting device according to claim 6, which is characterized in that first sliding block is used for:
It will test frame and slide the first step-length in the horizontal direction, using the new pixel of the detection circle choosing as newly-increased pixel Point, will test the pixel being still located on after frame sliding in detection frame region as preimage vegetarian refreshments, by the newly-increased pixel and The set of the preimage vegetarian refreshments is as the pixel within the scope of acquired correspondingly-sized.
8. a kind of object detecting device according to claim 6, which is characterized in that first sliding block is used for:
It will test frame and slide the second step-length in the horizontal direction, using the new pixel of the detection circle choosing as newly-increased pixel Point, will test the pixel being still located on after frame sliding in detection frame region as preimage vegetarian refreshments, by the newly-increased pixel and The set of the preimage vegetarian refreshments is as the pixel within the scope of acquired correspondingly-sized.
9. a kind of object detecting device according to claim 7 or 8, which is characterized in that first sliding block is used In:
Obtain the integrated value of newly-increased pixel, and by the integrated value of the newly-increased pixel and the integrated value of the preimage vegetarian refreshments Gather the integrated value as each acquired pixel.
10. a kind of object detecting device according to claim 7 or 8, which is characterized in that the second sliding block is used for According to vertical sliding direction, when the detection block is slided the first step-length, the detection will be detached from when will move with the detection block The data of pixel integrated value, are removed from memory in the pixel column of first number of steps of frame.
CN201910176247.1A 2019-03-08 2019-03-08 A kind of object detection method and device Pending CN109948626A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910176247.1A CN109948626A (en) 2019-03-08 2019-03-08 A kind of object detection method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910176247.1A CN109948626A (en) 2019-03-08 2019-03-08 A kind of object detection method and device

Publications (1)

Publication Number Publication Date
CN109948626A true CN109948626A (en) 2019-06-28

Family

ID=67009387

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910176247.1A Pending CN109948626A (en) 2019-03-08 2019-03-08 A kind of object detection method and device

Country Status (1)

Country Link
CN (1) CN109948626A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110688935A (en) * 2019-09-24 2020-01-14 南京慧视领航信息技术有限公司 Single-lane vehicle detection method based on rapid search
CN111815570A (en) * 2020-06-16 2020-10-23 浙江大华技术股份有限公司 Regional intrusion detection method and related device thereof

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108205687A (en) * 2018-02-01 2018-06-26 通号通信信息集团有限公司 Based on focus mechanism positioning loss calculation method and system in object detection system
CN108470194A (en) * 2018-04-04 2018-08-31 北京环境特性研究所 A kind of Feature Selection method and device
CN109241969A (en) * 2018-09-26 2019-01-18 旺微科技(上海)有限公司 A kind of multi-target detection method and detection system
CN109409360A (en) * 2018-09-26 2019-03-01 旺微科技(上海)有限公司 A kind of multiple dimensioned image object detection method and detection system

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108205687A (en) * 2018-02-01 2018-06-26 通号通信信息集团有限公司 Based on focus mechanism positioning loss calculation method and system in object detection system
CN108470194A (en) * 2018-04-04 2018-08-31 北京环境特性研究所 A kind of Feature Selection method and device
CN109241969A (en) * 2018-09-26 2019-01-18 旺微科技(上海)有限公司 A kind of multi-target detection method and detection system
CN109409360A (en) * 2018-09-26 2019-03-01 旺微科技(上海)有限公司 A kind of multiple dimensioned image object detection method and detection system

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110688935A (en) * 2019-09-24 2020-01-14 南京慧视领航信息技术有限公司 Single-lane vehicle detection method based on rapid search
CN111815570A (en) * 2020-06-16 2020-10-23 浙江大华技术股份有限公司 Regional intrusion detection method and related device thereof

Similar Documents

Publication Publication Date Title
CN105260713B (en) A kind of method for detecting lane lines and device
US8284255B2 (en) Inter-camera ink relation information generating apparatus
EP1725975B1 (en) Method, apparatus and program for detecting an object
CN1892702B (en) Tracking apparatus
US10133937B2 (en) Crowd monitoring system
CN103093198B (en) A kind of crowd density monitoring method and device
CN101726357A (en) Smoke detecting apparatus
CN106412573A (en) Method and device for detecting lens stain
CN109948626A (en) A kind of object detection method and device
CN106991418A (en) Winged insect detection method, device and terminal
CN105869175A (en) Image segmentation method and system
CN108460333B (en) Ground detection method and device based on depth map
CN106598289A (en) Method and system for expanding written page
CN105894540A (en) Method and system for counting vertical reciprocating movements based on mobile terminal
CN108629254B (en) Moving target detection method and device
CN110766711A (en) Video shot segmentation method, system, device and storage medium
CN105427346A (en) Motion target tracking method and system
CN113538603A (en) Optical detection method and system based on array product and readable storage medium
CN109948436A (en) The method and device of vehicle on a kind of monitoring road
CN111563492B (en) Fall detection method, fall detection device and storage device
CN110458023B (en) Training method of road line detection model, and road line detection method and device
CN202748806U (en) Image gray level information-based finger detection realization architecture
CN104573698A (en) Image texture main direction recognition method oriented to imaging measurement
CN110363703A (en) Shelf monitor method based on depth camera
CN109753840B (en) Method, system and storage medium for determining parking space line corner points based on response values

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20190628

RJ01 Rejection of invention patent application after publication