Skip to content

Instantly share code, notes, and snippets.

Ankita Das Ankita-Das

Block or report user

Report or block Ankita-Das

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@Ankita-Das
Ankita-Das / mnist_deskew.py
Last active Jul 9, 2018
MNIST_deskewing using findContours,minAreaRect,drawContours of opencv (python)
View mnist_deskew.py
import numpy as np
import cv2
image=cv2.imread('MNIST/test/3647.png')
gray=cv2.cvtColor(image,cv2.COLOR_BGR2GRAY)## for 9 problem with 4665,8998,73,7
#I faced a problem with the deskewing and the solution suggested by @zindarod "https://stackoverflow.com/questions/51237834/deskewing-mnist-dataset-images-using-minarearect-of-opencv"
#really improved the deskewing
#gray=cv2.bitwise_not(gray)
Gblur=cv2.blur(gray,(5,5))
thresh=cv2.threshold(Gblur,0,255,cv2.THRESH_BINARY | cv2.THRESH_OTSU)[1]
@Ankita-Das
Ankita-Das / read_into_colab_from_drive.ipynb
Last active Jul 2, 2018
read_into_colab_from_drive.ipynb
View read_into_colab_from_drive.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
You can’t perform that action at this time.