We are focusing on learning Python, OpenCV, Pygame, CNC and all the skills needed for us to take on the challenge of detecting skin cancer melanomas!
1/10/2021 Review progress so far
What did we learn?
What were the challenges?
How to apply to dermatology?
Review paper submission for Medical Image Analysis (here)
1/3/2021 Color Mapping and Identification
Focus on verifying colors for Candy Land
How to sample a bunch of cards
Determine color limits
Image below shows a bunch of sampled colors from the cards in Candyland. Notice that you could limit the range of colors to check if color is one color or another. For example look at the Blue min/max, Green min/max and Red min/max.
Could also determine the distance from the center of the color cubes
12/27/2020 - Motion System for Interactive Games
Test G-Code motion system for interactive games
12/20/2020 - Work on building motion system
12/13/2020 - Gather Images
Be sure to gather images for game state detection
12/6/2020 - Need to keep working on our games... Objectives are:
Complete your camera game state detection
Incorporate camera game state into your interactive game code
Each student to prepare a site/tutorial for your game
Explain the code
Explain the vision based challenges
Explain how the algorithms work
5-10 minute presentation
11/29/2020 - Determining the game state for the game using a camera
Mancala
Difficulty in counting multi-colored and different shaped marbles
Lighting issues
Tic-Tac-Toe
Difficulty in removing the #
Difficulty in determining exactly where the edges are
Othello
Still need to setup camera
Candy Land
How to detect the card and determine what the colors are
Lots of similar colors: Pink, Red, Orange, Purple!
Connect 4
Still working on setting up camera
11/22/2020 - Advanced contours and contour properties
How to detect contours
What is a convex hull
Interior and exterior contours
Simplified contours
How to differentiate shapes by contour properties
Area, perimeter, solidity
Tic-Tac-Toe
Reviewed contours
Skin Melanomas
Experimented detecting edges
Melanoma 1:
Fairly clear edges
Need to optimize the level for edge detection
Melanoma 1:
Much more squiggly lines on the image
Melanoma 3:
Need to try to ignore the hairs
11/15/2020 - OpenCV Basics
We reviewed the PyImageSearch tutorial on the basics
Homework: Practice contouring on skin melanoma images
11/8/2020 - Focus on Connect 4
Display the board
Displays valid moves
Processes mouse clicks
Process the moves
Plays sounds
Determines the winner
Connect 4 Pygame board
11/1/2020 - Focus on game interaction for Othello
Display the board
Display the valid moves
Process the mouse clicks
Plays music
Determines the winner
10/25/2020 - Work on our Pygame programs
Game logic
Text version of the game
Draw graphics for the board
Download and play sounds during game
Process mouse interaction
Games are working for Candy Land, Tic-Tac-Toe and Manacala!
Candy Land
Displays the board
Displays the card picked
Processes the move
Plays music
Determines winner
Challenges:
Digital version of the deck
Determining square locations and colors... did this with mouse picking to create a list of coordinates
Mancala
Plays music: Addams Family
Displays who's turn it is
Displays the count in each bin
Processes moves
Checks for end of game
Challenges:
Displaying a bunch of marbles in each slot without overlapping
Tic-Tac-Toe
Cool concept for the board with an egg crate background
Processes moves
Determines winner or tie
Plays music
10/18/2020 - Play our games against eachother and work on algorithms
10/11/202 - Introduction to Pygame
Here are the games each person picked:
Malina - Candy Land
Alex - Connect 4
Shryia - Othello
Nik - Tic-Tac-Toe
Maria - Mancala
PyGame
The main website: https://www.pygame.org/news
The documentation page: https://www.pygame.org/docs/
We all install Pygame into PyCharm
What is PyGame good for?
Adding graphics
Adding sounds
Processing keyboard and mouse events
We learn:
How to initialize Pygame
Start the sound mixer
Add images
Play background music and sound effects
Process events including keyboard and mouse
Drawing with Pygame
Test, Lines, Circles, Rectangles
Colors
Example code below to draw a funny man
myColor = (255,70,30)
black = (0,0,0)
red = (255,0,0)
green = (0,255,0)
magenta = (255,0,255)
cyan = (0, 255,255)
yellow = (255, 255, 0)
white = (255,255,255)
blue = (0,0,255)
screen.fill(black)
pygame.draw.circle(screen, blue, (500,300), 250, 5)
pygame.draw.circle(screen, white, (500,300), 245)
pygame.draw.rect(screen, red, (300,170,150,20)) # x, y, w, h
pygame.draw.rect(screen, red, (550,170,150,20)) # x, y, w, h
eye1 = (400,230)
eye2 = (600,230)
pygame.draw.circle(screen, yellow, eye1, 55, 5)
pygame.draw.circle(screen, cyan, eye1, 50)
pygame.draw.circle(screen, yellow, eye2, 55, 5)
pygame.draw.circle(screen, cyan, eye2, 50)
pygame.draw.polygon(screen, yellow, ((500,225), (575, 345), (425, 345)))
pygame.draw.polygon(screen, magenta, ((500,225), (575, 345), (425, 345)), 5)
x, y = pygame.mouse.get_pos()
mouse = (x,y)
angle1 = mouseAngle(mouse, eye1)
eyeRadius = 28
pupil1 = (int(eye1[0]+eyeRadius*math.cos(angle1)), int(eye1[1]+eyeRadius*math.sin(angle1)))
pygame.draw.circle(screen, red, pupil1, 25)
angle2 = mouseAngle(mouse, eye2)
pupil2 = (int(eye2[0]+eyeRadius*math.cos(angle2)), int(eye2[1]+eyeRadius*math.sin(angle2)))
pygame.draw.circle(screen, red, pupil2, 25)
pygame.draw.circle(screen, green, (400,450), 50)
pygame.draw.circle(screen, green, (600,450), 50)
pygame.draw.rect(screen, red, (400,400,200,100)) # x, y, w, h
pygame.draw.line(screen, black, (400,475), (600, 425), 5)
10/4/2020 - Discuss the Hot Pepper game
How do you win every time? That's the power of an algorithm
Discuss the algorithm for a game:
Initialization:
Who goes first?
Who are the players (are they computers/AI or real people)
Reset the board
Process the moves - Until and end is reached
Display the board
What moves are valid?
Have player pick a move (repeat until the move is valid)
Determine the new game state
Check if the end of the game been reached?
End of Game
Determine winner (or tie)
Display the results
Homework:
Pick a game
Think about the game algorithm
Continue your Python on-line lessons
Hot Pepper Game Rules:
There are 21 candies and one hot pepper
Each turn a player can pick 1, 2, 3, or 4 candies
Turns alternate until there are no candies left
Whomever picks the last candy must eat the hot pepper!
Objective: Not to be the one who picks the last candy
Is there a way to win every time if you go last?
Make your pick based on what the other person picks
Pick a quantity that makes the sum equal to 5
For example: Person picks 1, you pick 4
This will decrease the total from 21 to 16 to 11 to 6 to 1
9/19/2020 - Basics of Programming and Robotics
Basics of Programming
Programming languages, Algorithms,
Variables (int, float, boolean, string)
Lists, Tuples, Dictionaries
{}, [], ()
Math Operations
Logic Operations
Control Statements
Inputs and Outputs
Functions
Learning Python - Video to the right is a great introduction
9/15/2020 - Introduction to this years team and objectives. Alex, Malina, Shryia, Nik and Maria
Why a Robotics Project?
Value of Robotics, AI, Machine Learning, Computer Vision
What to learn
Presentation skills
Programming skills
Teamwork
Project management
Research problems
Parts of a System
The Mechanical Build: Gears, Mechanisms, Bearings
Algorithms - line following, driving , turning, PID loops
Sensors - light, time of flight, cameras, ultrasonic, buttons, gyros, etc
Motors and actuators
Communications - I2C, SPI, UART, Ethernet, Radio, Bluetooth, WiFi, etc
Basics of circuits and electronics
Human Machine Interface (HMI)
Miscellaneous - Pneumatics, Relays
Discuss ideas
Games, Medical, Artistic...
Target learn the basics of CV through games then apply what we learn to medical skin cancer detection