Skip to content

foobar167/junkyard

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Chaotic collection of test files, probes, hacks and ideas

  1. Python notes and links to interesting places
  2. General object classifier
  3. OpenCV Filtering GUI
  4. Sending emails with Python
  5. Manual image annotation with polygons
  6. Manual image annotation with rectangles
  7. Image viewer
  8. Advanced zoom
  9. C extension for Python
  10. OpenCV + Tkinter snapshot GUI
  11. OpenCV features
  12. Multilanguage for Python
  13. Dynamic menu
  14. Rolling window on NumPy arrays
  15. SIFT object tracking
  16. Tkinter progressbar

Bookmarks to remember and re-visit.


My replica of this original course: Image Processing with Python.

Image Processing with Python


Classifies 3 types of bears: bronw, black and teddy bear.

Bear classifier

Object classifier is based on:

  • Python and fast.ai for model training through deep learning;
  • Render cloud provider to deploy your code in web.
  • Flutter mobile development framework with a single code base for Android and iOS applications;
  • Firebase for Google Analytics.

And consists of 3 components:

  1. model training script - Jupyter (Colab) script to train a classification model.
  2. web app - starter project to deploy a trained classification model to the web.
  3. mobile app - mobile application which connect your web app with mobile phone (tested for Android).

OpenCV Filtering GUI is a set of various realtime filters to process images from the webcam. This GUI is based on the previous OpenCV features demo with enhanced Tkinter controls for user-friendly OpenCV real-time filters demonstration.

OpenCV Filtering GUI


Sending emails with Python.

Sending emails with Python


Manual image annotation opens image where user can select polygon areas around the objects of interest. After selecting region of interest user presses menu button and program cuts rectangular images from selected polygons with a scanning window.

Manual image annotation with polygons


Manual image annotation creates rectangular images with selected areas of interest (ROI). User opens image and selects rectangular areas of interest. After selecting rectangles and pressing menu button program cuts rectangle images from the bigger image.

Manual image annotation with rectangles


Image viewer shows image and prints coordinates of the rectangular area in the console.

Image viewer


Advanced zoom for images of various formats and sizes from small to huge up to several GB.

Advanced zoom


C language extension for Python language by example of co-occurrence matrix calculation.


Take shapshot using webcamera, OpenCV and Tkinter. Example is well documented and has many comments inside.

OpenCV + Tkinter snapshot GUI


Demo of various OpenCV features. Application is tested for Windows OS and requires webcam. There is a newer version with GUI.

OpenCV features


How-to implement multilanguage for Python.


Example of the dynamic menu for Tkinter GUI.


General examples for 1D, 2D, 3D and MD rolling window arrays in the on-line CoLab notebook.

It has zero Python cycles inside, so the speed is the same as in C programming language.

Rolling window on NumPy arrays

My previous examples of the rolling window for 2D array are here and here.


Note: SIFT and SURF are for Python version 3.4.2.16 and older. Otherwise use ORB algorithm.

Example of the objects tracking using SIFT algorithm. SIFT algorithm is free of charge for non-commercial projects.

  1. Open GUI: python sift_tracking.py.
  2. Place object in front of webcamera, so it take all visible space.
  3. Press "Snapshot!" button. Application will make snapshort of the object to track.
  4. After taking snapshort there will be blue rectangle around tracking object and green lines connecting specian points of the image.

Rectangular objects, like books, are tracked better than faces.

SIFT object tracking


Example of the Tkinter progressbar GUI.

Tkinter progressbar