Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the `imrect` equivalent in Python?

Tags:

python

I'm looking for a simple Python utility or module that:

  • I can give it an image, and it pops up a GUI window for the user to draw a box inside the image
  • after drawing the box, it returns the coordinates of the box

MATLAB users will realize that I am asking for imrect equivalent in Python.

Is there a simple utility out there to do this?

like image 973
carl Avatar asked Feb 21 '23 16:02

carl


2 Answers

A quick implementation, for any future searchers: https://raw.github.com/cvondrick/pyvision/master/vision/drawer.py

like image 186
carl Avatar answered Mar 07 '23 00:03

carl


You can try PIL - Python Imaging Library.

For GUI there's a module named tkinter, though there may be some better options too.

like image 24
Sufian Latif Avatar answered Mar 07 '23 00:03

Sufian Latif