Skip to main content

utilities is a super-awesome module which lets you perform basic image-processing operations at your finger tip. You can use it like this:

import utilities as ut import cv2

#Load the image img = cv2.imread(‘hf.png’);

#Here we start using the utilities module.

#Use the translate function of utilities module. Returns a translated image. translate_img = ut.translate(img, 50, 50);

#Use the rotation function of utilities module. Returns a rotate image. rotate_img = ut.rotate(img, img.shape[0]/2.0, img.shape[1]/2.0, 45, 1.0);

#Display the images. cv2.imshow(‘original’, img); cv2.imshow(‘translate_img’, translate_img); cv2.imshow(‘rotate_img’, rotate_img); cv2.waitKey(0); cv2.destroyAllWindows();

Release history Release notifications | RSS feed

This release

1.0 This release

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page