Skip to main content

Compare 2 frames

Project description

Language

Compare frames

PyPI PyPI - License PyPI - Python Version

Compare 2 frames


Installation

Package Installation from PyPi

$ pip install compare-frames-g4

Package Installation from Source Code

The source code is available on GitHub.
Download and install the package:

$ git clone https://github.com/Genzo4/compare_frames
$ cd compare_frames
$ pip install -r requirements.txt
$ pip install .

Usage

  • From files
from compare_frames_g4 import compare_frames

is_equal = compare_frames('path_to_frame_1', 'path_to_frame_2')
  • From frames (numpy.ndarray)
from compare_frames_g4 import compare_frames
import cv2

frame_1 = cv2.imread('path_to_frame_1')
frame_2 = cv2.imread('path_to_frame_2')

is_equal = compare_frames(frame_1, frame_2)
  • Mix
from compare_frames_g4 import compare_frames
import cv2

frame_1 = cv2.imread('path_to_frame_1')

is_equal = compare_frames(frame_1, 'path_to_frame_2')
from compare_frames_g4 import compare_frames
import cv2

frame_2 = cv2.imread('path_to_frame_2')

is_equal = compare_frames('path_to_frame_2', frame_2)

Changelog


Language

Compare frames

PyPI PyPI - License PyPI - Python Version

Сравнение двух кадров (изображений).


Установка

Установка пакета с PyPi

$ pip install compare-frames-g4

Установка пакета из исходного кода

Исходный код размещается на GitHub.
Скачайте его и установите пакет:

$ git clone https://github.com/Genzo4/compare_frames
$ cd compare_frames
$ pip install -r requirements.txt
$ pip install .

Использование

  • Берём кадры из файлов
from compare_frames_g4 import compare_frames

is_equal = compare_frames('path_to_frame_1', 'path_to_frame_2')
  • Используем "готовые" кадры (numpy.ndarray). Например, из cv2.imread
from compare_frames_g4 import compare_frames
import cv2

frame_1 = cv2.imread('path_to_frame_1')
frame_2 = cv2.imread('path_to_frame_2')

is_equal = compare_frames(frame_1, frame_2)
  • Смешанный режим
from compare_frames_g4 import compare_frames
import cv2

frame_1 = cv2.imread('path_to_frame_1')

is_equal = compare_frames(frame_1, 'path_to_frame_2')
from compare_frames_g4 import compare_frames
import cv2

frame_2 = cv2.imread('path_to_frame_2')

is_equal = compare_frames('path_to_frame_2', frame_2)

Changelog

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

compare_frames_g4-1.1.0.tar.gz (4.9 kB view hashes)

Uploaded Source

Built Distribution

compare_frames_g4-1.1.0-py3-none-any.whl (4.6 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