Sunday 15 January 2012

c# - How can I convert .NET Image or Byte Array to Emgu.CV.Image -



c# - How can I convert .NET Image or Byte Array to Emgu.CV.Image<Emgu.CV.Structure.Bgr , byte > -

i working on project uses opencv library, uses emgu.cv.image image captured camera.

i trying move code microsoft azure worker role handle image processing in cloud.

i have line of code in current solution

//get current frame capture device _currentframe = _grabber.queryframe().resize(320, 240, emgu.cv.cvenum.inter.cv_inter_cubic);

this line of code grabs current frame photographic camera , returns image of type > emgu.cv.image

as moving code cloud, won't able access photographic camera device grab frame.

so want pass cloud .net image or byte array converted base64 image string @ point code expects emgu.cv.image image current frame.

the challenge have code wants work emgu.cv.image have .net image, byte array or base64 image string. need convert emgu.cv.image , not quite sure how go it.

can nudge me in right direction please.

this solution ended going with

public emgu.cv.image<bgr, byte> imagetoemguimage(system.drawing.image imagein) { bitmap bmpimage = new bitmap(imagein); emgu.cv.image<bgr, byte> imageout = new emgu.cv.image<bgr, byte>(bmpimage); homecoming imageout; }

c# .net opencv image-processing azure-worker-roles

No comments:

Post a Comment