CN104331696A - Image characteristic rapid extraction method based on graphic processing unit - Google Patents
Image characteristic rapid extraction method based on graphic processing unit Download PDFInfo
- Publication number
- CN104331696A CN104331696A CN201410508531.1A CN201410508531A CN104331696A CN 104331696 A CN104331696 A CN 104331696A CN 201410508531 A CN201410508531 A CN 201410508531A CN 104331696 A CN104331696 A CN 104331696A
- Authority
- CN
- China
- Prior art keywords
- image
- edge feature
- processing unit
- parallel
- parallel unit
- 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.)
- Granted
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V10/00—Arrangements for image or video recognition or understanding
- G06V10/40—Extraction of image or video features
- G06V10/44—Local feature extraction by analysis of parts of the pattern, e.g. by detecting edges, contours, loops, corners, strokes or intersections; Connectivity analysis, e.g. of connected components
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V10/00—Arrangements for image or video recognition or understanding
- G06V10/40—Extraction of image or video features
- G06V10/60—Extraction of image or video features relating to illumination properties, e.g. using a reflectance or lighting model
Abstract
The invention relates to the technical field of image processing and analysis, and particularly relates to an image characteristic rapid extraction method based on a graphic processing unit. The method comprises the steps that an original image is read, the brightness component image of the original image is extracted and the brightness component image is copied to the frame buffer of the graphic processing unit; all active threads in the graphic processing unit are divided into multiple thread blocks, the number of the threads included in each thread block is calculated, multiple parallel units are established, and the number of the thread blocks required to be established for each parallel unit is calculated according to the size of the brightness component image; filtering processing is performed on the brightness component image via the parallel units so that multiple edge characteristic images corresponding to the parallel units are acquired; and characteristic extraction is performed on the edge characteristic images via the thread blocks so that an edge characteristic matrix of the original image is formed. Speed of image characteristic extraction is enhanced via parallel calculation capability of the graphic processing unit.
Description
Technical field
The present invention relates to image processing and analysis technical field, particularly relate to a kind of characteristics of image rapid extracting method of graphic based processing unit.
Background technology
The feature interpretation of the image primary structure information of image, feature extraction is the important technology of image processing field, it is the basis of computer vision technique, many application as: be obtained for widespread use in image registration, image vector and automatic target detection, along with video image implements the development of business processing, the rapid extraction technology of characteristics of image has become an urgent demand of Computer Vision.
Existing image local feature extraction algorithm is: first, respectively in the horizontal direction with on vertical direction edge is extracted to original image, obtain the edge feature image on horizontal direction and vertical direction, then the marginal information of image local is extracted at edge feature image uplifting window, obtain the feature of image, the method is owing to adopting treatment technology of windowing, calculated amount is large, and along with the increase of video image single frames quantity and the raising of frame rate, utilize CPU treatment technology to be difficult to meet the requirement of real-time of video image.
Summary of the invention
The object of the invention is to the characteristics of image rapid extracting method proposing a kind of graphic based processing unit, effectively utilize the computation capability of hardware, improve the speed of image characteristics extraction.
For reaching this object, the present invention by the following technical solutions:
A characteristics of image rapid extracting method for graphic based processing unit, comprising:
Read original image, extract the luminance component image of described original image, and by described luminance component image copy in the frame buffer of Graphics Processing Unit;
All active threads in described Graphics Processing Unit are divided into several thread block, calculate the quantity of the thread comprised in each thread block, set up several Parallel Unit, according to the size of described luminance component image, calculate the number that each Parallel Unit needs the thread block created;
By described Parallel Unit, filtering process is carried out to described luminance component image, obtain the edge feature image that several are corresponding with described Parallel Unit;
By described thread block, feature extraction is carried out to described edge feature image, form the edge feature matrix of original image.
Wherein, after step forms the edge feature matrix of original image, also comprise:
Described edge feature matrix is stored in the buffer memory of Graphics Processing Unit.
Wherein, described thread block is two-dimentional thread block, and the quantity of the thread that described two-dimentional thread block comprises is [T
x, T
y].
Wherein, the size of described luminance component image is M × N, and the size of described Parallel Unit is also M × N, and each Parallel Unit needs the number of the thread block created to be K, K=m × n, wherein,
expression rounds.
Wherein, described Parallel Unit comprises: the first Parallel Unit, the second Parallel Unit, the 3rd Parallel Unit and the 4th Parallel Unit; Described edge feature image comprises: the first edge feature image, the second edge characteristic image, the 3rd edge feature image and the 4th edge feature image.
Wherein, {-1.0,0,1.0} carries out horizontal direction filtering process to described first Parallel Unit employing 1 × 3 filter operator, by the parallel computation of described first Parallel Unit, obtains described first edge feature image.
Wherein, {-1.0,0,1.0} carries out vertical direction filtering process to described second Parallel Unit employing 3 × 1 filter operators, by the parallel computation of described second Parallel Unit, obtains described second edge characteristic image.
Wherein, { 0.5,0 ,-1,0,0.5} carries out horizontal direction filtering process to described 3rd Parallel Unit employing 1 × 5 filter operator, by the parallel computation of described 3rd Parallel Unit, obtains described 3rd edge feature image.
Wherein, { 0.5,0 ,-1,0,0.5} carries out vertical direction filtering process to described 4th Parallel Unit employing 5 × 1 filter operators, by the parallel computation of described 4th Parallel Unit, obtains described 4th edge feature image.
Wherein, described step carries out feature extraction by described thread block to described edge feature image, the edge feature matrix forming original image is specially: by described thread block respectively to the first edge feature image, second edge characteristic image, in 3rd edge feature image and the 4th edge feature image same position 6 × 6 subregion process, extract characteristic, form the one-dimensional characteristic vector that a size is 6 × 6 × 4, as the edge feature vector of each position of described original image, by the edge feature of position each in described original image vector according to positional alignment order by left-to-right carry out from top to bottom assembled, form the edge feature matrix of original image.
Beneficial effect of the present invention is: a kind of characteristics of image rapid extracting method of graphic based processing unit, comprise: read original image, extract the luminance component image of described original image, and by described luminance component image copy in the frame buffer of Graphics Processing Unit; All active threads in described Graphics Processing Unit are divided into several thread block, calculate the quantity of the thread comprised in each thread block, set up several Parallel Unit, according to the size of described luminance component image, calculate the number that each Parallel Unit needs the thread block created; By described Parallel Unit, filtering process is carried out to described luminance component image, obtain the edge feature image that several are corresponding with described Parallel Unit; Carry out feature extraction by described thread block to described edge feature image, form the edge feature matrix of original image, the present invention, by the computation capability of Graphics Processing Unit, improves the speed of image characteristics extraction.
Accompanying drawing explanation
Fig. 1 is the characteristics of image rapid extracting method process flow diagram of a kind of graphic based processing unit that the specific embodiment of the invention provides.
Embodiment
Technical scheme of the present invention is further illustrated by embodiment below in conjunction with Fig. 1.
Fig. 1 is the characteristics of image rapid extracting method process flow diagram of a kind of graphic based processing unit that the specific embodiment of the invention provides.
A characteristics of image rapid extracting method for graphic based processing unit, comprising:
Read original image, extract the luminance component image of described original image, and by described luminance component image copy in the frame buffer of Graphics Processing Unit (Graphic Processing Unit is called for short GPU);
All active threads in described Graphics Processing Unit are divided into several thread block, calculate the quantity of the thread comprised in each thread block, set up several Parallel Unit, according to the size of described luminance component image, calculate the number that each Parallel Unit needs the thread block created;
By described Parallel Unit, filtering process is carried out to described luminance component image, obtain the edge feature image that several are corresponding with described Parallel Unit;
By described thread block, feature extraction is carried out to described edge feature image, form the edge feature matrix of original image.
In the present embodiment, by the computation capability of Graphics Processing Unit, improve the speed of image characteristics extraction.
In the present embodiment, after step forms the edge feature matrix of original image, also comprise:
Described edge feature matrix is stored in the buffer memory of Graphics Processing Unit.
Further, described edge feature matrix is copied in host memory from the buffer memory of GPU.
In the present embodiment, described thread block is two-dimentional thread block, and the quantity of the thread that described two-dimentional thread block comprises is [T
x, T
y].
In the present embodiment, the size of described luminance component image is M × N, and the size of described Parallel Unit is also M × N, and each Parallel Unit needs the number of the thread block created to be K, K=m × n, wherein,
expression rounds.
In the present embodiment, described Parallel Unit comprises: the first Parallel Unit, the second Parallel Unit, the 3rd Parallel Unit and the 4th Parallel Unit; Described edge feature image comprises: the first edge feature image, the second edge characteristic image, the 3rd edge feature image and the 4th edge feature image.
In the present embodiment, described first Parallel Unit adopts 1 × 3 filter operator {-1.0,0,1.0} carries out horizontal direction filtering process, centered by M × N number of pixel, size be 1 × 3 subregion be handling object, by the parallel computation of described first Parallel Unit, obtain described first edge feature image.
In the present embodiment, described second Parallel Unit adopts 3 × 1 filter operators {-1.0,0,1.0} carries out vertical direction filtering process, centered by M × N number of pixel, size be 3 × 1 subregion be handling object, by the parallel computation of described second Parallel Unit, obtain described second edge characteristic image.
In the present embodiment, described 3rd Parallel Unit adopts 1 × 5 filter operator { 0.5,0,-1,0,0.5} carries out horizontal direction filtering process, centered by M × N number of pixel, size be 1 × 5 subregion be handling object, by the parallel computation of described 3rd Parallel Unit, obtain described 3rd edge feature image.
In the present embodiment, described 4th Parallel Unit adopts 5 × 1 filter operators { 0.5,0,-1,0,0.5} carries out vertical direction filtering process, centered by M × N number of pixel, size be 5 × 1 subregion be handling object, by the parallel computation of described 4th Parallel Unit, obtain described 4th edge feature image.
In the present embodiment, described step carries out feature extraction by described thread block to described edge feature image, the edge feature matrix forming original image is specially: by described thread block respectively to the first edge feature image, second edge characteristic image, in 3rd edge feature image and the 4th edge feature image same position 6 × 6 subregion process, extract characteristic, form the one-dimensional characteristic vector that a size is 6 × 6 × 4, as the edge feature vector of each position of described original image, by the edge feature of position each in described original image vector according to positional alignment order by left-to-right carry out from top to bottom assembled, form the edge feature matrix of original image.
Select a double-core CPU being furnished with Pentium (R) Dual-Core CPU E6500@2.93GHz, the PC of a NVIDIA GeForce GT 640 (1G video memory) realizes extracting method of the present invention.Adopt the CUDA programming framework of Nvidia company, it provides a general C DLL (dynamic link library) for GPU calculates, facilitate the ardware feature that programmer uses some new.
Select the original image of different resolution, it is consuming time, as shown in table 1 that the CPU realization of the feature extraction of statistical picture, GPU realize.
Table 1CPU and GPU contrast
As can be seen from Table 1, the speed-up ratio of the guarantee about 2.5 that the Fast implementation of this image characteristics extraction based on GPU can be stable.
The foregoing is only the specific embodiment of the present invention, these describe just in order to explain principle of the present invention, and can not with any interpretation of structure for limiting the scope of the invention.Based on explanation herein, those skilled in the art does not need to pay performing creative labour can associate other specific implementation method of the present invention, and these structures all will fall within protection scope of the present invention.
Claims (10)
1. a characteristics of image rapid extracting method for graphic based processing unit, is characterized in that, comprising:
Read original image, extract the luminance component image of described original image, and by described luminance component image copy in the frame buffer of Graphics Processing Unit;
All active threads in described Graphics Processing Unit are divided into several thread block, calculate the quantity of the thread comprised in each thread block, set up several Parallel Unit, according to the size of described luminance component image, calculate the number that each Parallel Unit needs the thread block created;
By described Parallel Unit, filtering process is carried out to described luminance component image, obtain the edge feature image that several are corresponding with described Parallel Unit;
By described thread block, feature extraction is carried out to described edge feature image, form the edge feature matrix of original image.
2. the characteristics of image rapid extracting method of a kind of graphic based processing unit according to claim 1, is characterized in that, after step forms the edge feature matrix of original image, also comprises:
Described edge feature matrix is stored in the buffer memory of Graphics Processing Unit.
3. the characteristics of image rapid extracting method of a kind of graphic based processing unit according to claim 1, is characterized in that, described thread block is two-dimentional thread block, and the quantity of the thread that described two-dimentional thread block comprises is [T
x, T
y].
4. the characteristics of image rapid extracting method of a kind of graphic based processing unit according to claim 3, it is characterized in that, the size of described luminance component image is M × N, the size of described Parallel Unit is also M × N, each Parallel Unit needs the number of the thread block created to be K, K=m × n, wherein
expression rounds.
5. the characteristics of image rapid extracting method of a kind of graphic based processing unit according to claim 4, it is characterized in that, described Parallel Unit comprises: the first Parallel Unit, the second Parallel Unit, the 3rd Parallel Unit and the 4th Parallel Unit; Described edge feature image comprises: the first edge feature image, the second edge characteristic image, the 3rd edge feature image and the 4th edge feature image.
6. the characteristics of image rapid extracting method of a kind of graphic based processing unit according to claim 5, it is characterized in that, described first Parallel Unit adopts 1 × 3 filter operator {-1.0,0,1.0} carries out horizontal direction filtering process, by the parallel computation of described first Parallel Unit, obtain described first edge feature image.
7. the characteristics of image rapid extracting method of a kind of graphic based processing unit according to claim 5, it is characterized in that, described second Parallel Unit adopts 3 × 1 filter operators {-1.0,0,1.0} carries out vertical direction filtering process, by the parallel computation of described second Parallel Unit, obtain described second edge characteristic image.
8. the characteristics of image rapid extracting method of a kind of graphic based processing unit according to claim 5, it is characterized in that, described 3rd Parallel Unit adopts 1 × 5 filter operator { 0.5,0,-1,0,0.5} carries out horizontal direction filtering process, by the parallel computation of described 3rd Parallel Unit, obtain described 3rd edge feature image.
9. the characteristics of image rapid extracting method of a kind of graphic based processing unit according to claim 5, it is characterized in that, described 4th Parallel Unit adopts 5 × 1 filter operators { 0.5,0,-1,0,0.5} carries out vertical direction filtering process, by the parallel computation of described 4th Parallel Unit, obtain described 4th edge feature image.
10. the characteristics of image rapid extracting method of a kind of graphic based processing unit according to claim 5, it is characterized in that, described step carries out feature extraction by described thread block to described edge feature image, the edge feature matrix forming original image is specially: by described thread block respectively to the first edge feature image, second edge characteristic image, in 3rd edge feature image and the 4th edge feature image same position 6 × 6 subregion process, extract characteristic, form the one-dimensional characteristic vector that a size is 6 × 6 × 4, as the edge feature vector of each position of described original image, by the edge feature of position each in described original image vector according to positional alignment order by left-to-right carry out from top to bottom assembled, form the edge feature matrix of original image.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410508531.1A CN104331696B (en) | 2014-09-28 | 2014-09-28 | A kind of characteristics of image rapid extracting method based on graphics processing unit |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410508531.1A CN104331696B (en) | 2014-09-28 | 2014-09-28 | A kind of characteristics of image rapid extracting method based on graphics processing unit |
Publications (2)
Publication Number | Publication Date |
---|---|
CN104331696A true CN104331696A (en) | 2015-02-04 |
CN104331696B CN104331696B (en) | 2017-10-31 |
Family
ID=52406418
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201410508531.1A Expired - Fee Related CN104331696B (en) | 2014-09-28 | 2014-09-28 | A kind of characteristics of image rapid extracting method based on graphics processing unit |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN104331696B (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110276712A (en) * | 2018-12-29 | 2019-09-24 | 中国科学院软件研究所 | Spaceborne image processing apparatus and spaceborne image procossing and decision-making platform |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1160254A (en) * | 1996-12-11 | 1997-09-24 | 力捷电脑股份有限公司 | Digit compensated image processing device |
CN101719275A (en) * | 2009-11-23 | 2010-06-02 | 中国科学院计算技术研究所 | Image feature point extracting and realizing method, image copying and detecting method and system thereof |
CN102495725A (en) * | 2011-11-15 | 2012-06-13 | 复旦大学 | Image/video feature extraction parallel algorithm based on multi-core system structure |
CN103593850A (en) * | 2013-11-26 | 2014-02-19 | 北京航空航天大学深圳研究院 | SIFT parallelization system and method based on recursion Gaussian filtering on CUDA platform |
-
2014
- 2014-09-28 CN CN201410508531.1A patent/CN104331696B/en not_active Expired - Fee Related
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1160254A (en) * | 1996-12-11 | 1997-09-24 | 力捷电脑股份有限公司 | Digit compensated image processing device |
CN101719275A (en) * | 2009-11-23 | 2010-06-02 | 中国科学院计算技术研究所 | Image feature point extracting and realizing method, image copying and detecting method and system thereof |
CN102495725A (en) * | 2011-11-15 | 2012-06-13 | 复旦大学 | Image/video feature extraction parallel algorithm based on multi-core system structure |
CN103593850A (en) * | 2013-11-26 | 2014-02-19 | 北京航空航天大学深圳研究院 | SIFT parallelization system and method based on recursion Gaussian filtering on CUDA platform |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110276712A (en) * | 2018-12-29 | 2019-09-24 | 中国科学院软件研究所 | Spaceborne image processing apparatus and spaceborne image procossing and decision-making platform |
Also Published As
Publication number | Publication date |
---|---|
CN104331696B (en) | 2017-10-31 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US9830736B2 (en) | Segmenting objects in multimedia data | |
KR101639852B1 (en) | Pixel value compaction for graphics processing | |
WO2021115136A1 (en) | Anti-shake method and apparatus for video image, electronic device, and storage medium | |
CN111080766B (en) | GPU (graphics processing unit) acceleration mass target efficient rendering method based on WebGL | |
US20150170404A1 (en) | Virtual View Generating Method and Apparatus | |
EP3276574A1 (en) | Target tracking method and device | |
Wang et al. | Semantic segmentation of high-resolution images | |
CN114529658A (en) | Graph rendering method and related equipment thereof | |
WO2012172706A1 (en) | Motion image region identification device and method thereof | |
KR20160130455A (en) | Animation data generating method, apparatus, and electronic device | |
CN106251291A (en) | Utilize OpenGL with OpenCL to cooperate and realize the method and system of image scaling | |
Patro | Design and implementation of novel image segmentation and BLOB detection algorithm for real-time video surveillance using DaVinci processor | |
CN104331696A (en) | Image characteristic rapid extraction method based on graphic processing unit | |
US20220189027A1 (en) | Panorama Rendering Method, Electronic Device and Storage Medium | |
DE102023105068A1 (en) | Motion vector optimization for multiple refractive and reflective interfaces | |
US9798932B2 (en) | Video extraction method and device | |
CN105791655A (en) | Method for computing lens distortion of photographing module | |
CN110674778B (en) | High-resolution video image target detection method and device | |
CN111145108B (en) | Image processing method, device, equipment and storage medium | |
WO2017050075A1 (en) | Method and system for real-time slide displaying of scanned image | |
TWI480809B (en) | Image feature extraction method and device | |
CN108629786A (en) | Method for detecting image edge and device | |
WO2019114653A1 (en) | Method and apparatus for generating navigation guide diagram | |
CN104978712A (en) | Image processing method and device | |
CN110942419A (en) | Fuzzy processing method for full liquid crystal instrument ground glass |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant | ||
CF01 | Termination of patent right due to non-payment of annual fee | ||
CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20171031 Termination date: 20190928 |