the technological advancement in communication network has facilitated healthcare professionals across the world in accessing electronic medical records , such as medical images , and obtaining second opinions for high - quality diagnosis . as a consequence , medical images are exposed to security threat such as tampering of images , which may lead to wrong diagnosis and treatment ; thus a digital watermarking on medical image is introduced .
so far most of the watermarking research has been done on single frame medical image which is impractical in the real environment , where most of the ultrasound medical images consist of multiframes ; thus a digital watermarking on multiframes medical images is proposed .
watermarking could be applied on ultrasound medical images frame by frame sequentially but it would be time consuming for a large dataset ; thus a parallel environment is necessary for speeding up multiframes watermarking process by utilizing multicore technology .
the performance improvements gained by the use of a multicore processor largely depended on the software algorithms used and their implementation . according to amdahl 's law ,
the possible gains are only limited on software portion that can be run in parallel simultaneously on multiple cores .
digital watermarking is the technology that imperceptibly modifies original data and embeds them directly into image .
digital watermarking in general is comprised of three major components : watermark generator : a desired watermark(s ) is generated for particular applications , which are optionally dependent on some keys.watermark embedder : watermark(s ) are embedded into the object , sometimes based on an embedding key.watermark detector : detecting the existence of some predefined watermark in the object .
watermark generator : a desired watermark(s ) is generated for particular applications , which are optionally dependent on some keys .
watermark embedder : watermark(s ) are embedded into the object , sometimes based on an embedding key .
the purpose of medical image security is to maintain privacy of the patient information in the image and to assure data integrity that prevents the image from tampering .
watermarking can be used in medical images to prevent unauthorized modification by authenticating the content of the image .
tamper localization capable watermarking scheme can detect and locate modification of pixel values on the image . the tampered area can be recovered by retrieving the original pixel values that were stored on the image itself as a watermark .
tamper localization is useful for deducing the motive of the tampering and whether any modification is legitimate .
liew and zain proposed a reversible watermarking scheme ( tallor watermarking scheme ) by dividing image into roi ( region of interest ) and roni ( region of noninterest ) .
roi is the significant part of the medical images that is used by doctors to diagnose the patient , and roni is the area outside the roi .
watermarking for tamper detection and recovery is done in the roi area based on jasni 's scheme .
the original least significant digits ( lsbs ) that are removed in watermark embedding process are stored in roni after compression .
the stored lsbs later can be used to restore the image to its original bits value so the watermarking scheme can be reversible .
the research was conducted on a single frame of ultrasound which is impractical in the real world ; thus a digital watermarking on multiframes medical images is proposed . in order to speed up multiframes watermarking processing time ,
in recent years there has been a surge of interest in running application in parallel to take advantage of multiprocessor and multicore systems .
developments in microprocessor technologies have resulted in most processors having multiple computing cores in a single chip .
parallel computing is a concept of performing tasks simultaneously by partitioning a large and complex problem into smaller tasks and solving each of them concurrently .
there are two forms of parallelism : task parallelism and data parallelism ( as shown in table 1 ) .
data parallelism emphasizes the distributed ( parallelized ) nature of the data , as opposed to the processing ( task parallelism ) .
data parallelism is adopted in this experiment since each processor performs the same code ( watermarking code ) on different pieces of distributed ultrasound frames .
optimal speedup from parallelization should be linear if the number of processing elements is inversely proportional to its run time .
most of them have a near - linear speedup for small numbers of processing elements , which flattens out into a constant value for large numbers of processing elements . according to amdahl 's law
, the overall speedup from parallelization would be restricted by a small portion of the program which can not be parallelized . a large and complex program
if  is the fraction of running time a program spends on nonparallelizable parts , then(1)limp11/p+=1. it is the maximum speedup with parallelization of the program , with p being the number of processors used .
if the sequential portion of a program accounts for 10% of the runtime (  = 0.1 ) , then a 10x speedup will be the maximum , regardless of how many processors are added .
gustafson 's law is another law in computing , closely related to amdahl 's law .
it states that the speedup with p processors is(2)sp = pp1=+p1.amdahl 's law assumes that the total amount of work to be done in parallel is also independent of the number of processors , whereas gustafson 's law assumes that the total amount of work to be done in parallel varies linearly with the number of processors .
applications are often classified based on the frequency of synchronization and communication needs between their subtasks .
fine - grained parallelism is where an application has a high rate of communication among subtasks ; coarse - grained parallelism is where an application does not communicate many times per second , and it is embarrassingly parallel if an application seldom or never has to communicate .
embarrassingly parallel applications are considered the easiest to parallelize . in the embarrassingly parallel problems ,
speedup factors could be achieved near the number of cores , or even more if the problem is partitioned enough to fit within each core 's cache(s ) , avoiding use of much slower main system memory .
the matlab job scheduler ( mjs ) is the process that coordinates the jobs execution and their tasks evaluation .
the mjs runs the submitted jobs in queue order , unless any jobs in its queue are promoted , demoted , cancelled , or deleted .
mjs assigns task from the running job to each worker for execution and fetches result from workers upon the task completion .
the cycle is repeated with another task . when all tasks for a running job have been assigned to workers ,
tasks were executed simultaneously by all workers in order to speed up execution of large matlab jobs .
the mjs then returns the results of all the tasks in the job to the client session ( as shown in figure 1 ) . in this research , client and mjs
are located in a single computer where a client ( end user ) has sent a job ( a stack of ultrasound medical images ) into mjs where it segregates the ultrasound medical images into multiple tasks ( subset of ultrasound medical images frames ) into workers ( cores ) and executes watermarking process in parallel .
for example , in quad cores computer , mjs will segregate 15 frames of ultrasound medical images into 4,4,4,3 frames to each core / worker , respectively .
job progresses through a number of stages upon its creation . in the mjs ( or other schedulers ) , each stage of a job is categorized by their state , such as pending , queued , running , or finished ( refer to table 2 ) .  
in watermarking process on a single frame of ultrasound medical image , watermark is embedded into ultrasound medical images and becomes an input file for watermarking authentication process ( as shown in figure 3 ) .
the purpose of authentication process is to localize and recover the tamper region in medical images . in other words ,
the prerequisite of watermarking authentication process is watermarked ultrasound medical images , in which it is the output file generated by watermarking embedding process .
process watermarking frame by frame sequentially was time consuming ; thus parallel computing on multicores was introduced to solve the problem concern .
this is accomplished by dividing ultrasounds frames into tasks to each core , respectively , and performing watermarking process simultaneously with others .
two modes of watermarking process in multiframes will be developed and compared ; there is sequential ( by using for loop ) versus parallel watermarking process ( watermarking on multicores ) ; the purpose is to prove that the parallel watermarking will have a significant improvement on elapsed time . in both sequential watermarking embedding and authentication process ,
therefore the elapsed time is proportional to the number of frames processed . the elapsed time
could be reduced by using parallel computing on multicore processing technique and this technique enables ultrasound frames to be divided and distributed to multicore for parallel watermarking processing .
sequential watermarking embedding and authentication process are sharing a common framework , where ultrasound medical images in dicom format are read and perform watermarking process frame by frame sequentially by using a for loop .
processed frames will then concatenate into a variable named as  a  which will convert into dicom format at the end of the watermarking process .
the relationship between both processes is that the output file of watermarking embedding process is the input file for watermarking authentication process .
the difference between them is that authentication process has an additional step in identifying the tampered frames ; if it is 0 , it means nontampered ; else it is tampered and then image recovery is performed and tampered frame number is recorded and will be displayed upon the completion of watermarking process ( as demonstrated in figure 4 ) . the main algorithms of parallel watermarking process are dividing volumetric ultrasound medical images and distributing them into a number of cores and executing sequential watermarking processes on each core in parallel ; therefore a successful sequential watermarking process is a prerequisite in parallel watermarking process .
the details of parallel watermarking process will be discussed in section 5.2 . in parallel watermarking process ( as illustrated in figures 5 and 6 ) , ultrasound multiframes medical images were loaded into a quad core microprocessor / cluster and create a job on the scheduler ; the job is then divided into tasks according to the number of cores in the microprocessor .
the code implemented enables cluster to autodetect the number of cores available in the processor ; if the processor used is a quad core , then the job is divided into 4 tasks , where ultrasound frames are equally divided by 4 ; for example , if the total number of ultrasound frames is 30 , then it will be divided into 8,8,7,7 frames , and if the total number of frames is 15 , then it will divided into 4,4,4,3 frames .
, watermarking process is carried out sequentially on the divided frames and at the same time it runs concurrently with other cores ( as illustrated in figure 7 ) .
it is important to ensure that the generated frames output is in order after parallel watermarking process ; therefore the frame number has to be assigned and keep track before the frames are sent to the cores , respectively . upon the tasks completion , tasks were reassembled into a job , whereby all the frames will concatenate into an array and submit back to the cluster .
the result is retrieved from all the tasks in the job with the function fetch output .
all the frames will concatenate according to the frame number order and write into a dicom file .
a job is deleted on two circumstances : when the scheduler encounters an error.when the job is finished .
both parallel watermarking embedding and authentication process have a similar process flow as described above , except the process applied on each task , input and output files as listed in table 3 .
tallor watermarking scheme , developed by liew and zain , will be executed in sequential and parallel modes . the elapsed time obtained from both modes
will be compared and speedup factor of parallel relative to sequential watermarking process will be measured . it is to verify the efficiency of parallel framework .
these areimperceptibility : testing the quality of medical images in terms of invisibility of watermarking in multiframes environment;elapsed time : the time taken to perform watermarking embedding and authentication process on medical images in multiframes environment;robustness to tampering : testing the effectiveness and efficiency of the tamper detection , localization , and recovery function in multiframes environment .
imperceptibility : testing the quality of medical images in terms of invisibility of watermarking in multiframes environment ; elapsed time : the time taken to perform watermarking embedding and authentication process on medical images in multiframes environment ; robustness to tampering : testing the effectiveness and efficiency of the tamper detection , localization , and recovery function in multiframes environment .
natick , ma , usa ) program on a laptop with quad core cpu of intel core i7 - 3630qm cpu @ 2.4  ghz , 2401  mhz , 4 core(s ) , 8 logical processor(s ) , and ram of 8  gb . three samples of ultrasound medical images in dicom format were used to test the system ( as shown in table 4 ) .
the perceptibility of a watermarked image can be judged according to its fidelity and quality .
the mean - squared - error ( mse ) and peak signal - to - noise ratio ( psnr ) were calculated by comparing the watermarked image and original image .
if ii is a vector of n predictions , and ii is the vector of observed values corresponding to the inputs to the function which generated the predictions , then the mse of the predictor can be estimated by(3)mse=1niniiii2 .
mse is the average term by term difference between the original image , i , and the watermarked image , i. if i and i are identical , then mse(i , i ) = 0 .
a related distortion measure is the peak signal - to - noise ratio ( psnr ) , measured in decibels ( db ) .
the problem with mean - square error is that it depends strongly on the image intensity scaling while psnr rectifies this problem by scaling the mean - square error according to the image range .
psnr is defined as follows:(4)psnrdb=10  log10maxi2mse,where maxi is the peak value of the original image . if the signals are identical , then psnr is equal to infinity .
a high psnr represents a high fidelity of a watermarked image . in this thesis ,
a high - quality watermarked image does not have any obvious noticeable distortion caused by the watermark embedding process .
the assessment of quality is usually evaluated by human observers and is influenced by personal preferences which are subjective in nature .
three different sets of ultrasound medical images which contain thirty and fifteen frames have been watermarked in two different ways : ( 1 ) sequentially and ( 2 ) parallel .
it is important to ensure that the quality and fidelity of images were not affected by the way watermarking embedding process performed .
both sequential and parallel watermarking embedding processes have produced the same mse and psnr result for each frame as indicated in table 5 except some negligible differences in the highlighted areas .
this means that the operation either in sequential or in parallel mode does not affect the image quality and its fidelity .
the psnr values reflect the medical image integrity and high psnr values indicate lesser distortion on medical image after watermarking process .
psnr value reflected medical image fidelity ; ideally the watermarked medical image should be visually indistinguishable as original image .
the psnr values are calculated for all images ranging within 48.29~48.74  db , which are within the acceptable range for diagnosis purposes and it has achieved imperceptibility as shown in figure 9 where the images before and after watermarking embedding process are visually indistinguishable as the original images .
elapsed time is the time taken to perform watermarking embedding ( figure 8) and authentication process ( figure 12 ) on medical images in multiframes environment .
this section is to test the speedup factor in parallel mode as compared to sequential mode in watermarking process .
the formula of speedup factor is defined as follows:(5)speed  up = elapsed  time  in  sequnetial  modeelapsed  time  in  parallel  mode .
speedup factor is to measure the speed of parallel mode by factors relative to sequential mode .
for example , if the speedup is 3 , this means parallel process is three times faster than sequential mode . 

table 6 shows that watermarking embedding process in parallel has achieved a significant speedup ( 14.13~19.29 ) relative to sequential process . in figure 10 ,
the elapsed time in sequential watermarking embedding process on sample_2 and sample_3 is similar but increases by double in sample_1 ; this means that the elapsed time in sequential process is proportional to the number of frames , whereas in parallel watermarking embedding process , the elapsed time results are consistent despite the number of frames processed . in conclusion
, the number of frames does not have much impact on the parallel process as compared to sequential process .
the watermarking embedding scheme is pixel oriented , which means different ultrasound sample with the same frame size will produce a similar result .
the elapsed time is actually depending on many factors such as processor type , clock rate , memory speeds and use of memory catches , location of code in memory , compiler efficiency , and compiler optimization technique .
different to watermarking embedding process , watermarking authentication process is to verify whether there is any tampering that occurred in the watermarked ultrasound medical images and then recovered the tampered frame to its original state . in table 7 , three watermarked ultrasound medical images have been fully tampered and the speedup factor ranges within 2.92~3.64 .
this is because , firstly , watermarking authentication algorithm has more if - else branches as compared to watermarking embedding algorithm and , secondly , watermarking authentication process needs to return two results ( a string of tampered frames and concatenated ultrasound frames ) , whereas watermarking embedding process just returns one result , that is , concatenated frames of watermarked ultrasound medical images . in watermarking authentication process also is pixel oriented ; therefore the different sources have shown a little impact on elapsed time .
it could be observed in figure 11 that watermarking authentication process in sequential mode is proportional to frame size but it is not the case in parallel mode ; the elapsed time does not have many changes in parallel mode at different frame size .
the whole package of watermarking process is involving two steps : ( 1 ) watermarking embedding process and ( 2 ) watermarking authentication process .
the high speedup in watermarking embedding process is compromised by the low speedup in watermarking authentication process .  
table 8 has shown that the overall speedup factor for three ultrasound medical images samples ranges within 5.21~6.60 . in order to demonstrate the tamper localization function in detecting forgery , counterfeited images were created by manually modifying the pixel values in the watermarked images using image processing software 
figure 13 shows an example of tampering on three frames ( frames numbers 2 , 4 , and 6 ) in ultrasound watermarked medical images .
different set of tampered watermarked ultrasound medical images has been used to test the effectiveness and efficiency of the tamper detection , localization , and recovery function in multiframes environment ( as shown in table 9 ) .
the function 's effectiveness was measured by checking whether it could detect the tampered frame number in multiframes environment ( as shown in figures 12 and 13 ) and is able to recover to its original form ( as shown in figure 14 ) .
the function 's efficiency was measured by comparing the elapsed time taken for both sequential and parallel watermarking authentication process ( as shown in figure 15 ) .
both effectiveness and efficiency testing were performed while testing the function 's robustness to tampering . for tampered free watermarked ultrasound medical images ,
the initial setup of parallel authentication process such as determining number of cores and dividing and distributing frames to each core was time consuming ; therefore it takes longer processing time than sequential version .
for both sequential and parallel watermarking authentication process , the elapsed time is proportional to the total number of tampered frames .
relative to sequential watermarking authentication , the efficiency of parallel watermarking authentication showed remarkably when there are more tampered frames . in summary ,
the elapsed time for parallel watermarking authentication process is varied based on the total number of tampered frames in ultrasound medical images . with 100% tampered watermarked ultrasound medical images ,
the efficiency of parallel version can be calculated based on elapsed time , such as 259.1/71 = 3.65 , which means parallel version can perform 3.65 times faster than sequential version .
in other words , sequential watermarking authentication has performed a job all by itself , whereas parallel watermarking authentication has delegated a job to four workers / cores , in which parallel version has performed approximately 4 times faster than sequential version . in conclusion ,
the speedup factor was approximate to the number of cores since there is little communication between subtasks .
the frame order of tampered frame also is a factor that affects the performance in parallel process ( as shown in figure 16 ) .
both ( a ) and ( b ) have distributed 15 frames ( containing 9 tampered frames ) of watermarked ultrasound medical images to 4 cores , respectively . the main difference between ( a ) and
the elapsed time for ( a ) is 5 seconds lesser than ( b ) .
it is because ( a ) has an even distribution of tampered frames and hence fairer workloads among 4 cores as compared to ( b ) .
the approach used to overcome the performance constraint in sequential watermarking process is by distributing ultrasound frames over multiple cores . the performance constraint for sequential watermarking process
the capacity problem occurred when the existing hardware and software are unable to perform the anticipated computations in an estimated time .
for example , it may not be feasible to conduct watermarking process on a large data size of dicom files in any reasonable manner .
therefore , to run the entire computation may become impractical even though the existing hardware and software are capable of performing the watermarking process as required . the actual physical constraint , such as the processor speeds or total memory on a system , may cause the problem of capability , in which it will restrict the amount of watermarking processes performed .
system upgrades may be a solution for the problem concern , but it is bounded by technology and cost constraint . in this case , the sequential watermarking problem may be partitioned into smaller and manageable parts that can be performed in parallel .
however , the maximum number of parallel threads can not exceed the number of cores available on the system . the performance gain obtained by using multiple cores on a single system
the proposed parallel watermarking scheme required little effort to separate the ultrasound medical images into a number of parallel tasks due to the little dependency ( or communication ) between those parallel tasks and achieved a speedup factor that is almost equivalent to the number of cores ; for example , quad cores microprocessor will result in a speedup factor of approximately four , which means parallel watermarking process is approximately four times faster than sequential mode in quad cores microprocessor .
embarrassingly parallel problems ,  a phrase that comments on the ease of parallelizing such applications and the fact that it would be embarrassing for the programmer or compiler to not take advantage of such an obvious opportunity to improve performance . the performance of proposed parallel digital watermarking scheme could be further improved by using graphics processing unit ( gpu ) .
both cpu and gpu could run thousands of threads concurrently , but gpu will have a better performance than cpu due to its larger number of cores possessed relative to cpu ; the difference in theoretical performance can differ by a factor ten in favour of the gpu ; therefore a parallel digital watermarking operation on gpu is recommended . in many cases
a good example is image registration algorithms , where the gpu can be used to calculate a chosen similarity measure in parallel , while the cpu can run a serial optimization algorithm .
so et al . made a comparison between cpus and gpus for ultrasound systems , in terms of power efficiency and cost effectiveness .
the adoption of either gpu or hybrid cpu - gpu is largely dependent on the parallel adaption in an algorithm ; an algorithm that exhibited  embarrassingly parallel problem  will be suitably used in gpu whereas hybrid cpu - gpu is suitably applied in an algorithm that exhibited  fine - grained parallelism .  for future work , the proposed method could be applied on magnetic resonance images ( mri ) where the roi could be classified by using weighted - type fractional fourier transform approach   prior to watermarking process .
since the watermarking is pixel oriented , thus it could be also applied on nature images with lesser restriction on image fidelity requirement as compared to medical images .
 with the advancement of technology in communication network , it facilitated digital medical images transmitted to healthcare professionals via internal network or public network ( e.g. , internet ) , but it also exposes the transmitted digital medical images to the security threats , such as images tampering or inserting false data in the images , which may cause an inaccurate diagnosis and treatment . 
 medical image distortion is not to be tolerated for diagnosis purposes ; thus a digital watermarking on medical image is introduced . 
 so far most of the watermarking research has been done on single frame medical image which is impractical in the real environment . in this paper , a digital watermarking on multiframes medical images is proposed . in order to speed up multiframes watermarking processing time , a parallel watermarking processing on medical images processing by utilizing multicores technology is introduced . 
 an experiment result has shown that elapsed time on parallel watermarking processing is much shorter than sequential watermarking processing . 
1. Introduction
2. Theory: Concept of Digital Watermarking
3. Theory: Parallel Computing in Multicores
4. Parallel Computing with MATLAB
5. Research Methodology: Sequential and Parallel Watermarking Embedding and Authentication Process
6. Experimental Design and Set-Up
7. Experimental Result
8. Conclusion and Future Work