From 263808780d4fc7ef7f14c589d3108d6df5be0642 Mon Sep 17 00:00:00 2001 From: Christian <56335168+chri002@users.noreply.github.com> Date: Thu, 20 Mar 2025 16:46:32 +0100 Subject: [PATCH] Creato con Colab --- test.ipynb | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/test.ipynb b/test.ipynb index 21e32fb..cfac2ff 100644 --- a/test.ipynb +++ b/test.ipynb @@ -686,7 +686,8 @@ " return blurred" ], "metadata": { - "id": "PoTzLauTQlHl" + "id": "PoTzLauTQlHl", + "cellView": "form" }, "execution_count": null, "outputs": [] @@ -745,7 +746,7 @@ "if test:\n", " url = 'https://raw.githubusercontent.com/chri002/ComfyUI_depthMapOperation/refs/heads/main/assets/start.jpg'\n", " image = Image.open(requests.get(url, stream=True).raw)\n", - " image = image.resize((int(image.size[0]/1.5), int(image.size[1]/1.5)))\n", + " image = image.resize((int(image.size[0]), int(image.size[1])))\n", " print(image.size)\n", "else:\n", " image=initt.convert(\"RGB\")\n", @@ -784,7 +785,8 @@ "points = transform_points(points, translate=(0, 0, 0), rotate=(0, 0, 0), scale=(1,1,0.5))" ], "metadata": { - "id": "gEjBciYYldPF" + "id": "gEjBciYYldPF", + "cellView": "form" }, "execution_count": null, "outputs": [] @@ -794,7 +796,7 @@ "source": [ "#@title Local Rotation\n", "rx=0#@param {\"type\" : \"number\"}\n", - "ry=-35#@param {\"type\" : \"number\"}\n", + "ry=0#@param {\"type\" : \"number\"}\n", "rz=0#@param {\"type\" : \"number\"}\n", "\n", "mx, Mx, my, My, mz, Mz = points[:,0].min(), points[:,0].max(), points[:,1].min(), points[:,1].max(), points[:,2].min(), points[:,2].max()\n", @@ -819,7 +821,7 @@ "#@title Translation\n", "tx=0#@param {\"type\" : \"number\"}\n", "ty=0#@param {\"type\" : \"number\"}\n", - "tz=200#@param {\"type\" : \"number\"}\n", + "tz=0#@param {\"type\" : \"number\"}\n", "\n", "points = transform_points(points, translate=(tx, ty, tz), rotate=(0, 0, 0), scale=(1,1,1))" ], @@ -836,7 +838,7 @@ "#@title Scale\n", "sx=1#@param {\"type\" : \"number\"}\n", "sy=1#@param {\"type\" : \"number\"}\n", - "sz=0.75#@param {\"type\" : \"number\"}\n", + "sz=1#@param {\"type\" : \"number\"}\n", "\n", "points = transform_points(points, translate=(0,0,0), rotate=(0, 0, 0), scale=(sx,sy,sz))" ], @@ -851,7 +853,7 @@ "cell_type": "code", "source": [ "#@title Points interpolation\n", - "interpolate = 2 #@param {\"type\":\"number\"}\n", + "interpolate = 3 #@param {\"type\":\"number\"}\n", "points = (interpolate_points(points, alpha=0.5, n_c=interpolate))" ], "metadata": { @@ -877,7 +879,7 @@ "scale = np.array([1,1,-1])\n", "fov=45 #@param {\"type\" : \"number\"}\n", "correction = True #@param{\"type\":\"boolean\"}\n", - "k_size =3 #@param{\"type\" : \"number\"}\n", + "k_size =2 #@param{\"type\" : \"number\"}\n", "points_cop = transform_points(points.copy(), translate=translation, scale=scale)\n", "translation = np.array([0,0, -(height/m.sin(m.radians(fov)))])\n", "points_cop = transform_points(points_cop, translate=translation)\n",