Image Processing ..

yazannumoor

New member
May 9, 2013
20
0
0
Hello devs ..

I'm studying a course of ImageProcessing in university, and i have chosen to make a presentation about windows phone imaging ..

I was trying to find an API to work on, but sadly i only found Nokia SDK which didnt work for me before .. i just want any API that reaches the image pixels so i can process them..
I'm not sure if i wrote the right code for Nokia SDK .. if someone have any experience with imaging >> i need your help :D

any ideas?
 
Here is my test code for Nokia SDK

The processImage method is used to apply the filter on the image.

private async void processImage() { WriteableBitmap writeableBitmap = new WriteableBitmap((int)bitmapImage.PixelWidth, (int)bitmapImage.PixelHeight); try { using (var imageStream = new StreamImageSource(photoStream)) { // Applying the custom filter effect to the image stream using (var customEffect = new NegateFilter(imageStream)) { // Rendering the resulting image to a WriteableBitmap using (var renderer = new WriteableBitmapRenderer(customEffect, writeableBitmap)) { // Applying the WriteableBitmap to our xaml image control await renderer.RenderAsync(); imageGrid.Source = writeableBitmap; } } } } catch (Exception exc) { MessageBox.Show(exc.Message + exc.StackTrace, exc.Source, MessageBoxButton.OK); } }



This is the NegateFilter class:

namespace ImagingTest { class NegateFilter : CustomEffectBase { public NegateFilter(IImageProvider source) : base(source){} protected override void OnProcess(PixelRegion sourcePixelRegion, PixelRegion targetPixelRegion) { sourcePixelRegion.ForEachRow((index, width, pos) => { for (int x = 0; x < width; ++x, ++index) { targetPixelRegion.ImagePixels[index] = 255 - sourcePixelRegion.ImagePixels[index]; } }); } } }


when i run the application and apply the filter, this exception shows up :

Operation Is Not Valid Due To The Current State Of The Object.

if i remove the await keyword the exception will not be thrown, but i will not get my processed image :(
 
Eehm, can you tell me exactly wat you really want to do step by step? (and forget the Nokia SDK for a moment) maybe the .Net framework libs allready has enough functionallity to work with.
 
Eehm, can you tell me exactly wat you really want to do step by step? (and forget the Nokia SDK for a moment) maybe the .Net framework libs allready has enough functionallity to work with.

Hey,
I just want a WP library that is used for image processing, I found a package called WriteableBitmapEx, but is too slow.

Thx
 
Here is another tool, but its not completely free, it has a trial so you can check the performance...

Is this the example you used for WriteableBitmapEx? What kind of filter are you processing on the image?

You can take a shot at developing the effects completely by yourself (see this and this) but maybe that's a bridge too far?
 

Members online

No members online now.

Forum statistics

Threads
341,245
Messages
2,264,312
Members
428,832
Latest member
hosseinf