Skip to content

Instantly share code, notes, and snippets.

Avatar

Doug Goodwin douglasgoodwin

View GitHub Profile
View towersofHanoi.pyde
h = 4
A = []
B = []
C = []
for i in range(1,h+1):
A.append(i)
A.reverse()
towers = {"A":A,"B":B,"C":C}
View iteration.pyde
size(400,400)
# white background
background(255)
textAlign(CENTER, CENTER)
i=0
chunk=40
# use range to specify the start, end, and chunk for each loop
# some inspiration from Shiffman
for y in range(0,height,chunk):
View tedium.pyde
size(400,400)
# white background
background(255)
textAlign(CENTER, CENTER)
# Extremely tedious sequence...
fill(100)
rect(0,0, 40,40)
fill(255)
View necker-grid.pyde
from random import randrange
size(600,600)
background(255)
strokeWeight(2)
rowheight = height/7
colwidth = width/6
for y in range(0,height+rowheight,rowheight):
View README.md

Simple image morphing - α-blending of two images using with a cross-dissolve from one image matrix to another.

This project is like the one on page 32 of your new book, "Hands-On Image Processing with Python".

The following code block shows how to start from one face image and end up with another image by using a linear combination of the two image numpy ndarrays.

PROCESS:

  1. Shoot two pictures (see below)
  2. Bring them into Colab
@douglasgoodwin
douglasgoodwin / README.md
Created Jan 30, 2020
For a lecture on Histograms and dynamic range
View README.md

Uses this file: Close-up of leaves, from directly above, In Glacier National Park, Montana

@douglasgoodwin
douglasgoodwin / frameanalysis.ipynb
Created Dec 9, 2019
Analysis of frames from the camera makes a coarse image
View frameanalysis.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@douglasgoodwin
douglasgoodwin / sealevel_data.csv
Created Nov 20, 2019
the sea level data with empty columns removed and the date fraction broken out into year, month, and day
View sealevel_data.csv
We can make this file beautiful and searchable if this error is corrected: It looks like row 10 should actually have 16 columns, instead of 4. in line 9.
,altimeter type,merged file cycle,fraction of year,number of observations,weighted observations,GMSL,standard deviation GMSL,smoothed GMSL,GMS variation 20 year mean,standard deviation GMSL.1,smoothed 20 year mean,smoothed annual semi-annual signal,year,month,day
0,0,11,1993.0115260000002,466462,337277.0,-37.24,92.66,-37.02,-37.24,92.66,-37.02,-37.55,1993,1,5
1,0,12,1993.038692,460889,334037.31,-40.35,95.39,-38.2,-40.34,95.39,-38.19,-38.06,1993,1,15
2,0,13,1993.065858,472123,342416.09,-40.17,92.29,-38.28,-40.16,92.29,-38.27,-37.6,1993,1,25
3,0,14,1993.093025,421377,306050.59,-41.92,96.2,-38.56,-41.89,96.19,-38.54,-37.45,1993,2,3
4,0,15,1993.120191,459548,331094.09,-36.89,94.64,-37.87,-36.85,94.63,-37.83,-36.44,1993,2,13
5,0,16,1993.147357,416480,300344.81,-35.69,93.22,-36.96,-35.65,93.21,-36.93,-35.31,1993,2,23
6,0,17,1993.1745230000001,467980,337061.91,-36.09,91.67,-36.14,-36.05,91.67,-36.09,-34.28,1993,3,5
7,0,18,1993.201689,466075,335414.41,-34.7,91.95,-35.53,-34.65,91.94,-35.48,-33.5,1993,3,15
8,0,19,1993
View samdata.csv
We can make this file beautiful and searchable if this error is corrected: It looks like row 10 should actually have 17 columns, instead of 9. in line 9.
altimeter type,merged file cycle,year,fraction of year,number of observations,weighted observations,GMSL,standard deviation GMSL,smoothed GMSL,GMS variation 20 year mean,standard deviation GMSL,smoothed 20 year mean,smoothed annual semi-annual signal,,,,
0,11,1993,1993.011526,466462,337277,-37.24,92.66,-37.02,-37.24,92.66,-37.02,-37.55,,,,
0,12,1993,1993.038692,460889,334037.31,-40.35,95.39,-38.2,-40.34,95.39,-38.19,-38.06,,,,
0,13,1993,1993.065858,472123,342416.09,-40.17,92.29,-38.28,-40.16,92.29,-38.27,-37.6,,,,
0,14,1993,1993.093025,421377,306050.59,-41.92,96.2,-38.56,-41.89,96.19,-38.54,-37.45,,,,
0,15,1993,1993.120191,459548,331094.09,-36.89,94.64,-37.87,-36.85,94.63,-37.83,-36.44,,,,
0,16,1993,1993.147357,416480,300344.81,-35.69,93.22,-36.96,-35.65,93.21,-36.93,-35.31,,,,
0,17,1993,1993.174523,467980,337061.91,-36.09,91.67,-36.14,-36.05,91.67,-36.09,-34.28,,,,
0,18,1993,1993.201689,466075,335414.41,-34.7,91.95,-35.53,-34.65,91.94,-35.48,-33.5,,,,
0,19,1993,1993.228855,461207,331521.09,-34.04,91.7,-35.18
View cp1_lect1.md

[fit] Computational Photography 1


[fit] Douglas Goodwin | Baxter 106 | 11a-1p

[fit] dgoodwin@scrippscollege.edu


[fit] camera + computer = ??

You can’t perform that action at this time.