{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "## How to transform images\n", "*zensvi.transform: A module to transform images*\n", "\n", "\"ImageTransformer\" offers options to transform panoramic imagery into two further view types: \n", "1. perspective\n", "2. fisheye\n", "\n", "\"PointCloudProcessor\" provides point cloud generation capabilities based on depth estimation in the computer vision sub-package, thus enabling advanced spatial analysis of street-level imagery. \n" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "#### Preparation" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "# If zen-svi is not installed\n", "%pip install --upgrade zensvi \n", "\n", "import zensvi\n", "\n", "print(zensvi.__version__)" ] }, { "cell_type": "code", "execution_count": 7, "metadata": {}, "outputs": [], "source": [ "# Import the required libraries\n", "from zensvi.transform import ImageTransformer\n", "from zensvi.transform import PointCloudProcessor\n", "import pandas as pd\n", "import os" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "#### Panorama image transform\n", "- Panorama to perscpective image transformation: Transforms a panorama image to a perspective image.\n", "- Panorama to fisheye image transformation: Transforms a panorama image to a fisheye image. Types of fisheye transformations include stereographic, equidistant, equisolid, and orthographic.\n" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ "Converting to perspective: 100%|██████████| 10/10 [00:05<00:00, 1.78it/s]\n", "Converting to equidistant_fisheye: 100%|██████████| 10/10 [00:00<00:00, 309.64it/s]\n", "Converting to orthographic_fisheye: 0%| | 0/10 [00:00