schwarze Unterlegscheibe 3D-Modell: import numpy as np from PIL import Image, ImageFilter from scipy import ndimage  | Tripo AI
Lv.0

black washer 3d model

Alle 3D Modelle anzeigen
Prompt

import numpy as np from PIL import Image, ImageFilter from scipy import ndimage import trimesh, os src = "/mnt/data/a_clean_high_resolution_centered_isolated_vecto.png" im = Image.open(src).convert("RGB") a = np.asarray(im) # Zuschneiden auf Badge; integrierte Öse und gesamten kreisförmigen Körper beibehalten. crop = im.crop((45, 0, 1215, 1215)) W = 300 H = int(round(crop.height * W / crop.width)) small = crop.resize((W, H), Image.Resampling.LANCZOS) rgb = np.asarray(small).astype(np.float32) gray = rgb.mean(axis=2) / 255.0 # Dunkles Badge vom weißen Hintergrund trennen; Die weiße Öse in der Mitte bleibt ein Loch. mask = gray < 0.88 mask = ndimage.binary_fill_holes(mask) # Ösenloch explizit wiederherstellen, zentriert vom Referenzbild. # Position relativ zum Ausschnitt approximieren. hole_cx = int((623-45) * W / 1170) hole_cy = int((100-0) * H / 1215) Y, X = np.ogrid[:H, :W] mask &= ((X-hole_cx)**2 + (Y-hole_cy)**2) > (int(43*W/1170))**2 mask = ndimage.binary_closing(mask, iterations=2) mas

4K·PBR·Tripo H3.1

Ähnliche Modelle