need help with imaging
-
am curious how imaging toolkits or even softwares like Adobe photoshop etc. operate on images. functions like binarize, blur etc. change every pixel on the image, and hence must visit every pixel at least once. yet, they only seem to take a fraction of a second to process even a large input image. on the other hand, say if i try and perform some pixel-level processing myself (using Pegasus ImagXpress, a .NET imaging toolkit), things seem to take a much longer time. as an example, for an input image of size 400x400 pixels, even merely visiting every pixel of the image just once using a nested loop (shown below) takes close to 2 seconds, a time value way more than i can afford. colour c; for i <- 1 to image.width { for j <- 1 to image.height { c = getPixel (i,j); } } is there a faster way in which an image pixel map can be processed (or even read) ? thanks... Sarab.
-
am curious how imaging toolkits or even softwares like Adobe photoshop etc. operate on images. functions like binarize, blur etc. change every pixel on the image, and hence must visit every pixel at least once. yet, they only seem to take a fraction of a second to process even a large input image. on the other hand, say if i try and perform some pixel-level processing myself (using Pegasus ImagXpress, a .NET imaging toolkit), things seem to take a much longer time. as an example, for an input image of size 400x400 pixels, even merely visiting every pixel of the image just once using a nested loop (shown below) takes close to 2 seconds, a time value way more than i can afford. colour c; for i <- 1 to image.width { for j <- 1 to image.height { c = getPixel (i,j); } } is there a faster way in which an image pixel map can be processed (or even read) ? thanks... Sarab.
sarabjs wrote: say if i try and perform some pixel-level processing myself (using Pegasus ImagXpress, a .NET imaging toolkit), Why ? You can do pixel level processing in C# without any library - check out my image processing series in C# here on CP. sarabjs wrote: things seem to take a much longer time. Well, Photoshop is not written in C#, or even C++. It's in C. sarabjs wrote: colour c; for i <- 1 to image.width { for j <- 1 to image.height { c = getPixel (i,j); } } is there a faster way in which an image pixel map can be processed (or even read) ? Yes, read my articles on image processing. GetPixel is where your main performance hit is here. Christian Graus - Microsoft MVP - C++
-
sarabjs wrote: say if i try and perform some pixel-level processing myself (using Pegasus ImagXpress, a .NET imaging toolkit), Why ? You can do pixel level processing in C# without any library - check out my image processing series in C# here on CP. sarabjs wrote: things seem to take a much longer time. Well, Photoshop is not written in C#, or even C++. It's in C. sarabjs wrote: colour c; for i <- 1 to image.width { for j <- 1 to image.height { c = getPixel (i,j); } } is there a faster way in which an image pixel map can be processed (or even read) ? Yes, read my articles on image processing. GetPixel is where your main performance hit is here. Christian Graus - Microsoft MVP - C++
-
sarabjs wrote: say if i try and perform some pixel-level processing myself (using Pegasus ImagXpress, a .NET imaging toolkit), Why ? You can do pixel level processing in C# without any library - check out my image processing series in C# here on CP. sarabjs wrote: things seem to take a much longer time. Well, Photoshop is not written in C#, or even C++. It's in C. sarabjs wrote: colour c; for i <- 1 to image.width { for j <- 1 to image.height { c = getPixel (i,j); } } is there a faster way in which an image pixel map can be processed (or even read) ? Yes, read my articles on image processing. GetPixel is where your main performance hit is here. Christian Graus - Microsoft MVP - C++