CN103631568A - Medical-image-oriented multi-thread parallel computing method - Google Patents

Medical-image-oriented multi-thread parallel computing method Download PDF

Info

Publication number
CN103631568A
CN103631568A CN201310710668.0A CN201310710668A CN103631568A CN 103631568 A CN103631568 A CN 103631568A CN 201310710668 A CN201310710668 A CN 201310710668A CN 103631568 A CN103631568 A CN 103631568A
Authority
CN
China
Prior art keywords
thread
image
processing
divided
medical
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
CN201310710668.0A
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.)
Xiamen University
Original Assignee
Xiamen University
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 Xiamen University filed Critical Xiamen University
Priority to CN201310710668.0A priority Critical patent/CN103631568A/en
Publication of CN103631568A publication Critical patent/CN103631568A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Magnetic Resonance Imaging Apparatus (AREA)

Abstract

The invention discloses a medical-image-oriented multi-thread parallel computing method, and relates to a medical image processing method, in particular to an image processing and optimizing method for applying a multi-thread thought and a programming method to medical images. On a processor supporting hyper threading or a multi-core technology, multi-thread programming is performed by using hardware resources on the processor by means of software. The method comprises the following steps: partitioning a medical image needing to be processed into image blocks which can be processed independently and grouping the image blocks; simultaneously running a plurality of threads in different kernels of different processors at the same moment by using a multi-thread technology; enabling each thread to execute image block groups with relatively average workload from an original image respectively and to carry out parallel processing on an original image processing task set till all threads finish processing; and summarizing processing results, and outputting. Through the overall multi-thread parallel computation, the execution efficiency of image processing can be increased, and the aim of accelerating computation is fulfilled.

Description

Multithreads computing method towards medical image
Technical field
The present invention relates to medical image processing method, especially relate to a kind of multithreads computing method towards medical image.
Background technology
Medical image (comprising magnetic resonance image (MRI), computed tomography images and ultrasonoscopy etc.) is processed important role in medical image science and clinical practice.Along with development and the growing interest of people to medical treatment & health of image processing techniques, wish that reduce the working time of Medical Image Processing.The appearance of hyperthread and multi-core technology, provides possibility for accelerating Medical Image Processing.
The universal microprocessor 4004 in first, the whole world that 1971 Nian, Intel release, consists of 2300 transistors.Gordon mole just proposed by industry, to be regarded as afterwards " Moore's Law " of creed---every mistake 18 months at that time, and transistor size that can be integrated on chip will double.Because transistor size integrated on chip piece is more, mean that arithmetic speed is that dominant frequency is just faster.Yet, 2005, when approaching 4 gigahertz (GHZ) Shi, Intel and United States advanced microelectronic component company, dominant frequency finds, speed also can run into the oneself limit: that is exactly simple dominant frequency lifting, obvious Hoisting System overall performance.Just Hyper-Threading and polycaryon processor technology had in succession been there is afterwards.In February, 2002, Intel company has adopted first Hyper-Threading in the trendy Xeon of 130nm that the code name of its release is Prestonia.Hyper-Threading utilizes special hardware instruction, two logic kernels are modeled to two phy chips, allow single processor core can use Thread-Level Parallelism to calculate, and then the standby time of minimizing central processing unit, improve the operational efficiency of central processing unit, the while is compatible multithreading operation system and software also.Meanwhile, International Business Machine Corporation (IBM) has issued first polycaryon processor in the world October calendar year 2001---and the double-core compacting instruction set processor of Power4 by name, it is integrated in the Power personal computer processor of two 64 on a chips.The polycaryon processor that has multimicroprocessor core for a processor, can be encapsulated in two or more independent processor cores integrated a plurality of chips in an integrated circuit (IC) chip or on a mainboard.Hyperthread and polycaryon processor technical development so far, have been widely used on ordinary individual's computer machine.Therefore, make full use of the computing machine that we can use, design multi-thread concurrent executive routine, raising computer program efficiency and resource utilization seem and are even more important.
Summary of the invention
The object of the present invention is to provide the multithreads computing method towards medical image based on hyperthread and polycaryon processor technology.
The present invention includes following steps:
1) source images is decomposed, be divided into can independent processing at least 2 little image blocks, reach and the processing of original image is divided into the subtask that a size is Q gathers;
2) use C language or open multiprocessing (Open Multi-Processing, OpenMP) Mutli-thread Programming Technology in language creates N thread, then Q the sub-set of tasks being obtained by step 1) decomposition all being given to N thread goes to carry out, each thread execution Q is divided by N subtask, when the aliquant N of Q, last thread may make an exception, and carries out Q to a N remainder subtask, wherein Q is general assignment number, the Thread Count that N is program creation;
3), if there is the operation that gathers to all image blocks in implementation, can use following two methods to carry out multithreading synchronous:
(1) use the multithreadings such as critical section to add lock technology, the source synchronous that realizes each thread gathers;
(2) preserve thread process result data in parent process, treat that all processes gather after finishing again.
In step 1), described source images is decomposed, the concrete grammar that is divided at least 2 little image blocks that can independent processing can be: first source images is carried out to border extension, source images after expansion be take to each pixel as starting point, source images is divided into little image block, reaches the processing of original image is divided into the subtask set that a size is Q.
In order to reduce the central processing unit resource consuming in thread creation, management and synchronizing process, when designing and writing multithread processing method, should avoid many batches of generations that create situation of source synchronous and thread as far as possible.
The present invention makes full use of hyperthread and many kernels of central processing unit in medical image (comprising magnetic resonance image (MRI), computed tomography images and ultrasonoscopy etc.) is processed, realize the parallel computation of Medical Image Processing thread level, the subtask with independence is assigned to concurrent execution in a plurality of threads, reduce the execution time of Medical Image Processing program, raising program operational efficiency, reaches the target of optimizing Medical Image Processing program.
Accompanying drawing explanation
Fig. 1 is the treatment scheme schematic diagram of serial task collection.
Fig. 2 is the treatment scheme schematic diagram of parallel task collection.
Fig. 3 is number of threads and the program execution time curve map of multithreads computing.In Fig. 3, first point of curve is processed the required time for serial program, the magnetic resonance image (MRI) that experiment condition is Windows7 operating system, 4 core processors, 8 hyperthreads, dominant frequency 3.4 GHzs, carry out based on non local image operator are processed, and its parameter situation is as table 3.
Embodiment
The embodiment of the present invention comprises the following steps:
1) source images is decomposed, be divided into can independent processing a plurality of little image block (example is as shown in table 1, first 64x64 image is carried out to border extension, image after expansion be take to each pixel as starting point, the little image block that source images is divided into 4096 8x8), reach the processing of original image has been divided into a subtask set that size is Q;
Table 1
In table 1, digital value represents pixel number, and the solid bold box region that adds is original image, in fine and closely woven dotted line frame be to take the image block 1 that pixel 1 is pivot expansion, adds thick dashed line frame region and be to take the image block that pixel 2 expands as pivot.
2) use C language or open multiprocessing (Open Multi-Processing, OpenMP) Mutli-thread Programming Technology in language creates N thread, then Q the subtask being obtained by decomposition in step 1 divided equally to N thread and gone to carry out, divided by N subtask, (wherein Q is general assignment number to each thread execution Q, N is the Thread Count of program creation) individual, when the aliquant N of Q, last thread may make an exception, and carries out Q to a N remainder subtask;
3), if there is the operation that gathers to all image blocks in implementation, can use following two methods to carry out multithreading synchronous:
(1) use the multithreadings such as critical section to add lock technology, the source synchronous that realizes each thread gathers;
(2) preserve thread process result data in parent process, treat that all processes gather after finishing again.
In order to reduce the central processing unit resource consuming in thread creation, management and synchronizing process, when designing and writing multithread processing method, should avoid many batches of generations that create situation of source synchronous and thread as far as possible.
Below provide concrete implementation step:
1) source images piecemeal: by source images according to certain rule resolve into can independent processing a plurality of little image block, the processing of original image has been divided into a task-set that size is Q;
Piecemeal situation in the embodiment of the present invention is as follows: as table 1, be 64 * 64 former figure images of need processing, totally 4096 pixels.Piecemeal in the present embodiment is determined the image block of little 8 * 8 by each pixel, mark is carried out to image block in the position (top left corner pixel of image block or other pixel) of the interior determined pixel by image block, and the follow-up processing to this image block is called as a subtask.Wherein, table 2 is the parameter declaration of image block program.
Table 2
Figure BDA0000443188100000041
2) multi-thread concurrent Processing tasks.
Utilize the Mutli-thread Programming Technology of C language, application programming interface (the Application Programming Interface that comprises Windows or Linux, API) function library or open multiprocessing (Open Multi-Processing, OpenMP) programming language, create N thread, then Q task in the task-set obtaining will be decomposed in step 1), all give N each Q of thread divided by N subtask, last thread may make an exception, and carries out Q to a N remainder subtask.
Fig. 1 provides the treatment scheme schematic diagram of serial task collection, Fig. 2 provides the treatment scheme schematic diagram of parallel task collection, for the image that has the task-set of 64 * 64 number of sub images pieces is processed (processing time of remembering the image block that each task needs is 1 chronomere), if adopt traditional serial program processing mode, all images that are disposed, will consume 64 * 64 unit interval.The multithreads computing method that adopts this patent to propose, supposes to carry out Processing tasks with 16 threads, and each thread parallel is carried out 16 * 16 tasks and can be reduced to 4 * 64 unit interval the whole processing time so.The resource consumption of removing operating system establishment and management thread, multithread programs still has acceleration capacity at double.
Because the establishment of thread, management, destruction etc. all can consume the resource of central processing unit, should not repeatedly create thread carries out task distribution, and best in processing procedure (but being not limited to) only carried out establishment and the disposable task of a multithreading and distributed.When the number of threads creating and processor core calculation (comprising hyperthread virtual core) are quite or when bigger, executive routine can maximized use cpu resource, thereby reaches maximized acceleration object.As can be seen from Figure 3, in the calculating of 4 core 8 hyperthreads, process based on non local image operator (Xiaobo Qu, Yingkun Hou, Fan Lam, Di Guo, Jianhui Zhong, Zhong Chen.Magnetic resonance image reconstruction from undersampled measurements using a patch-based nonlocal operator, Medical Image Analysis, DOI:10.1016/j.media.2013.09.007, 2013) magnetic resonance image (MRI) Processing Example, can be reduced to 0.4s from 1.6s computing time, multi-threaded parallel will shorten to original 1/4 computing time.Wherein, table 3 is parameter service condition in embodiment.
The non local image operator parameter declaration of table 3
3) carry out if desired multithreading synchronous.
In implementation, if any gathering operation, can use the multithreadings such as critical section to add lock technology and realize source synchronous, gather; In addition, if internal memory is abundant and permission, temporary result data, in parent process storehouse, are treated by main thread unification, to be gathered after all process technology.

Claims (2)

1. towards the multithreads computing method of medical image, it is characterized in that comprising the following steps:
1) source images is decomposed, be divided into can independent processing at least 2 little image blocks, reach and the processing of original image is divided into the subtask that a size is Q gathers;
2) use C language or open multiprocessing (Open Multi-Processing, OpenMP) Mutli-thread Programming Technology in language creates N thread, then Q the sub-set of tasks being obtained by step 1) decomposition all being given to N thread goes to carry out, each thread execution Q is divided by N subtask, when the aliquant N of Q, last thread may make an exception, and carries out Q to a N remainder subtask, wherein Q is general assignment number, the Thread Count that N is program creation;
3), if there is the operation that gathers to all image blocks in implementation, use following two methods to carry out multithreading synchronous:
(1) use the multithreadings such as critical section to add lock technology, the source synchronous that realizes each thread gathers;
(2) preserve thread process result data in parent process, treat that all processes gather after finishing again.
2. as claimed in claim 1 towards the multithreads computing method of medical image, it is characterized in that in step 1), described source images is decomposed, the concrete grammar that is divided at least 2 little image blocks that can independent processing is: first source images is carried out to border extension, source images after expansion be take to each pixel as starting point, source images is divided into little image block, reaches the processing of original image is divided into the subtask set that a size is Q.
CN201310710668.0A 2013-12-20 2013-12-20 Medical-image-oriented multi-thread parallel computing method Pending CN103631568A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201310710668.0A CN103631568A (en) 2013-12-20 2013-12-20 Medical-image-oriented multi-thread parallel computing method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310710668.0A CN103631568A (en) 2013-12-20 2013-12-20 Medical-image-oriented multi-thread parallel computing method

Publications (1)

Publication Number Publication Date
CN103631568A true CN103631568A (en) 2014-03-12

Family

ID=50212669

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201310710668.0A Pending CN103631568A (en) 2013-12-20 2013-12-20 Medical-image-oriented multi-thread parallel computing method

Country Status (1)

Country Link
CN (1) CN103631568A (en)

Cited By (19)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105224289A (en) * 2014-07-03 2016-01-06 阿里巴巴集团控股有限公司 A kind of action message matching process and equipment
CN105245881A (en) * 2015-09-28 2016-01-13 杭州九言科技股份有限公司 Method and device for processing digital image filter
CN105634984A (en) * 2015-12-29 2016-06-01 重庆安碧捷科技股份有限公司 Multithread many-to-many medical data transmission method based on TCP protocol
CN105654491A (en) * 2015-12-31 2016-06-08 南京华捷艾米软件科技有限公司 Method for extracting deep continuous object images in parallel from background image
CN105825532A (en) * 2016-03-23 2016-08-03 长沙博为软件技术股份有限公司 Optimized medical image multiplanar reconstruction method
CN107291553A (en) * 2017-06-30 2017-10-24 电子科技大学 A kind of method for scheduling task spliced based on square
CN107463541A (en) * 2017-07-31 2017-12-12 武汉斗鱼网络科技有限公司 File difference comparative approach, storage medium, electronic equipment and system
CN107479961A (en) * 2017-08-28 2017-12-15 湖南友哲科技有限公司 Based on the quick scanning processing method of computer multiple thread multinuclear microscopic cell image
CN107679731A (en) * 2017-09-26 2018-02-09 金蝶软件(中国)有限公司 The computational methods and relevant device of a kind of confidence level
CN107678853A (en) * 2016-08-02 2018-02-09 中国电信股份有限公司 The dispatching method and device of graphics processing tasks
CN108875207A (en) * 2018-06-15 2018-11-23 岭东核电有限公司 A kind of nuclear reactor optimum design method and system
CN109145930A (en) * 2018-08-23 2019-01-04 陕西师范大学 It is a kind of based on semi-supervised image significance detection method
CN109448075A (en) * 2018-10-15 2019-03-08 网宿科技股份有限公司 A kind of image processing method and server
CN109961390A (en) * 2017-12-22 2019-07-02 飞依诺科技(苏州)有限公司 Data localized method and system
CN110704517A (en) * 2018-06-21 2020-01-17 北京国双科技有限公司 Method and device for generating task, storage medium and processor
CN112587235A (en) * 2020-12-07 2021-04-02 南京凌华微电子科技有限公司 Binocular navigator hyper-threading optimization method
CN114125299A (en) * 2021-11-26 2022-03-01 凌云光技术股份有限公司 Industrial camera and control method thereof
CN116909718A (en) * 2023-09-13 2023-10-20 北京谷器数据科技有限公司 Parallel computing method based on thread waiting and asynchronous report
CN117061759A (en) * 2023-10-11 2023-11-14 苏州元脑智能科技有限公司 Image compression method, device, computer equipment and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102130897A (en) * 2010-04-26 2011-07-20 上海理滋芯片设计有限公司 Cloud computing-based video acquisition and analysis system and method
CN102164533A (en) * 2008-09-26 2011-08-24 皇家飞利浦电子股份有限公司 Diagnostic imaging system and method
CN102163319A (en) * 2011-03-02 2011-08-24 浪潮(北京)电子信息产业有限公司 Method and system for realization of iterative reconstructed image
CN102436368A (en) * 2011-12-31 2012-05-02 北京像素软件科技股份有限公司 Instruction processing method in online game
CN102831007A (en) * 2011-06-14 2012-12-19 中兴通讯股份有限公司 Accessing method for real-time processing shared resource in system and real-time processing system

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102164533A (en) * 2008-09-26 2011-08-24 皇家飞利浦电子股份有限公司 Diagnostic imaging system and method
CN102130897A (en) * 2010-04-26 2011-07-20 上海理滋芯片设计有限公司 Cloud computing-based video acquisition and analysis system and method
CN102163319A (en) * 2011-03-02 2011-08-24 浪潮(北京)电子信息产业有限公司 Method and system for realization of iterative reconstructed image
CN102831007A (en) * 2011-06-14 2012-12-19 中兴通讯股份有限公司 Accessing method for real-time processing shared resource in system and real-time processing system
CN102436368A (en) * 2011-12-31 2012-05-02 北京像素软件科技股份有限公司 Instruction processing method in online game

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
沈建军等: "一种精确的图象边界扩展方法", 《信号处理》, vol. 14, 31 December 1998 (1998-12-31) *

Cited By (27)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105224289A (en) * 2014-07-03 2016-01-06 阿里巴巴集团控股有限公司 A kind of action message matching process and equipment
CN105245881B (en) * 2015-09-28 2019-04-19 杭州九言科技股份有限公司 A kind of method and apparatus of digital picture filter processing
CN105245881A (en) * 2015-09-28 2016-01-13 杭州九言科技股份有限公司 Method and device for processing digital image filter
CN105634984A (en) * 2015-12-29 2016-06-01 重庆安碧捷科技股份有限公司 Multithread many-to-many medical data transmission method based on TCP protocol
CN105654491A (en) * 2015-12-31 2016-06-08 南京华捷艾米软件科技有限公司 Method for extracting deep continuous object images in parallel from background image
CN105825532A (en) * 2016-03-23 2016-08-03 长沙博为软件技术股份有限公司 Optimized medical image multiplanar reconstruction method
CN107678853B (en) * 2016-08-02 2020-08-25 中国电信股份有限公司 Method and device for scheduling graphic processing task
CN107678853A (en) * 2016-08-02 2018-02-09 中国电信股份有限公司 The dispatching method and device of graphics processing tasks
CN107291553A (en) * 2017-06-30 2017-10-24 电子科技大学 A kind of method for scheduling task spliced based on square
CN107291553B (en) * 2017-06-30 2020-05-12 电子科技大学 Task scheduling method based on block splicing
CN107463541A (en) * 2017-07-31 2017-12-12 武汉斗鱼网络科技有限公司 File difference comparative approach, storage medium, electronic equipment and system
CN107479961B (en) * 2017-08-28 2019-12-27 湖南友哲科技有限公司 Cell image rapid scanning processing method based on computer multithreading multi-core microscope
CN107479961A (en) * 2017-08-28 2017-12-15 湖南友哲科技有限公司 Based on the quick scanning processing method of computer multiple thread multinuclear microscopic cell image
CN107679731A (en) * 2017-09-26 2018-02-09 金蝶软件(中国)有限公司 The computational methods and relevant device of a kind of confidence level
CN109961390A (en) * 2017-12-22 2019-07-02 飞依诺科技(苏州)有限公司 Data localized method and system
CN109961390B (en) * 2017-12-22 2023-07-21 飞依诺科技股份有限公司 Parallel image processing method and system
CN108875207B (en) * 2018-06-15 2022-11-11 岭东核电有限公司 Nuclear reactor optimization design method and system
CN108875207A (en) * 2018-06-15 2018-11-23 岭东核电有限公司 A kind of nuclear reactor optimum design method and system
CN110704517A (en) * 2018-06-21 2020-01-17 北京国双科技有限公司 Method and device for generating task, storage medium and processor
CN109145930A (en) * 2018-08-23 2019-01-04 陕西师范大学 It is a kind of based on semi-supervised image significance detection method
CN109448075A (en) * 2018-10-15 2019-03-08 网宿科技股份有限公司 A kind of image processing method and server
CN112587235A (en) * 2020-12-07 2021-04-02 南京凌华微电子科技有限公司 Binocular navigator hyper-threading optimization method
CN114125299A (en) * 2021-11-26 2022-03-01 凌云光技术股份有限公司 Industrial camera and control method thereof
CN114125299B (en) * 2021-11-26 2023-10-10 凌云光技术股份有限公司 Industrial camera and control method thereof
CN116909718A (en) * 2023-09-13 2023-10-20 北京谷器数据科技有限公司 Parallel computing method based on thread waiting and asynchronous report
CN117061759A (en) * 2023-10-11 2023-11-14 苏州元脑智能科技有限公司 Image compression method, device, computer equipment and storage medium
CN117061759B (en) * 2023-10-11 2024-02-06 苏州元脑智能科技有限公司 Image compression method, device, computer equipment and storage medium

Similar Documents

Publication Publication Date Title
CN103631568A (en) Medical-image-oriented multi-thread parallel computing method
Wong et al. Pangaea: a tightly-coupled IA32 heterogeneous chip multiprocessor
Chouchene et al. Optimized parallel implementation of face detection based on GPU component
DE102021106796A1 (en) MEMORY ERROR ISOLATION TECHNIQUES
DE102021103492A1 (en) APPLICATION PROGRAMMING INTERFACE TO ACCELERATE MATRIX OPERATIONS
DE112022001140T5 (en) IMPLEMENTING A MATRIX VALUE DETERMINATION
DE112021005433T5 (en) METHOD FOR BALANCING THE POWER OF MULTIPLE CHIPS
DE112022003222T5 (en) MULTI-ARCHITECTURE EXECUTION GRAPHS
DE102022131708A1 (en) APPLICATION PROGRAMMING INTERFACE TO LIMIT MEMORY
Asaduzzaman et al. A talented CPU-to-GPU memory mapping technique
DE102023101893A1 (en) GRAPH-BASED STORAGE
DE102022124362A1 (en) USER CONFIGURABLE MEMORY ALLOCATION
DE102022132008A1 (en) ASYNCHRONE MEMORY DEALLOCATION
DE102022132013A1 (en) APPLICATION PROGRAMMING INTERFACES FOR INTEROPERABILITY
DE102022131530A1 (en) METHOD OF MODIFYING GRAPH CODE
DE112022002953T5 (en) PARALLEL PROCESSING OF THREAD GROUPS
DE102022104253A1 (en) Tone management using tone enhancement functions for high dynamic range imaging applications
DE112022000425T5 (en) SIMULTANEOUS CODE INTRODUCTION
Boyer Improving Resource Utilization in Heterogeneous CPU-GPU Systems
DE112020007283T5 (en) Docking board for a multi-format graphics processing unit
Ju et al. Benchmarking renderscript: potential for energy efficient multi-core mobile devices
DE102023122030A1 (en) FREQUENCY ADJUSTMENT FOR PROCESSORS
DE102022132672A1 (en) APPLICATION PROGRAMMING INTERFACE FOR SAVING PORTIONS OF AN IMAGE
Zhang et al. Realization and optimization of Sobel edge detection algorithm for Domestic DCU accelerators
DE102022123627A1 (en) APPLICATION PROGRAMMING INTERFACE FOR SETTING UP GRAPH RESOURCES

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C02 Deemed withdrawal of patent application after publication (patent law 2001)
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20140312