Skip to main content

A Python library for higher level OpenCV functions used in image analysis and computer vision

Project description

# OpenCV Extras cv2-extras (cv2x) is a Python library for higher level functions used in image analysis and computer vision. OpenCV is an incredible library for building image analysis pipelines, but sometimes feels quite low-level, and it should stay that way. However, for those times when the lazy programmer finds themselves writing the same lines over and over or when there is just something too useful to keep to yourself…there’s cv2x.

Feel free to submit pull requests if some repetitive task is bugging you.

## Usage

Recommended import convention:

import cv2_extras as cv2x

Functions:

  • fill_holes(mask)

  • filter_contours_by_size(mask, min_size=1024, max_size=None)

  • find_border_contours(contours, img_h, img_w)

  • fill_border_contour(contour, img_shape)

  • find_border_by_mask(signal_mask,

    contour_mask, max_dilate_percentage=0.2, dilate_iterations=1)

  • find_contour_union(contour_list, img_shape)

  • generate_background_contours(hsv_img,

    non_bg_contours, remove_border_contours=True, plot=False)

  • elongate_contour(contour, img_shape, extend_length)

  • calculate_nonuniform_field(single_channel)

  • correct_nonuniformity(single_channel, mask=None)

  • color_transfer(ref_img, target_img, clip=True, preserve_paper=True)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cv2_extras-0.5.4.tar.gz (10.5 kB view hashes)

Uploaded Source

Built Distribution

cv2_extras-0.5.4-py3-none-any.whl (11.5 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page