Search This Blog

Image analysis

 

Here is a list of 100 command prompts for image analysis, categorized by the typical computer vision workflow.

1. Image Acquisition & Loading

  1. Load the image from the file path [path/to/image.jpg].

  2. Capture a live frame from the [webcam/video source].

  3. Download and load an image from the URL [http://...].

  4. Read all images from the directory [path/to/dataset/].

  5. Decode the [Base64 string] and load it as an image.

  6. Extract and load a specific frame [N] from [video_file.mp4].

  7. Create a blank [width]x[height] image with a [black/white] background.

2. Preprocessing & Transformation

  1. Convert the image to grayscale.

  2. Convert the image from the [RGB] color space to [HSV].

  3. Convert the image from the [RGB] color space to [LAB].

  4. Resize the image to a fixed [width]x[height] (e.g., 224x224).

  5. Scale the image by a factor of [N], maintaining aspect ratio.

  6. Rotate the image by [N] degrees.

  7. Flip the image [horizontally].

  8. Flip the image [vertically].

  9. Crop the image to the region of interest (ROI) defined by [x, y, width, height].

  10. Pad the image with a [N]-pixel border using [zero/reflection] padding.

  11. Apply a perspective warp to the image using the 4-point transform [source_points] to [dest_points].

  12. Apply an affine transformation (rotate, scale, shear) using [matrix].

3. Filtering & Enhancement

  1. Apply a Gaussian blur with a [N]x[N] kernel to reduce noise.

  2. Apply a median filter with a [N]x[N] kernel to remove salt-and-pepper noise.

  3. Apply a bilateral filter to smooth the image while preserving edges.

  4. Sharpen the image using a [sharpening kernel/unsharp mask].

  5. Perform a 2D convolution on the image with a [custom kernel].

  6. Adjust the image brightness by [N]% and contrast by [M]%.

  7. Apply histogram equalization to improve image contrast.

  8. Apply CLAHE (Contrast Limited Adaptive Histogram Equalization).

  9. Perform gamma correction with a gamma value of [N].

4. Binarization & Thresholding

  1. Apply a simple binary threshold at a [threshold_value].

  2. Apply Otsu's thresholding to automatically binarize the image.

  3. Apply adaptive (mean/Gaussian) thresholding to handle varying lighting conditions.

  4. Invert the binary image (white to black and black to white).

  5. Perform a "distance transform" on the binary image.

5. Morphological Operations

  1. Erode the white regions of the binary image with a [N]x[N] kernel.

  2. Dilate the white regions of the binary image with a [N]x[N] kernel.

  3. Perform an "opening" (erode then dilate) to remove small noise objects.

  4. Perform a "closing" (dilate then erode) to fill small holes in objects.

  5. Get the morphological gradient (outline) of the objects.

  6. Apply a "top-hat" transform to find bright spots.

  7. Apply a "black-hat" transform to find dark spots.

  8. Perform skeletonization (medial axis transform) on the binary objects.

6. Image Attributes & Histograms

  1. Get the image dimensions (width, height, channels).

  2. Extract and list all EXIF metadata (camera, GPS, settings).

  3. Calculate and plot the image's intensity histogram.

  4. Calculate and plot the color histogram for all [3] channels.

  5. Calculate the mean and standard deviation of all pixel intensities.

  6. Calculate the dominant color(s) in the image.

  7. Perform a Fourier Transform (FFT) and display the magnitude spectrum.

7. Feature Extraction

  1. Detect edges using the Canny edge detector with [low] and [high] thresholds.

  2. Detect edges using the [Sobel] operator on the [X/Y] axis.

  3. Detect corners using the Harris corner detector.

  4. Detect corners using the Shi-Tomasi ("Good Features to Track") algorithm.

  5. Detect keypoints and compute descriptors using SIFT (Scale-Invariant Feature Transform).

  6. Detect keypoints and compute descriptors using ORB (Oriented FAST and Rotated BRIEF).

  7. Extract Histogram of Oriented Gradients (HOG) features.

  8. Detect lines in the image using the Hough Line Transform.

  9. Detect circles in the image using the Hough Circle Transform.

  10. Describe the image's texture using Haralick texture features (GLCM).

8. Segmentation & Contour Analysis

  1. Find all contours of the objects in the binary image.

  2. Draw all detected contours on the original image.

  3. Calculate the bounding box for each detected contour.

  4. Calculate the minimum enclosing circle for each contour.

  5. Calculate the area, perimeter, and centroid of each contour.

  6. Filter contours based on a minimum [area/perimeter].

  7. Perform image segmentation using K-means clustering on pixel colors.

  8. Perform semantic segmentation to classify each pixel (e.g., 'sky', 'road', 'car').

  9. Perform instance segmentation to identify individual object instances.

  10. Segment the foreground from the background using the GrabCut algorithm.

  11. Segment the image using the Watershed algorithm.

9. Object Detection

  1. Detect all [faces] in the image using a Haar cascade classifier.

  2. Detect all [cars, pedestrians] in the image using a pre-trained [YOLO] model.

  3. Detect all [objects] in the image using a pre-trained [SSD/Faster R-CNN] model.

  4. Draw bounding boxes and confidence scores for all detected objects.

  5. Perform template matching to find all occurrences of a [template_image] within the main image.

  6. Count the number of [objects/blobs] in the image.

  7. Find all connected components in the binary image.

10. Recognition & Classification

  1. Classify the entire image into a category (e.g., 'cat', 'dog', 'landscape') using a pre-trained [ResNet/EfficientNet].

  2. Extract the top [N] predicted labels and their confidence probabilities.

  3. Perform Optical Character Recognition (OCR) to extract all text from the image.

  4. Detect and read license plates from the image.

  5. Detect [facial landmarks] (e.g., eyes, nose, mouth).

  6. Perform facial recognition to identify the [person's name] against a database.

  7. Detect and recognize [hand gestures].

  8. Perform human pose estimation and extract the [body keypoint skeleton].

  9. Determine if the image is [blurry/in focus].

11. Advanced & Generative Analysis

  1. Perform image inpainting to [remove an object] and fill the background.

  2. Colorize a [grayscale] image.

  3. Perform image-to-image translation (e.g., [day to night/sketch to photo]).

  4. Generate a text caption for the image.

  5. Perform Visual Question Answering (VQA) based on the image and the prompt: "[Question?]".

  6. Detect anomalies or defects in [manufacturing/medical] images.

  7. Stitch multiple images together to create a [panorama].

  8. Estimate the [depth map] from a [single/stereo] image.

  9. Reconstruct a 3D model from [multiple 2D images].

  10. Determine if the image is [AI-generated/manipulated/a deepfake].

12. Evaluation & Output

  1. Calculate the Intersection over Union (IoU) between [predicted_box] and [ground_truth_box].

  2. Calculate the [accuracy/precision/recall] for the classification model.

  3. Generate a confusion matrix for the classifier.

  4. Overlay the [segmentation mask] on the original image with [N]% transparency.

  5. Save the processed image with all annotations to [output/path.png].

No comments:

Post a Comment

Exegesis of of each verse--Model

Luke 24: 13-33  Conduct a through exegesis of of each verse of this scripture : 13 And, behold, two of them w...

Shaker Posts