FENICS and Image Processing

Asked by Gabriele Simone

Hi,

I have a greyscale image stored in a 2D array. (for example 8x8)

Once I have created my mesh using
mesh = UnitSquare(7,7)

How can I assign at each point of the mesh the pixel value of the image?

Thanks for your help in advance.

Question information

Language:
English Edit question
Status:
Answered
For:
DOLFIN Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Praveen C (cpraveen) said :
#1

One thing to remember is that fenics supports only triangular elements in 2-d. (Has this changed recently ?)

Revision history for this message
Johan Hake (johan-hake) said :
#2

Here is an example using FEniCS and itk:

  http://<email address hidden>/msg06650.html

I am not sure the syntax still applies, as FEniCS has evolved quite a bit
since that code was written.

You also need python-itk.

For a fancy image processing application this link might be helpful:

  http://code.google.com/p/debiosee/wiki/DemosOptiocFlowHornSchunck

Johan

On Tuesday June 14 2011 14:31:17 Gabriele Simone wrote:
> New question #161450 on DOLFIN:
> https://answers.launchpad.net/dolfin/+question/161450
>
> Hi,
>
> I have a greyscale image stored in a 2D array. (for example 8x8)
>
> Once I have created my mesh using
> mesh = UnitSquare(7,7)
>
> How can I assign at each point of the mesh the pixel value of the image?
>
> Thanks for your help in advance.

Can you help with this problem?

Provide an answer of your own, or ask Gabriele Simone for more information if necessary.

To post a message you must log in.