[Scilab-users] converting octave script imremap to scilab

classic Classic list List threaded Threaded
4 messages Options
der_Phil der_Phil
Reply | Threaded
Open this post in threaded view
|

[Scilab-users] converting octave script imremap to scilab

Dear All,

I am trying to map an image onto a 3D surface.
The image contains reference points, which with known 2D pixel coordinates.
The 3D equivalent of these reference points is as well known.
The 3D shape is represented by a set of X-Y-Z coordinates.

For mapping the image onto a delaunay-triangulated surface I found following function:

"imremap"...which - as far as I understand - should do what I want.

now: "imremap" uses  "interp2"...and unfortunately both functions are in octave.





Converting the functions to Scilab seems to become an elephant, especially for interp2.

If one could avoid  "interp2" , then "imremap" could be possible relatively easy converted to Scilab.

Any ideas which Scilab function would work like interp2?

Thank you,
Philipp

_______________________________________________
users mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/users
mottelet mottelet
Reply | Threaded
Open this post in threaded view
|

Re: converting octave script imremap to scilab

Hi,

Does interp2 works by using the triangulation ?

S.

Le 21 nov. 2020 à 22:56, P M <[hidden email]> a écrit :


Dear All,

I am trying to map an image onto a 3D surface.
The image contains reference points, which with known 2D pixel coordinates.
The 3D equivalent of these reference points is as well known.
The 3D shape is represented by a set of X-Y-Z coordinates.

For mapping the image onto a delaunay-triangulated surface I found following function:

"imremap"...which - as far as I understand - should do what I want.

now: "imremap" uses  "interp2"...and unfortunately both functions are in octave.





Converting the functions to Scilab seems to become an elephant, especially for interp2.

If one could avoid  "interp2" , then "imremap" could be possible relatively easy converted to Scilab.

Any ideas which Scilab function would work like interp2?

Thank you,
Philipp
_______________________________________________
users mailing list
[hidden email]
https://antispam.utc.fr/proxy/1/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/lists.scilab.org/mailman/listinfo/users

_______________________________________________
users mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/users
der_Phil der_Phil
Reply | Threaded
Open this post in threaded view
|

Re: converting octave script imremap to scilab

if you refer to interp2 from CGLAB toolbox....then no, I have no success with that.

CGLAB call:
vp = interp2(xp,yp,x,y,v)...were xp and yp are vectors

while at octave:
warped = grayinterp(im, XI, YI, interp, NA); // im seems to be a mxn matrix
with:
function [warped, valid] = grayinterp(im, XI, YI, interp, extrapval)
  if (strcmp(interp, "cubic"))
    warped = graybicubic(double(im), XI, YI, NA);
  else
    warped = interp2(double(im), XI, YI, interp, NA);
  endif
  valid = !isna(warped);
  warped(!valid) = extrapval;
endfunction


BR
Philipp  






Am So., 22. Nov. 2020 um 08:55 Uhr schrieb Stéphane Mottelet <[hidden email]>:
Hi,

Does interp2 works by using the triangulation ?

S.

Le 21 nov. 2020 à 22:56, P M <[hidden email]> a écrit :


Dear All,

I am trying to map an image onto a 3D surface.
The image contains reference points, which with known 2D pixel coordinates.
The 3D equivalent of these reference points is as well known.
The 3D shape is represented by a set of X-Y-Z coordinates.

For mapping the image onto a delaunay-triangulated surface I found following function:

"imremap"...which - as far as I understand - should do what I want.

now: "imremap" uses  "interp2"...and unfortunately both functions are in octave.





Converting the functions to Scilab seems to become an elephant, especially for interp2.

If one could avoid  "interp2" , then "imremap" could be possible relatively easy converted to Scilab.

Any ideas which Scilab function would work like interp2?

Thank you,
Philipp
_______________________________________________
users mailing list
[hidden email]
https://antispam.utc.fr/proxy/1/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/lists.scilab.org/mailman/listinfo/users
_______________________________________________
users mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/users

_______________________________________________
users mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/users
Dang Ngoc Chan, Christophe Dang Ngoc Chan, Christophe
Reply | Threaded
Open this post in threaded view
|

Re: {EXT} converting octave script imremap to scilab

In reply to this post by der_Phil
Hello Philipp,

> De : users <[hidden email]> De la part de P M Envoyé :
> samedi 21 novembre 2020 22:55
>
> I am trying to map an image onto a 3D surface.

If you are not "bound" to Scilab,
then I suggest to have a look at Kitware Paraview https://www.paraview.org/ which can, as far as I remember, can import and export data before/after processing.

Regards

--
Christophe Dang Ngoc Chan
Mechanical calculation engineer

General
This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error), please notify the sender immediately and destroy this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden.
_______________________________________________
users mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/users