This repository summarized computer vision theories.

Overview

CV_theory

Python Cv2

Basic Overview

This repository summarized computer vision theories.


PSNR

mse = np.mean((img1 - img2) ** 2)
# MSE 구하는 식

PLXEL_MAX = 255.0
# 8bit MAX는 255의 값을 가짐

return 20 * math.log10(PLXEL_MAX/math.sqrt(mse))
#PSNR 구하는 식

[output]
openCV를 이용한 PSNR : 52.37698680492553
주어진 수식을 이용한 함수구현 : 52.37698680492553

Color transform

for i in range(height):
    for j in range(width):
        y2[i][j] = 0.299 * r[i][j] + 0.587 * g[i][j] + 0.114 * b[i][j]
        cb2[i][j] = (-0.172*r[i][j]) - (0.339*g[i][j]) + (0.511*b[i][j]) + 128
        cr2[i][j] = (0.511*r[i][j])- (0.428*g[i][j]) - (0.083*b[i][j]) + 128
# RGB 영상을 YCbCr로 변환 수식

for i in range(height):
    for j in range(width):
        r[i][j] = y2[i][j] + 1.371*(cr2[i][j] - 128)
        g[i][j] = y2[i][j] - 0.698*(cr2[i][j] - 128) - 0.336*(cb2[i][j] - 128)
        b[i][j] = y2[i][j] + 1.732*(cb2[i][j] - 128)
# yCbCr을 RGB 변환 수식

Filterring Smoothing

After converting the original image to Ycrcb, only the Y value was filtered with 3*3 kernels and smoothing was performed.

kernel = np.ones((3, 3), np.float32) / 9
# 3*3 커널값 저장

for i in range(5):
    Y = cv2.filter2D(Y, -1, kernel)
# 5번 필터링


Histogram equalization

height, width, channel = src.shape


hist, bins = np.histogram(Y.flatten(), 256, [0, 256])
# 이미지 히스토그램 구해주기

cdf = hist.cumsum()
# 각 멤버값을 누적하여 더한 1차원 배열 생성

cdf_m = np.ma.masked_equal(cdf, 0)
# cdf에서 값이 0인 부분  mask 처리


cdf_m = (cdf_m - cdf_m.min()) * 255 / (cdf_m.max() - cdf_m.min())
#  균일화 방정식 코드

cdf = np.ma.filled(cdf_m, 0). astype("uint8")
# mask처리된 부분을 o으로 다시 리턴

out = (np.dstack((Y, cr, cb)))
out_rgb = cv2.cvtColor(out, cv2.COLOR_YCrCb2RGB)

img2 = cdf[out_rgb]

dst -> function in cv2 , dst2 -> Self-made function


Hough Line Detection


Contributing

Let's connect 👨‍💻 and forge the future together. 😁

Check the Repositories and don't forget to give a star. 👇

From S-jooyoung

一键翻译各类图片内文字

一键翻译各类图片内文字 针对群内、各个图站上大量不太可能会有人去翻译的图片设计,让我这种日语小白能够勉强看懂图片 主要支持日语,不过也能识别汉语和小写英文 支持简单的涂白和嵌字

574 Dec 28, 2022
Binarize document images

Binarization Binarization for document images Examples Introduction This tool performs document image binarization (i.e. transform colour/grayscale to

QURATOR-SPK 48 Jan 02, 2023
Scene text detection and recognition based on Extremal Region(ER)

Scene text recognition A real-time scene text recognition algorithm. Our system is able to recognize text in unconstrain background. This algorithm is

HSIEH, YI CHIA 155 Dec 06, 2022
SCOUTER: Slot Attention-based Classifier for Explainable Image Recognition

SCOUTER: Slot Attention-based Classifier for Explainable Image Recognition PDF Abstract Explainable artificial intelligence has been gaining attention

87 Dec 26, 2022
The papers published in top-tier AI conferences in recent years.

AI-conference-papers The papers published in top-tier AI conferences in recent years. Paper table AAAI ICLR CVPR ICML ICCV ECCV NIPS 2019 ✔️ ✔️ ✔️ ✔️

Jinbae Park 6 Dec 09, 2022
Pure Javascript OCR for more than 100 Languages 📖🎉🖥

Version 2 is now available and under development in the master branch, read a story about v2: Why I refactor tesseract.js v2? Check the support/1.x br

Project Naptha 29.2k Jan 05, 2023
A version of nrsc5-gui that merges the interface developed by cmnybo with the architecture developed by zefie in order to start a new baseline that is not heavily dependent upon Python processing.

NRSC5-DUI is a graphical interface for nrsc5. It makes it easy to play your favorite FM HD radio stations using an RTL-SDR dongle. It will also displa

61 Dec 22, 2022
Camelot: PDF Table Extraction for Humans

Camelot: PDF Table Extraction for Humans Camelot is a Python library that makes it easy for anyone to extract tables from PDF files! Note: You can als

Atlan Technologies Pvt Ltd 3.3k Dec 31, 2022
TableBank: A Benchmark Dataset for Table Detection and Recognition

TableBank TableBank is a new image-based table detection and recognition dataset built with novel weak supervision from Word and Latex documents on th

844 Jan 04, 2023
(CVPR 2021) ST3D: Self-training for Unsupervised Domain Adaptation on 3D Object Detection

ST3D Code release for the paper ST3D: Self-training for Unsupervised Domain Adaptation on 3D Object Detection, CVPR 2021 Authors: Jihan Yang*, Shaoshu

CVMI Lab 224 Dec 28, 2022
基于图像识别的开源RPA工具,理论上可以支持所有windows软件和网页的自动化

SimpleRPA 基于图像识别的开源RPA工具,理论上可以支持所有windows软件和网页的自动化 简介 SimpleRPA是一款python语言编写的开源RPA工具(桌面自动控制工具),用户可以通过配置yaml格式的文件,来实现桌面软件的自动化控制,简化繁杂重复的工作,比如运营人员给用户发消息,

Song Hui 7 Jun 26, 2022
PianoVisuals - Create background videos synced with piano music using opencv

Steps Record piano video Use Neural Network to do body segmentation (video matti

Solbiati Alessandro 4 Jan 24, 2022
The first open-source library that detects the font of a text in a image.

Typefont Typefont is an experimental library that detects the font of a text in a image. Usage Import the main function and invoke it like in the foll

Vasile Pește 1.6k Feb 24, 2022
Satoshi is a discord bot template in python using discord.py that allow you to track some live crypto prices with your own discord bot.

Satoshi ~ DiscordCryptoBot Satoshi is a simple python discord bot using discord.py that allow you to track your favorites cryptos prices with your own

Théo 2 Sep 15, 2022
OCR of Chicago 1909 Renumbering Plan

Requirements: Python 3 (probably at least 3.4) pipenv (pip3 install pipenv) tesseract (brew install tesseract, at least if you have a mac and homebrew

ted whalen 2 Nov 21, 2021
Official implementation of Character Region Awareness for Text Detection (CRAFT)

CRAFT: Character-Region Awareness For Text detection Official Pytorch implementation of CRAFT text detector | Paper | Pretrained Model | Supplementary

Clova AI Research 2.5k Jan 03, 2023
[ICCV, 2021] Cloud Transformers: A Universal Approach To Point Cloud Processing Tasks

Cloud Transformers: A Universal Approach To Point Cloud Processing Tasks This is an official PyTorch code repository of the paper "Cloud Transformers:

Visual Understanding Lab @ Samsung AI Center Moscow 27 Dec 15, 2022
CVPR 2021 Oral paper "LED2-Net: Monocular 360˚ Layout Estimation via Differentiable Depth Rendering" official PyTorch implementation.

LED2-Net This is PyTorch implementation of our CVPR 2021 Oral paper "LED2-Net: Monocular 360˚ Layout Estimation via Differentiable Depth Rendering". Y

Fu-En Wang 83 Jan 04, 2023
Python Computer Vision application that allows users to draw/erase on the screen using their webcam.

CV-Virtual-WhiteBoard The Virtual WhiteBoard is a project I made using the OpenCV and Mediapipe Python libraries. Using your index and middle finger y

Stephen Wang 1 Jan 07, 2022
This repository lets you train neural networks models for performing end-to-end full-page handwriting recognition using the Apache MXNet deep learning frameworks on the IAM Dataset.

Handwritten Text Recognition (OCR) with MXNet Gluon These notebooks have been created by Jonathan Chung, as part of his internship as Applied Scientis

Amazon Web Services - Labs 422 Jan 03, 2023