CN110009551A - A kind of real-time blood vessel Enhancement Method of CPUGPU collaboration processing - Google Patents

A kind of real-time blood vessel Enhancement Method of CPUGPU collaboration processing Download PDF

Info

Publication number
CN110009551A
CN110009551A CN201910281460.9A CN201910281460A CN110009551A CN 110009551 A CN110009551 A CN 110009551A CN 201910281460 A CN201910281460 A CN 201910281460A CN 110009551 A CN110009551 A CN 110009551A
Authority
CN
China
Prior art keywords
component
cpu
gpu
data
blood vessel
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
CN201910281460.9A
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.)
Zhejiang University ZJU
Original Assignee
Zhejiang University ZJU
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 Zhejiang University ZJU filed Critical Zhejiang University ZJU
Priority to CN201910281460.9A priority Critical patent/CN110009551A/en
Publication of CN110009551A publication Critical patent/CN110009551A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T1/00General purpose image data processing
    • G06T1/20Processor architectures; Processor configuration, e.g. pipelining
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Image Processing (AREA)

Abstract

The invention discloses a kind of real-time blood vessel Enhancement Methods based on CPUGPU collaboration processing, and this method comprises the following steps: 1, completing the acquisition of image data using CPU, JPG data are decoded as yuv data using GPU;2, down-sampling processing is carried out to Y-component in CPU;3, in GPU, Steerable filter processing is carried out to the Y-component after down-sampling;4, by treated in step 3 data copy into CPU, by Steerable filter, treated that Y-component is up-sampled to former size of data in CPU;5, step 4 treated Y-component is merged with former Y-component in GPU;6, data after processing RGBA format is converted in conjunction with UV component to obtain finally enhancing image and show.Method of the invention is enhanced using CPU and the real-time blood vessel of GPU collaborative process, traditional blood vessel enhancing that CPU is processed that is used only is optimized, so that processing speed is significantly enhanced.This method is established on conventional CPU and GPU architecture, and programming is convenient, portable very high, can be widely used.

Description

A kind of real-time blood vessel Enhancement Method of CPUGPU collaboration processing
Technical field
The invention belongs to Biomedical Image process fields, in particular to a kind of to be based on central processing unit (CPU) and figure The blood vessel Enhancement Method of processor (GPU) collaboration processing.
Background technique
For medical image due to the limitation of image-forming condition, the contrast of image is relatively low.And medically, doctor passes through to doctor The visual inspection for learning image carries out medical diagnosis, and the quality of image directly affects the diagnosis effect of doctor, therefore to medicine figure It is particularly important as carrying out brightness and details enhancing.However, as endoscope is to the even more high-resolution hair of full HD, 4K Exhibition, the operation time of image algorithm become the bottleneck for restricting endoscope development.In general, operation is for height on conventional CPU The blood vessel of clear image enhances algorithm, is extremely difficult to the requirement of real time of 25fps.In order to solve this problem, researcher proposes Various solutions.These methods can be mainly divided into two classes: the first improves image processing algorithm to improve operation Speed, second is to accelerate calculating process using the promotion of hardware device performance.
With the development of GPU technology, which progresses into the visual field of people.CPU and the essential difference of GPU equipment embody The greatest differences of processor quantity in every equipment, CPU is typical four cores or eight nuclear equipments, for holding for program operation Row nuclear volume is fewer;And the GPU of Fermi's framework just possesses 16 stream multiprocessors (SM), each SM is considered as the one of CPU A core, it is exactly a kind of parallel schema that GPU default is lower, its SM can calculate 32 numbers simultaneously every time and only count like that rather than CPU Calculate a number.Therefore, the GPU for possessing high-speed parallel computing capability is a kind of ideal execution high-definition picture processing calculation The equipment of method.NVIDIA company in 2008 is proposed CUDA (Compute Unified Device Architecture), CUDA It is a kind of parallel computation framework, which makes GPU be able to solve complicated computational problem.Meanwhile CUDA framework is by C/C++ language Speech is write, and further reduced the difficulty that developer uses this framework to program, is conducive to the extensive of GPU accelerating algorithm operation Using.So can easily realize image processing algorithm on CUDA frame.
Summary of the invention
The object of the present invention is to provide a kind of real-time blood vessel Enhancement Methods of CPUGPU collaboration processing.This method uses CPU Operation is cooperateed with to realize blood vessel enhancing with GPU, by promoting the concurrency of enhancing algorithm, to improve the operation effect of entire algorithm Rate.
The present invention provides a kind of real-time blood vessel Enhancement Method of CPUGPU collaboration processing, comprising the following steps:
I. the acquisition that blood-vessel image data are completed using CPU, is obtained JPG data, JPG data is decoded as YUV using GPU Data;
II. yuv data is imported into CPU, down-sampling is carried out to the Y-component of data in CPU and handles to obtain YSComponent;
III. by II, treated that image data copies in GPU, to YSComponent carries out Steerable filter and handles to obtain YSGPoint Amount;
IV. by III treated Y in CPUSGComponent carries out up-sampling treatment to life size and obtains YGComponent;
V. the Y generated IV in GPUGComponent is merged the Y enhanced with former Y-componentEComponent;
VI. finally by image YEUV data are converted to RGBA format, obtain finally enhancing image and show.
In above-mentioned technical proposal, it is preferred that carried out simultaneously in CPU using SSE (Streaming SIMD Extensions) Row calculates, and carries out parallel computation using CUDA in GPU.
Preferably, it needs to divide image data to be processed according to thread block in GPU, contain in a thread block Several threads;Per thread block corresponds respectively to a part of data in image, and the per thread in thread block respectively corresponds place One or several pixels of image are managed, if image data size to be processed is W × H, the size of thread block is w × h, then W can be divided exactly by w, and H can be divided exactly by h.
It is furthermore preferred that the integral multiple that contained number of threads is 32 in the per thread block.
It is furthermore preferred that contained number of threads is 1024 in the per thread block.
It is furthermore preferred that register number used in per thread block is less than the register number that GPU is possessed.
The beneficial effects of the present invention are:
GPU is applied in image procossing by method of the invention, and aiding CPU optimizes blood vessel enhancing algorithm.Pass through Image to be processed is carried out down-sampling processing to data in CPU by step II, reduces transmission of the data between CPU and GPU Amount;Image copy is into GPU after being sampled by step III, according to the wide high information of image and GPU characteristic, so that each The one or several image slices vegetarian refreshments of thread alignment processing, improve the degree of concurrence of image procossing, so that arithmetic speed obtains substantially Degree is promoted.It generally requires respectively to carry out R, G, B three-component respectively enhancing processing not when secondly, handling with CPU in existing method Together, method of the invention enhancing is carried out only for Y-component, and processing in this way also reduces colour while reducing calculation amount and makes an uproar Sound keeps enhancing picture quality higher.For whole system process, the processing of Y-component can be merged JPG's In decoding process, extra computation not will increase.
Detailed description of the invention
Fig. 1 is overall flow schematic diagram of the invention;
Fig. 2 is the corresponding relationship of the thread block of embodiment, thread and image slices vegetarian refreshments;
Fig. 3 is the original image of embodiment;
Fig. 4 is that blood vessel enhancing treated image is run using only CPU;
Fig. 5 is CPU and GPU synthetic operation blood vessel enhancing treated image.
Specific embodiment
The basic procedure of the method for the present invention as shown in Figure 1, below by specific example to technical solution of the present invention do into One step interpretation, but the example is not limiting the scope of the invention.
The method of the present invention specifically includes the following steps:
1, the acquisition of blood-vessel image data is completed using CPU, obtains JPG data, JPG data are decoded as YUV using GPU Data;In the present embodiment, image resolution ratio to be processed is 1280 × 800, will using SSE instruction set first in CPU such as Fig. 3 The Y-component of image is down-sampled to 320 × 200, obtains YSComponent.
2, by YSComponent is copied to GPU, distributes thread and thread block, determine thread block, thread and each pixel of image it Between relationship;32 × 4 threads, the corresponding pixel of per thread are distributed in per thread block;It is divided into 10 × 50 thread blocks.
3, to Y in GPUSComponent carries out Steerable filter and handles to obtain YSGFollowing several kernel functions specifically can be used in component To realize:
Kernel function 1 is responsible for calculating each pixel YSThe gray value square value YY of component, is completed at the same time to YSMean filter SY;Kernel function 2 carries out mean filter SYY to YY, while calculating the difference Y2 of SYY and SY*SY;Coefficient is calculated in kernel function 3 Matrix A, B;Kernel function 4 carries out mean filter to A, B and obtains the Y of final processSGComponent Matrices SA, SB;
How a kind of concrete methods of realizing that above are only Steerable filter processing, specifically realize and do not limit in the present invention It is fixed;
Obtaining YSGIt carries out up-sampling after component to it in CPU again and obtains YGComponent, then again in GPU by YGComponent Merge enhancing with former Y-component and obtains YE, fusion can using following formula realize:
YE=(Y-YG)α+Y
Wherein, α is enhancement factor, can be set as needed, for example usually can be taken as 1.5.
4, by the Y in step 3EIn conjunction with UV component, image data is converted into RGBA format and obtains final enhancing figure Picture.
5, by image obtained in step 4, it is copied to CPU, carries out final display operation.
Using the enhanced image of the method for the present invention as shown in figure 5, and only CPU handles the enhanced image of blood vessel such as Fig. 4 It is shown.
Comparative test
If other conditions are the same, calculate using the present embodiment method and traditional only CPU pair of time Than it is as shown in the table to calculate the time:
By the above comparative test result it is found that with method of the invention, calculating blood vessel enhances the speed of algorithm faster, 5-6 times is improved relative to CPU operation is used only.

Claims (6)

1. a kind of real-time blood vessel Enhancement Method of CPUGPU collaboration processing, which comprises the following steps:
I. the acquisition that blood-vessel image data are completed using CPU, is obtained JPG data, JPG data is decoded as YUV number using GPU According to;
II. yuv data is imported into CPU, down-sampling is carried out to the Y-component of data in CPU and handles to obtain YSComponent;
III. by II, treated that image data copies in GPU, to YSComponent carries out Steerable filter and handles to obtain YSGComponent;
IV. by III treated Y in CPUSGComponent carries out up-sampling treatment to life size and obtains YGComponent;
V. the Y generated IV in GPUGComponent is merged the Y enhanced with former Y-componentEComponent;
VI. finally by image YEUV data are converted to RGBA format, obtain finally enhancing image and show.
2. the real-time blood vessel Enhancement Method of CPUGPU collaboration processing as described in claim 1, which is characterized in that adopted in CPU Parallel computation is carried out with SSE, parallel computation is carried out using CUDA in GPU.
3. the real-time blood vessel Enhancement Method of CPUGPU collaboration processing as described in claim 1, which is characterized in that needed in GPU Image data to be processed is divided according to thread block, several threads are contained in a thread block;Per thread block difference Corresponding to a part of data in image, the per thread in thread block respectively corresponds one or several pixels of processing image Point, if image data size to be processed is W × H, the size of thread block is w × h, then W can be divided exactly by w, and H can be whole by h It removes.
4. the real-time blood vessel Enhancement Method of CPUGPU collaboration processing as claimed in claim 3, which is characterized in that each of described The integral multiple that contained number of threads is 32 in thread block.
5. the real-time blood vessel Enhancement Method of CPUGPU collaboration processing as claimed in claim 3, which is characterized in that each of described Contained number of threads is 1024 in thread block.
6. the real-time blood vessel Enhancement Method of CPUGPU collaboration processing as claimed in claim 3, which is characterized in that per thread block Used in register number be less than the register number that GPU is possessed.
CN201910281460.9A 2019-04-09 2019-04-09 A kind of real-time blood vessel Enhancement Method of CPUGPU collaboration processing Pending CN110009551A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910281460.9A CN110009551A (en) 2019-04-09 2019-04-09 A kind of real-time blood vessel Enhancement Method of CPUGPU collaboration processing

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910281460.9A CN110009551A (en) 2019-04-09 2019-04-09 A kind of real-time blood vessel Enhancement Method of CPUGPU collaboration processing

Publications (1)

Publication Number Publication Date
CN110009551A true CN110009551A (en) 2019-07-12

Family

ID=67170566

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910281460.9A Pending CN110009551A (en) 2019-04-09 2019-04-09 A kind of real-time blood vessel Enhancement Method of CPUGPU collaboration processing

Country Status (1)

Country Link
CN (1) CN110009551A (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102630043A (en) * 2012-04-01 2012-08-08 北京捷成世纪科技股份有限公司 Object-based video transcoding method and device
CN102647588A (en) * 2011-02-17 2012-08-22 北京大学深圳研究生院 GPU (Graphics Processing Unit) acceleration method used for hierarchical searching motion estimation
US20160012567A1 (en) * 2014-07-08 2016-01-14 Qualcomm Incorporated Systems and methods for stereo depth estimation using global minimization and depth interpolation
CN107248150A (en) * 2017-07-31 2017-10-13 杭州电子科技大学 A kind of Multiscale image fusion methods extracted based on Steerable filter marking area
CN107527332A (en) * 2017-10-12 2017-12-29 长春理工大学 Enhancement Method is kept based on the low-light (level) image color for improving Retinex
CN107610058A (en) * 2017-08-28 2018-01-19 浙江工业大学 High-definition picture defogging method based on down-sampling

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102647588A (en) * 2011-02-17 2012-08-22 北京大学深圳研究生院 GPU (Graphics Processing Unit) acceleration method used for hierarchical searching motion estimation
CN102630043A (en) * 2012-04-01 2012-08-08 北京捷成世纪科技股份有限公司 Object-based video transcoding method and device
US20160012567A1 (en) * 2014-07-08 2016-01-14 Qualcomm Incorporated Systems and methods for stereo depth estimation using global minimization and depth interpolation
CN107248150A (en) * 2017-07-31 2017-10-13 杭州电子科技大学 A kind of Multiscale image fusion methods extracted based on Steerable filter marking area
CN107610058A (en) * 2017-08-28 2018-01-19 浙江工业大学 High-definition picture defogging method based on down-sampling
CN107527332A (en) * 2017-10-12 2017-12-29 长春理工大学 Enhancement Method is kept based on the low-light (level) image color for improving Retinex

Similar Documents

Publication Publication Date Title
CN109389556A (en) The multiple dimensioned empty convolutional neural networks ultra-resolution ratio reconstructing method of one kind and device
DE102021118059A1 (en) DEVICE AND METHOD FOR EFFICIENT GRAPHICS PROCESSING INCLUDING RAY TRACKING
US20230137438A1 (en) Apparatus and method for ray tracing instruction processing and execution
US11562468B2 (en) Apparatus and method for efficient distributed denoising of a graphics frame
CN105793891A (en) Method and device for determining a high resolution output image
DE102021207678A1 (en) STREAMING A COMPRESSED FIELD OF LIGHT
DE19920214A1 (en) Conversion of a fixed point and floating point numbers
DE102021119857A1 (en) GENERATION OF VIEWS USING ONE OR MORE NEURAL NETWORKS
DE102021121109A1 (en) RECOVERY OF THREE-DIMENSIONAL MODELS FROM TWO-DIMENSIONAL IMAGES
DE102022101555A1 (en) IMAGE SYNTHESIS USING ONE OR MORE NEURAL NETWORKS
CN103888771A (en) Parallel video image processing method based on GPGPU technology
DE102021127982A1 (en) STREAMING A FIELD OF LIGHT WITH LOSSLESS OR LOSSY COMPRESSION
DE102021122615A1 (en) IMAGE ENHANCEMENT USING ONE OR MORE NEURAL NETWORKS
DE112021000174T5 (en) UPSAMPLING AN IMAGE USING ONE OR MORE NEURAL NETWORKS
DE102018110346A1 (en) STORAGE SYSTEM FOR DNN OUTPUT FOR THE BLACK BOX
DE102021128962A1 (en) PICTURE MIXING USING ONE OR MORE NEURAL NETWORKS
DE102021128623A1 (en) UPSCALE AN IMAGE USING ONE OR MORE NEURAL NETWORKS
DE112021000999T5 (en) IMAGE GENERATION USING ONE OR MORE NEURAL NETWORKS
DE102022133630A1 (en) GENERATION OF IMAGE MIXING WEIGHTS
CN109903225A (en) A kind of medical image Enhancement Method based on deep learning
CN112767252A (en) Image super-resolution reconstruction method based on convolutional neural network
DE102022125600A1 (en) INPUT FILTERING AND SAMPLE ACCELERATION FOR SUPERSAMPLING
CN110047038B (en) Single-image super-resolution reconstruction method based on hierarchical progressive network
CN113205599B (en) GPU accelerated video texture updating method in video three-dimensional fusion
Han et al. VCNet: A generative model for volume completion

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: 20190712

RJ01 Rejection of invention patent application after publication