AddModelByDepthMap() публичный Метод

public AddModelByDepthMap ( Bitmap image, Point3D origin, Vector3D xVec, Vector3D yVec, Vector3D zVec, double xSize, double ySize, double zSize, bool whiteIsBackground = true ) : void
image System.Drawing.Bitmap
origin Point3D
xVec Vector3D
yVec Vector3D
zVec Vector3D
xSize double
ySize double
zSize double
whiteIsBackground bool
Результат void
Пример #1
0
        private static void CreateWavesWithImage()
        {
            var asb = new AutoStereogramBuilder(1024, 768, 3);

            asb.AddSphere(-0.2, -0.2, 1.6, 0.025);
            asb.AddSphere(-0.2, -0.2, 1.4, 0.025);
            asb.AddSurface(WavesSurfaceFunc, 2.3, 1.7);

            Bitmap bitmap = (Bitmap)Image.FromFile(GetPathAtAssemblyLocation("input\\hi.png"));

            asb.AddModelByDepthMap(bitmap, new Point3D {
                X = 0.1, Y = -0.3, Z = 1.8
            }, new Vector3D {
                X = 1, Y = 0.5, Z = -1
            },
                                   new Vector3D {
                X = -0.5, Y = 1, Z = -1
            }, new Vector3D {
                X = 1, Y = 1, Z = 1
            }, 0.8, 0.8, 0.05);

            Bitmap backgroundImage = (Bitmap)Image.FromFile(GetPathAtAssemblyLocation("input\\background.jpg"));

            asb.GenerateBitmap(backgroundImage).Save(GetPathAtAssemblyLocation("output\\hello.jpg"), ImageFormat.Jpeg);
        }