← Back to team overview

dolfin team mailing list archive

Re: The use of Dolfin in image processing

 

I assume that you would like to solve a PDE on a "unit square" where
the function on the right hand side is represented as an image. 
Is this correct ? 

You can create a mesh when you loop through the image, and store
the corresponding pixel value as a Dolfin function. I have done a
similar thing in 3D earlier. 

I can send you the code, if my interpretation of your needs are
correct. 
                               
Kent






On on., 2009-01-21 at 12:25 +0100, Anders Logg wrote:
> On Wed, Jan 21, 2009 at 08:58:25AM +0000, A Navaei wrote:
> > Hi,
> > 
> > I am trying to use Dolfin for solving some standard image processing
> > optimisation problems. Creating the corresponding equations requires
> > incorporation of image data as dense matrices into the problem, here
> > is an example:
> > 
> > http://users.fmrib.ox.ac.uk/~steve/review/review/node3.html
> > 
> > where Eq (4) is of interest, where the unknowns are (u, v) and I is
> > the image pixel values.
> > 
> > A good start is to initialise the pixel values into a simplicial
> > triangulated mesh. Which Dolfin classes should be used in order to
> > perform this?
> > 
> > 
> > -Ali
> 
> I imagine you could define a Function I (the image brightness
> function) as either a piecewise linear function with one value at each
> vertex (corresponding to a pixel) or a piecewise constant function
> with one value at each pair of triangles (together corresponding to a
> pixel).
> 
> So you need to overload the eval() in a user-defined function I to
> return the correct values by some kind of table look-up (finding the
> pixel values).
> 
> _______________________________________________
> DOLFIN-dev mailing list
> DOLFIN-dev@xxxxxxxxxx
> http://www.fenics.org/mailman/listinfo/dolfin-dev



References