Blog

Learn About Our Meetup

5000+ Members

MEETUPS

LEARN, CONNECT, SHARE

Join our meetup, learn, connect, share, and get to know your Toronto AI community. 

JOB POSTINGS

INDEED POSTINGS

Browse through the latest deep learning, ai, machine learning postings from Indeed for the GTA.

CONTACT

CONNECT WITH US

Are you looking to sponsor space, be a speaker, or volunteer, feel free to give us a shout.

[P] Rotating image about a pivot…pad_width must be of integral (type error)

I am developing an image to text conversion system using EAST text detector and pytesseract.

For tilted text portions in the image, I have found out the tilt angle and start point of the text bound and used the following code to rotate the image through the given angle about a given pivot point.

def rotateImage(img, angle, pivot): padX =[img.shape[1]- pivot[0], pivot[0]] padY =[img.shape[1]- pivot[0], pivot[0]] imgP =np.pad(img, [padX,padY], ‘constant’) imgR =scipy.ndimage.rotate(imgP, angle, reshape=False) return imgR[padY[0]: -padY[1], padX[0] : -padX[1]]

the angle and pivot are given as int values but even then at time im getting a typeerror saying pad_width must be of integral type

what is the problem here and how to solve it

submitted by /u/abbhn
[link] [comments]

Next Meetup

 

Days
:
Hours
:
Minutes
:
Seconds

 

Plug yourself into AI and don't miss a beat

 


Toronto AI is a social and collaborative hub to unite AI innovators of Toronto and surrounding areas. We explore AI technologies in digital art and music, healthcare, marketing, fintech, vr, robotics and more. Toronto AI was founded by Dave MacDonald and Patrick O'Mara.