Welcome to Scribd, the world's digital library. Read, publish, and share books and documents. See more ➡
Download
Standard view
Full view
of .
Add note
Save to My Library
Sync to mobile
Look up keyword
Like this
2Activity
×
0 of .
Results for:
No results containing your search query
P. 1
Multithreaded Image Processing

Multithreaded Image Processing

Ratings: (0)|Views: 340|Likes:
Published by ijcsis
real time image processing applications require a huge amount of processing power, computing ability and large resources to perform the image processing applications. The nature of processing in typical image processing algorithms ranges from large arithmetic operations to fewer one. This paper presents an implementation of image processing operations using simultaneous multithreading, the performance of multithreading is analyzed and discussed, for the varying number of images.
real time image processing applications require a huge amount of processing power, computing ability and large resources to perform the image processing applications. The nature of processing in typical image processing algorithms ranges from large arithmetic operations to fewer one. This paper presents an implementation of image processing operations using simultaneous multithreading, the performance of multithreading is analyzed and discussed, for the varying number of images.

More info:

Published by: ijcsis on Oct 12, 2011
Copyright:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as PDF, TXT or read online from Scribd
See More
See less

10/31/2012

pdf

text

original

 
(IJCSIS) International Journal of Computer Science and Information Security,Vol. 9, No. 9, September 2011
Multithreaded Image Processing
Jamil A. M. Saif 
Computer Science DepartmentFaculty of Computer Science and engineeringHodeidah UniversityHodeidah, Yemene-mail: jamil_alabssi@yahoo.com
Hamid S. S. Alraimi
Computer Science DepartmentFaculty of Computer Science and engineeringHodeidah UniversityHodeidah, Yemene-mail:
halraimi@gmail.com
 
 Abstract 
 — 
 
real time image processing applications require ahuge amount of processing power, computing ability and largeresources to perform the image processing applications. Thenature of processing in typical image processing algorithmsranges from large arithmetic operations to fewer one.This paper presents an implementation of image processingoperations using simultaneous multithreading, the performanceof multithreading is analyzed and discussed, for the varyingnumber of images.
 Keywords- multithreading; image processing; performance.
I.
 
I
 NTRODUCTION
Recently digital image processing has a broad spectrum of applications, such as multimedia systems, business systems,monitoring, inspection systems, and archiving systems. In spiteof digitization, storage, transmission, and display operations,extra functions are considered. They are as follows: image datacompression and representation, image enhancement andreconstruction, image indexing, retrieval and matching, etc. andthey are executed on application oriented servers.Generally three levels of image processing aredistinguished to analyze and tackle the image processingapplication[1]: low-level operations, intermediate-leveloperations, and high-level operations.Low-level operations: Images are transformed intomodified images. These operations Work on whole imagestructures and yield an image, a vector, or a single value. Thecomputations have a local nature; they work on single pixels inan image. Examples of Low-level operations are: smoothing,convolution and histogram generation.An intermediate-level operations: Images are transformedinto other data structures. These operations work on images and produce more compact data structures (e.g. a list). Thecomputations usually do not work on a whole image but onlyon objects/segments (so called regions of interest ROI) in theimage. Examples of intermediate-level operations are: regionlabeling and motion analysis.A high-level operations: Information derived from imagesis transformed into results or actions. These operations work ondata structures (e.g. a list) and lead to decisions in theapplication. So high-level operations can be characterized assymbolic processing. An example of a high-level operation isobject recognition.There is a big challenge concerning image processing dueto time consuming computation, some researches address this problem using parallel environments[2,5 ] such as PVM, MPI,others used distributed parallel processing using java RMI,Sockets and Corba[4].In image processing operations the existing approach to parallelism get constrained due to variant size of data and therequired resources. Hence a system is required for the efficientcontrolling of image processing operation with variable datasize. for this reason a multithreading approach is proposed.The contents of this paper is organize as follows :in section2 image conversion is presented, in section 3 a multithreadingand its related concepts are defined, in section 4 the resultsobtained from the experiments are described and discussed,finally the summarized conclusion is given.II.
 
I
MAGE CONVERSION
In this paper a low level image processing is used that willmodify RGB colored image into grey scale one, the RGBimage is transformed according to the following formula [6]:valuescalegreyisIand1,ααα:where ..(1),..........B.........αGααI
321321
 For each pixel in RGB image the I grey scale value iscalculated and this calculation is repeated by scanning thewhole image starting from the upper left corner to the bottomright corner of the given image, and this calculation may berequired for several images, these heavy computations needsome way to reduce the cost of computation.III.
 
M
ULTITHREADING AND ITS RELATED CONCEPTS
Multithreading is a technique that allows a program or a process to do many tasks concurrently at the same time [9,10].Multithreading allows a process to run tasks in parallel on asymmetric multiprocessing (SMP) system or a chipmultithreading [7,8] (CMT) system, allowing the process toscale linearly with the number of cores or processors, whichimproves performance, increases efficiency, and increasesthroughput.
20http://sites.google.com/site/ijcsis/ISSN 1947-5500
 
(IJCSIS) International Journal of Computer Science and Information Security,Vol. 9, No. 9, September 2011
Running multiple processes concurrently is calledmultiprocess programming. A process is a heavyweight entitythat lives inside the kernel. It consists of the address space,registers, stack, data, memory maps, virtual memory, user IDs,file descriptors, and kernel states. Where as a thread is alightweight entity that can live in the user space or the kerneland consists of registers, stack, and data. Multiple threads sharea process, that is, they share the address space, user IDs, virtualmemory, file descriptors, and kernel states. The threads withina process share data, and they can see each other, to distinguish between a process and a thread see Fig. 1, where two threadswithin one process.
Figure 1. A process with two threads of execution.
Multithreading [8] is a way of achieving multitasking in a program. Multitasking is the ability to execute more than onetask at the same time see Fig. 2. Multitasking can be dividedinto Process-based multitasking and thread-based multitasking.
a) b)Figure 2. a) with single task b) with two tasks
Process-based multitasking feature enables you to switchfrom one program to another so fast that it appears as if the programs are executing at the same time.Where as thread-based multitasking context-switch isextremely fast and can be in user space or at the kernel central processing unit (CPU) level. A process is heavyweight, so itcosts more to context-switch than a thread.A single program can contain two or more threads andtherefore, perform two or more tasks simultaneously see Figure2. A text editor can perform writing to a file and print adocument simultaneously with separate threads performing thewriting and printing actions.In the text editor, you can format text in a document and printthe document at the same time. There are fewer overloadswhen the processor switches from one thread to another.Therefore, threads are called lightweight process. On the other hand, when the processor switches from one process to another  process the overload increases.Advantages of multithreading are: improved performance,minimized system resource usage, simultaneous access tomultiple applications and program structure simplification.Improved performance provides improvement in the performance of the processor by simultaneous execution of computation and the I/O operation see Fig 2 . . Minimizedsystem resource usage minimizes the use of system resources by using threads, which are the same address space and belongto the same process. Simultaneous access to multipleapplications provides access to multiple applications at thesame time because of quick context switching among threads.A thread is lightweight, so many threads can be created to useresources efficiently. The threads are all within a process seeFigure 1, so they can share global data. A blocking request byone thread will not stop another thread from executing its task.Also, the process will not get context-switched because athread is blocked.Multiprocess programming is much more difficult thanmultithreaded programming, performance is slower, andmanagement of resources is difficult. Also, synchronizationand shared memory use are more difficult with processes thanwith threads, because threads share memory at the process leveland global memory access is easy with threads.The result of multithreading is increased performance,increased throughput, increased responsiveness, the ability toexecute tasks repeatedly, increased efficiency, better management of resources, and lowered costs [3,7].IV.
 
E
XPERIMENTS
 .Net environments for implementing multithreading imageconversion were used, testing the multithreading with variablenumber of RGB colored images (9, 15, 30 and 50) each of 600x400 pixels of size, converting images into grey scaleaccording to the formula 1., that image conversion carried outusing single thread as well as multithreading varies from 2 to10 threads.The obtained results are shown in Figure 3.,demonstrate theefficiency of multithreading. As noticed every image took around 2 [ms] of computation, and since for our experiments alaptop with a dual core cpu of 3000 MHz was used, at leasttwo threads are needed to fully utilize the two cores, so that isillustrated in the Fig. 3, using two threads cause reducingexecution time to about 50% , while for three threads and moresome slight improvement is seen, and as the date size increase(number of images) the performance almost remains the same,this is due to the multithreading overhead in comparison withcomputation time.
21http://sites.google.com/site/ijcsis/ISSN 1947-5500

You're Reading a Free Preview

Download
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->