Welcome Guest! To enable all features, please Login or Register.

Notification

Icon
Error

Options
View
Last Go to last post Unread Go to first unread post
#1 Posted : Thursday, August 9, 2012 1:01:59 PM(UTC)
tbecker82

Groups: Registered
Posts: 37


Hi,

I am looking into the feasibility of using parallel processing to speed up the processing of applying effects to images.
The images that are routinely used are in the 50-100mb range, sometime bigger.  Applying filters to images of these sizes can take several seconds,
this can add up to long delays when several filters are applied sequentially to an image.

My idea was to divide the main image up into subsections and have each subsection be processed on a separate core.
This is the sequence of steps I was considering.
      1.  Divide up the image into sections by copying the data into buffers using the Marshal.Copy function
      2.  Pass the data to each core, where the desired operation would be applied to the data (i.e emboss, sharpen, average)
      3.  Copy the data from each core back into the original image.

Is what I am considering even possible with Leadtools?  I haven't found any documentation on parallel processing.

Thanks



 

Try the latest version of LEADTOOLS for free for 60 days by downloading the evaluation: https://www.leadtools.com/downloads

Wanna join the discussion? Login to your LEADTOOLS Support accountor Register a new forum account.

#2 Posted : Thursday, August 9, 2012 1:07:41 PM(UTC)
tbecker82

Groups: Registered
Posts: 37


I forgot to add that I am using Leadtools v17.5 Medical with .Net/C#
 
#3 Posted : Sunday, August 12, 2012 5:13:49 AM(UTC)

mohamed  
mohamed

Groups: Registered, Tech Support
Posts: 179


Although our toolkit can handle splitting and merging images, the processing part might not be easy to implement because of the border areas between the parts.
Many processing functions, such as sharpening, calculate the result pixel value based on neighboring pixels. This will cause different results at the lines where you cut the image. This might lead to visible 'tile' borders in the final image.

Also, the process of splitting and merging will take some processing time, so unless the other processing performed is extensive, the overall result might not be a significant improvement.

One way to perform splitting is simply to use the RasterImage.Clone(Rectangle) method. To merge the images back, you can use the CombineFastCommand class.
Mohamed Abedallah
Developer Support Engineer
LEAD Technologies, Inc.

LEAD Logo
 
#4 Posted : Monday, August 13, 2012 5:49:04 AM(UTC)
tbecker82

Groups: Registered
Posts: 37


Thanks Mohamed

The problem with recombining the image had occurred to me to since some filters use a matrix to affect surrounding pixels.
I'm trying out different ideas to improve speed, as much as I can using .Net.  If you have any other ideas about ways I could improve processing
on large images I would be interested in hearing them.  I am not that familiar with the .net SDK.

Thanks
 
#5 Posted : Tuesday, August 14, 2012 5:10:14 AM(UTC)

mohamed  
mohamed

Groups: Registered, Tech Support
Posts: 179


One way to solve the border problem is this:
1. With every tile, take a slightly larger size to include a few pixels outside the tile.
2. Perform splitting of images and divide the work among cores. Make sure to use the same number of threads as the number of physical CPU cores because adding more threads than cores doesn't help.
3. Process each tile individually, including the extra few pixels at the side. This should give correct matrix for the border pixels.
4. When you combine the images back, exclude the extra pixels since our Combine functions allow you to specify starting point and source dimensions.
Mohamed Abedallah
Developer Support Engineer
LEAD Technologies, Inc.

LEAD Logo
 
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Powered by YAF.NET | YAF.NET © 2003-2024, Yet Another Forum.NET
This page was generated in 0.147 seconds.