Commit 07b7b63d authored by Kieran Hymas's avatar Kieran Hymas

last commit for v1.0

parent d12b4b69
/src/__pycache__/
*.desktop
.new_.txt
# Pycroscope v0.1
### Kieran Hymas
## Table of Contents
1. [Introduction](#1.\ Introduction)
2. [Installation](#2.\ Installation)
3. [Getting started](#3.\ Getting\ Started)
1. [Opening a stream]()
2. [Using the toolbar]()
3. [Snapshot tool]()
4. [Record tool]()
5. [Affine transformation tools]()
6. [Mirror tools]()
7. [Blur tool]()
8. [Colour tools]()
9. [Paintbrush tool]()
10. [Edge detection tool]()
4. [Contact](#4. Contact)
1. [Introduction](Introduction)
2. [Installation](Installation)
3. [Features](Features)
4. [Contact](Contact)
---
## 1. Introduction
## Introduction
Some people enjoy the feeling of compressing their corneas against the cool eyepieces of their brand-new microscope in order to get a glimpse of the fascinating microscopic world inhabiting their slides. I am not one of those people. I much prefer to plug the in-built webcam of my microscope into my computer and see a live image on screen. There are a myriad of reasons why this is much nicer than staring down those binocular eye-pieces like some mad explorer on microbiological safari. For instance: the ability to take screen shots of precious micron-scale memories, adapting image brightness and contrast on the fly and in some cases using the power of your computer for image analysis!
Some people enjoy the feeling of compressing their corneas against the cool eyepieces of their microscopes in order to get a glimpse of the fascinating microscopic world inhabiting their slides. I am not one of those people. I much prefer to plug the in-built webcam of my microscope into my computer and see a live image cast to the screen. There are a myriad of reasons why this is much nicer than staring down those binocular eye-pieces like some mad explorer on microbiological safari. For instance: the ability to take screen shots of precious micron-scale moments, adapting image brightness and contrast on the fly and in some cases using the power of your computer for image analysis!
Unfortunately for me, my new microscope came with computer viewing software on a CD (how perverse in this day and age ...) that was only suitable for a Windows PC. Unaware of any other microscope viewing software available for linux, I proceeded to develop Pycroscope; microscope image viewing software written exclusivly in Python (Py-croscope ... get it?). While the software is relatively bare-bones in the current version (v0.1), I hope to expand the software in future versions making full use of the wonderful opencv library on which it is based.
Unfortunately for me, my new microscope came with viewing software on a CD (how perverse in this day and age ...) that was only suitable for a Windows PC. Unaware of any other microscope viewing software available for Linux, I proceeded to develop Pycroscope; microscope image viewing software written exclusively in Python (Py-croscope ... get it?). While the software is relatively bare-bones in the current version (v1.0), I hope to expand it in future versions making full use of the wonderful OpenCV library on which it is based.
## 2. Installation
## Installation
Currently no explicit installation routine exists. Simple clone the repository, make sure you have python3 installed on your computer, install the required packages if you don't have them already (Tkinter, Pillow, Numpy, Opencv)and you should be good to go.
Currently there are no setup tools for Pycroscope, I hope to register it on PyPI at some point to make it a little easier for people to install but for now you'll have to do it manually. There are a few dependencies that must be met in order to run the program; you must have:
## 3. Getting Started
* Python3
* OpenCV
* numpy
* Pillow
Learn it yourself, jeez do I have to do everything!?
and that's it!
## Features
After starting Pycroscope, begin a new stream by clicking 'File > New stream > source X' (where X is the index for your microscope webcam) to open a live video stream on your computer. You can then use the tools in the tool bar (or in the View and Tools drop down menus) to modify the image to your liking. There are various tools available to manipulate your image such as:
* Blur tool
* Colour modifier
* Paint brush
* Edge detection tool
and you can also take a snapshot or record the video stream and save your discoveries to disk!
## 4. Contact
......
assets/icons/rotate.png

474 Bytes | W: | H:

assets/icons/rotate.png

469 Bytes | W: | H:

assets/icons/rotate.png
assets/icons/rotate.png
assets/icons/rotate.png
assets/icons/rotate.png
  • 2-up
  • Swipe
  • Onion skin
......@@ -36,7 +36,6 @@ class Application:
'BlurKernelw' : IntVar(), \
'BlurDeviationX' : IntVar(), \
'BlurDeviationY' : IntVar(), \
'Zoom' : DoubleVar(), \
'Brightness' : IntVar(), \
'Contrast' : IntVar(), \
'Gamma' : DoubleVar(), \
......@@ -57,8 +56,8 @@ class Application:
self.toolbarExists = False
self.toolbaricons = [tk.PhotoImage(file="./assets/icons/snapshot.png"), \
tk.PhotoImage(file="./assets/icons/record.png"), \
tk.PhotoImage(file="./assets/icons/rotate_anti.png"), \
tk.PhotoImage(file="./assets/icons/rotate.png"), \
tk.PhotoImage(file="./assets/icons/zoom.png"), \
tk.PhotoImage(file="./assets/icons/vmirror.png"), \
tk.PhotoImage(file="./assets/icons/hmirror.png"), \
tk.PhotoImage(file="./assets/icons/blur.png"), \
......@@ -134,13 +133,16 @@ class Application:
self.filemenu.add_command(label="Exit", command=self.onExit)
self.viewmenu = Menu(self.menubar, tearoff=0)
self.viewmenu.add_command(label="Rotate", command=self.onRotate)
self.viewmenu.add_command(label="Zoom", command=self.onZoom)
self.viewmenu.add_command(label="Mirror (vertical)", command=self.onvMirror)
self.viewmenu.add_command(label="Mirror (horizonal)", command=self.onhMirror)
self.viewmenu.add_command(label="Rotate (clockwise)", command=self.onRotate)
self.viewmenu.add_command(label="Rotate (anti-clockwise)", command=self.onaRotate)
self.viewmenu.add_command(label="Flip (vertical)", command=self.onvMirror)
self.viewmenu.add_command(label="Flip (horizonal)", command=self.onhMirror)
self.menubar.add_cascade(label="View", menu=self.viewmenu)
self.toolmenu = Menu(self.menubar, tearoff=0)
self.toolmenu.add_command(label="Snapshot", command=self.onSnapshot)
self.toolmenu.add_command(label="Record video", command=self.onRecord)
self.toolmenu.add_separator()
self.toolmenu.add_command(label="Blur", command=self.onBlur)
self.toolmenu.add_command(label="Colour", command=self.onColour)
self.toolmenu.add_command(label="Brush", command=self.onBrush)
......@@ -177,10 +179,10 @@ class Application:
toolbarsep1.pack(side=TOP, padx=2, pady=2, fill=X)
pair2 = Frame(toolbar)
rotateButton = Button(pair2, relief=FLAT, image=self.toolbaricons[2], command=self.onRotate)
rotateantiButton = Button(pair2, relief=FLAT, image=self.toolbaricons[2], command=self.onaRotate)
rotateantiButton.pack(side=LEFT, padx=1, pady=1)
rotateButton = Button(pair2, relief=FLAT, image=self.toolbaricons[3], command=self.onRotate)
rotateButton.pack(side=LEFT, padx=1, pady=1)
zoomButton = Button(pair2, relief=FLAT, image=self.toolbaricons[3], command=self.onZoom)
zoomButton.pack(side=LEFT, padx=1, pady=1)
pair2.pack(side=TOP)
pair3 = Frame(toolbar)
......@@ -511,9 +513,8 @@ class Application:
def onRotate(self):
self.options['Rotate'] = np.mod(self.options['Rotate'] + 1, 4)
def onZoom(self):
self.options['Zoom'] = not self.options['Zoom']
print("zoom")
def onaRotate(self):
self.options['Rotate'] = np.mod(self.options['Rotate'] - 1, 4)
def onvMirror(self):
self.options['vMirror'] = not self.options['vMirror']
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment