Large diffs are not rendered by default.

@@ -1,55 +1,55 @@
# Blender MTL File: 'chateauBase12.blend'
# Material Count: 6

newmtl BoisBas
Ns 96.078431
Ka 0.000000 0.000000 0.000000
Kd 0.640000 0.640000 0.640000
Ks 0.500000 0.500000 0.500000
Ni 1.000000
d 1.000000
illum 2

newmtl BoisToit
Ns 96.078431
Ka 0.000000 0.000000 0.000000
Kd 0.640000 0.640000 0.640000
Ks 0.500000 0.500000 0.500000
Ni 1.000000
d 1.000000
illum 2

newmtl None
Ns 0
Ka 0.000000 0.000000 0.000000
Kd 0.8 0.8 0.8
Ks 0.8 0.8 0.8
d 1
illum 2

newmtl PierreHaut
Ns 96.078431
Ka 0.000000 0.000000 0.000000
Kd 0.640000 0.640000 0.640000
Ks 0.500000 0.500000 0.500000
Ni 1.000000
d 1.000000
illum 2

newmtl Toit
Ns 96.078431
Ka 0.000000 0.000000 0.000000
Kd 0.640000 0.640000 0.640000
Ks 0.500000 0.500000 0.500000
Ni 1.000000
d 1.000000
illum 2

newmtl TourPierreBas
Ns 96.078431
Ka 0.000000 0.000000 0.000000
Kd 0.640000 0.640000 0.640000
Ks 0.500000 0.500000 0.500000
Ni 1.000000
d 1.000000
illum 2
# Blender MTL File: 'chateauBase12.blend'
# Material Count: 6

newmtl BoisBas
Ns 96.078431
Ka 0.000000 0.000000 0.000000
Kd 0.640000 0.640000 0.640000
Ks 0.500000 0.500000 0.500000
Ni 1.000000
d 1.000000
illum 2

newmtl BoisToit
Ns 96.078431
Ka 0.000000 0.000000 0.000000
Kd 0.640000 0.640000 0.640000
Ks 0.500000 0.500000 0.500000
Ni 1.000000
d 1.000000
illum 2

newmtl None
Ns 0
Ka 0.000000 0.000000 0.000000
Kd 0.8 0.8 0.8
Ks 0.8 0.8 0.8
d 1
illum 2

newmtl PierreHaut
Ns 96.078431
Ka 0.000000 0.000000 0.000000
Kd 0.640000 0.640000 0.640000
Ks 0.500000 0.500000 0.500000
Ni 1.000000
d 1.000000
illum 2

newmtl Toit
Ns 96.078431
Ka 0.000000 0.000000 0.000000
Kd 0.640000 0.640000 0.640000
Ks 0.500000 0.500000 0.500000
Ni 1.000000
d 1.000000
illum 2

newmtl TourPierreBas
Ns 96.078431
Ka 0.000000 0.000000 0.000000
Kd 0.640000 0.640000 0.640000
Ks 0.500000 0.500000 0.500000
Ni 1.000000
d 1.000000
illum 2

Large diffs are not rendered by default.

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -1,35 +1,35 @@
package vision;

import processing.core.PApplet;
import processing.core.PImage;
import processing.video.Capture;

@SuppressWarnings("serial")
public class HoughTransform extends PApplet {
Capture cam;
PImage img;

public void setup() {
size(640, 480);
String[] cameras = Capture.list();
if (cameras.length == 0) {
println("There are no cameras available for capture.");
exit();
} else {
println("Available cameras:");
for (int i = 0; i < cameras.length; i++) {
println(cameras[i]);
}
cam = new Capture(this, cameras[0]);
cam.start();
}
}

public void draw() {
if (cam.available() == true) {
cam.read();
}
img = cam.get();
image(img, 0, 0);
}
package cs211.imageprocessing;

import processing.core.PApplet;
import processing.core.PImage;
import processing.video.Capture;

@SuppressWarnings("serial")
public class HoughTransform extends PApplet {
Capture cam;
PImage img;

public void setup() {
size(640, 480);
String[] cameras = Capture.list();
if (cameras.length == 0) {
println("There are no cameras available for capture.");
exit();
} else {
println("Available cameras:");
for (int i = 0; i < cameras.length; i++) {
println(cameras[i]);
}
cam = new Capture(this, cameras[0]);
cam.start();
}
}

public void draw() {
if (cam.available() == true) {
cam.read();
}
img = cam.get();
image(img, 0, 0);
}
}
@@ -1,4 +1,4 @@
package vision;
package cs211.imageprocessing;

import java.util.ArrayList;
import java.util.Collections;
@@ -27,7 +27,7 @@ public class ImageProcessing extends PApplet {
public void setup() {

// PICK WHICH IMAGE YOU WANT HERE !
m_image = loadImage("../../board1.jpg");
m_image = loadImage("../../board4.jpg");

size(m_image.width * 2 + 600, m_image.height);

@@ -56,8 +56,7 @@ public void setup() {
List<PVector> bestLines = linesForQuad(bestQuad, allLines);
List<PVector> intersections = getIntersections(bestLines);



//Code to draw Quads
//List<int[]> tmp = new ArrayList<int[]>();
// tmp.add(bestQuad);
// drawQuads(tmp, bestLines);
@@ -483,6 +482,7 @@ private List<int[]> getQuads(List<PVector> lines) {
//is big but your method is buggy ;-)
(float) (m_image.height * m_image.width * 0.2));
boolean nonFlatQuad = true; //the method doesn't really work.
//it should be QuadGraph.nonFlatQuad(c12, c23, c34, c41);
if (!(isConvex && validArea && nonFlatQuad)) {
quads.remove(quad);
}

Large diffs are not rendered by default.

@@ -1,118 +1,118 @@
package vision;

import processing.core.PApplet;

public class ThresholdBar {

float barWidth; //Bar's width in pixels
float barHeight; //Bar's height in pixels
float xPosition; //Bar's x position in pixels
float yPosition; //Bar's y position in pixels

float sliderPosition, newSliderPosition; //Position of slider
float sliderPositionMin, sliderPositionMax; //Max and min values of slider

boolean mouseOver; //Is the mouse over the slider?
boolean locked; //Is the mouse clicking and dragging the slider now?

private ImageProcessing parent;

/**
* @brief Creates a new horizontal scrollbar
*
* @param x The x position of the top left corner of the bar in pixels
* @param y The y position of the top left corner of the bar in pixels
* @param w The width of the bar in pixels
* @param h The height of the bar in pixels
*/
public ThresholdBar (ImageProcessing p, float x, float y, float w, float h) {
parent = p;
barWidth = w;
barHeight = h;
xPosition = x;
yPosition = y;

sliderPosition = xPosition + barWidth/2 - barHeight/2;
newSliderPosition = sliderPosition;

sliderPositionMin = xPosition;
sliderPositionMax = xPosition + barWidth - barHeight;
}

/**
* @brief Updates the state of the scrollbar according to the mouse movement
*/
void update() {
if (isMouseOver()) {
mouseOver = true;
}
else {
mouseOver = false;
}
if (parent.mousePressed && mouseOver) {
locked = true;
}
if (!parent.mousePressed) {
locked = false;
}
if (locked) {
newSliderPosition = constrain(parent.mouseX - barHeight/2, sliderPositionMin, sliderPositionMax);
}
if (PApplet.abs(newSliderPosition - sliderPosition) > 1) {
sliderPosition = sliderPosition + (newSliderPosition - sliderPosition);
}
}

/**
* @brief Clamps the value into the interval
*
* @param val The value to be clamped
* @param minVal Smallest value possible
* @param maxVal Largest value possible
*
* @return val clamped into the interval [minVal, maxVal]
*/
float constrain(float val, float minVal, float maxVal) {
return PApplet.min(PApplet.max(val, minVal), maxVal);
}

/**
* @brief Gets whether the mouse is hovering the scrollbar
*
* @return Whether the mouse is hovering the scrollbar
*/
boolean isMouseOver() {
if (parent.mouseX > xPosition && parent.mouseX < xPosition+barWidth &&
parent.mouseY > yPosition && parent.mouseY < yPosition+barHeight) {
return true;
}
else {
return false;
}
}

/**
* @brief Draws the scrollbar in its current state
*/
void display() {
parent.noStroke();
parent.fill(204);
parent.rect(xPosition, yPosition, barWidth, barHeight);
if (mouseOver || locked) {
parent.fill(0, 0, 0);
}
else {
parent.fill(102, 102, 102);
}
parent.rect(sliderPosition, yPosition, barHeight, barHeight);
}

/**
* @brief Gets the slider position
*
* @return The slider position in the interval [0,1] corresponding to [leftmost position, rightmost position]
*/
float getPos() {
return (sliderPosition - xPosition)/(barWidth - barHeight);
}
package cs211.imageprocessing;

import processing.core.PApplet;

public class ThresholdBar {

float barWidth; //Bar's width in pixels
float barHeight; //Bar's height in pixels
float xPosition; //Bar's x position in pixels
float yPosition; //Bar's y position in pixels

float sliderPosition, newSliderPosition; //Position of slider
float sliderPositionMin, sliderPositionMax; //Max and min values of slider

boolean mouseOver; //Is the mouse over the slider?
boolean locked; //Is the mouse clicking and dragging the slider now?

private ImageProcessing parent;

/**
* @brief Creates a new horizontal scrollbar
*
* @param x The x position of the top left corner of the bar in pixels
* @param y The y position of the top left corner of the bar in pixels
* @param w The width of the bar in pixels
* @param h The height of the bar in pixels
*/
public ThresholdBar (ImageProcessing p, float x, float y, float w, float h) {
parent = p;
barWidth = w;
barHeight = h;
xPosition = x;
yPosition = y;

sliderPosition = xPosition + barWidth/2 - barHeight/2;
newSliderPosition = sliderPosition;

sliderPositionMin = xPosition;
sliderPositionMax = xPosition + barWidth - barHeight;
}

/**
* @brief Updates the state of the scrollbar according to the mouse movement
*/
void update() {
if (isMouseOver()) {
mouseOver = true;
}
else {
mouseOver = false;
}
if (parent.mousePressed && mouseOver) {
locked = true;
}
if (!parent.mousePressed) {
locked = false;
}
if (locked) {
newSliderPosition = constrain(parent.mouseX - barHeight/2, sliderPositionMin, sliderPositionMax);
}
if (PApplet.abs(newSliderPosition - sliderPosition) > 1) {
sliderPosition = sliderPosition + (newSliderPosition - sliderPosition);
}
}

/**
* @brief Clamps the value into the interval
*
* @param val The value to be clamped
* @param minVal Smallest value possible
* @param maxVal Largest value possible
*
* @return val clamped into the interval [minVal, maxVal]
*/
float constrain(float val, float minVal, float maxVal) {
return PApplet.min(PApplet.max(val, minVal), maxVal);
}

/**
* @brief Gets whether the mouse is hovering the scrollbar
*
* @return Whether the mouse is hovering the scrollbar
*/
boolean isMouseOver() {
if (parent.mouseX > xPosition && parent.mouseX < xPosition+barWidth &&
parent.mouseY > yPosition && parent.mouseY < yPosition+barHeight) {
return true;
}
else {
return false;
}
}

/**
* @brief Draws the scrollbar in its current state
*/
void display() {
parent.noStroke();
parent.fill(204);
parent.rect(xPosition, yPosition, barWidth, barHeight);
if (mouseOver || locked) {
parent.fill(0, 0, 0);
}
else {
parent.fill(102, 102, 102);
}
parent.rect(sliderPosition, yPosition, barHeight, barHeight);
}

/**
* @brief Gets the slider position
*
* @return The slider position in the interval [0,1] corresponding to [leftmost position, rightmost position]
*/
float getPos() {
return (sliderPosition - xPosition)/(barWidth - barHeight);
}
}
BIN -11.6 MB PrivateProcessing.zip
Binary file not shown.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -1,20 +1,20 @@
# Blender MTL File: 'demo-background.blend'
# Material Count: 2

newmtl bluefoliage
Ns 96.078431
Ka 0.000000 0.000000 0.000000
Kd 0.250820 0.640000 0.301900
Ks 0.500000 0.500000 0.500000
Ni 1.000000
d 1.000000
illum 2

newmtl trunk
Ns 96.078431
Ka 0.000000 0.000000 0.000000
Kd 0.186412 0.082067 0.004712
Ks 0.500000 0.500000 0.500000
Ni 1.000000
d 1.000000
illum 2
# Blender MTL File: 'demo-background.blend'
# Material Count: 2

newmtl bluefoliage
Ns 96.078431
Ka 0.000000 0.000000 0.000000
Kd 0.250820 0.640000 0.301900
Ks 0.500000 0.500000 0.500000
Ni 1.000000
d 1.000000
illum 2

newmtl trunk
Ns 96.078431
Ka 0.000000 0.000000 0.000000
Kd 0.186412 0.082067 0.004712
Ks 0.500000 0.500000 0.500000
Ni 1.000000
d 1.000000
illum 2
@@ -1,153 +1,153 @@
# Blender v2.69 (sub 0) OBJ File: 'demo-background.blend'
# www.blender.org
mtllib simpleTree.mtl
o Cube.002
v -0.129275 1.469542 -0.655261
v -0.253670 1.469542 -0.617527
v 0.000089 0.561771 -0.668002
v 0.000089 1.887988 -0.004894
v 0.129455 0.561771 -0.655261
v -0.368313 1.469542 -0.556249
v 0.253851 0.561771 -0.617526
v -0.468798 1.469542 -0.473782
v 0.368494 0.561771 -0.556249
v -0.551264 1.469542 -0.373298
v 0.468979 0.561771 -0.473782
v -0.612541 1.469542 -0.258655
v 0.551445 0.561771 -0.373298
v -0.650276 1.469542 -0.134261
v 0.612722 0.561771 -0.258654
v -0.663018 1.469542 -0.004895
v 0.650457 0.561771 -0.134260
v -0.650276 1.469542 0.124472
v 0.663198 0.561771 -0.004894
v -0.612543 1.469542 0.248866
v 0.650457 0.561771 0.124472
v -0.551264 1.469542 0.363509
v 0.612722 0.561771 0.248866
v -0.468800 1.469542 0.463994
v 0.551445 0.561771 0.363509
v -0.368313 1.469542 0.546460
v 0.468979 0.561771 0.463995
v -0.253672 1.469542 0.607739
v 0.368494 0.561771 0.546460
v -0.129277 1.469542 0.645473
v 0.253851 0.561771 0.607739
v 0.000089 1.469542 0.658215
v 0.129455 0.561771 0.645473
v 0.129455 1.469542 0.645473
v 0.000089 0.561771 0.658215
v 0.253851 1.469542 0.607739
v -0.129277 0.561771 0.645473
v 0.368494 1.469542 0.546460
v -0.253672 0.561771 0.607739
v 0.468979 1.469542 0.463995
v -0.368313 0.561771 0.546460
v 0.551445 1.469542 0.363509
v -0.468800 0.561771 0.463994
v 0.612722 1.469542 0.248866
v -0.551264 0.561771 0.363509
v 0.650457 1.469542 0.124472
v -0.612543 0.561771 0.248866
v 0.663198 1.469542 -0.004894
v -0.650276 0.561771 0.124472
v 0.650457 1.469542 -0.134260
v -0.663018 0.561771 -0.004895
v 0.612722 1.469542 -0.258654
v -0.650276 0.561771 -0.134261
v 0.551445 1.469542 -0.373298
v -0.612541 0.561771 -0.258655
v 0.468979 1.469542 -0.473782
v -0.551264 0.561771 -0.373298
v 0.368494 1.469542 -0.556249
v -0.468798 0.561771 -0.473782
v 0.253851 1.469542 -0.617526
v -0.368313 0.561771 -0.556249
v 0.129455 1.469542 -0.655261
v -0.253670 0.561771 -0.617527
v 0.000089 2.795758 -0.004894
v -0.129275 0.561771 -0.655261
v 0.000089 1.469542 -0.668002
v -0.174904 0.003728 0.220087
v -0.174904 0.003728 -0.164368
v 0.209551 0.003728 -0.164368
v 0.209551 0.003728 0.220087
v -0.174904 1.029568 0.220087
v -0.174904 1.029568 -0.164368
v 0.209551 1.029568 -0.164368
v 0.209551 1.029568 0.220087
usemtl trunk
s off
f 71 72 68 67
f 72 73 69 68
f 73 74 70 69
f 74 71 67 70
f 67 68 69 70
f 74 73 72 71
usemtl bluefoliage
f 66 62 60 58 56 54 52 50 48 46 44 42 40 38 36 34 32 30 28 26 24 22 20 18 16 14 12 10 8 6 2 1
f 62 64 60
f 35 4 37
f 37 4 39
f 39 4 41
f 41 4 43
f 43 4 45
f 45 4 47
f 47 4 49
f 49 4 51
f 51 4 53
f 53 4 55
f 55 4 57
f 57 4 59
f 59 4 61
f 61 4 63
f 3 4 5
f 63 4 65
f 33 4 35
f 1 64 66
f 60 64 58
f 31 4 33
f 58 64 56
f 56 64 54
f 29 4 31
f 54 64 52
f 52 64 50
f 27 4 29
f 50 64 48
f 48 64 46
f 25 4 27
f 46 64 44
f 44 64 42
f 23 4 25
f 42 64 40
f 40 64 38
f 21 4 23
f 38 64 36
f 36 64 34
f 19 4 21
f 34 64 32
f 32 64 30
f 17 4 19
f 30 64 28
f 28 64 26
f 15 4 17
f 26 64 24
f 24 64 22
f 13 4 15
f 22 64 20
f 20 64 18
f 11 4 13
f 18 64 16
f 16 64 14
f 9 4 11
f 14 64 12
f 12 64 10
f 7 4 9
f 10 64 8
f 8 64 6
f 6 64 2
f 66 64 62
f 2 64 1
f 65 4 3
f 5 4 7
f 3 5 7 9 11 13 15 17 19 21 23 25 27 29 31 33 35 37 39 41 43 45 47 49 51 53 55 57 59 61 63 65
# Blender v2.69 (sub 0) OBJ File: 'demo-background.blend'
# www.blender.org
mtllib simpleTree.mtl
o Cube.002
v -0.129275 1.469542 -0.655261
v -0.253670 1.469542 -0.617527
v 0.000089 0.561771 -0.668002
v 0.000089 1.887988 -0.004894
v 0.129455 0.561771 -0.655261
v -0.368313 1.469542 -0.556249
v 0.253851 0.561771 -0.617526
v -0.468798 1.469542 -0.473782
v 0.368494 0.561771 -0.556249
v -0.551264 1.469542 -0.373298
v 0.468979 0.561771 -0.473782
v -0.612541 1.469542 -0.258655
v 0.551445 0.561771 -0.373298
v -0.650276 1.469542 -0.134261
v 0.612722 0.561771 -0.258654
v -0.663018 1.469542 -0.004895
v 0.650457 0.561771 -0.134260
v -0.650276 1.469542 0.124472
v 0.663198 0.561771 -0.004894
v -0.612543 1.469542 0.248866
v 0.650457 0.561771 0.124472
v -0.551264 1.469542 0.363509
v 0.612722 0.561771 0.248866
v -0.468800 1.469542 0.463994
v 0.551445 0.561771 0.363509
v -0.368313 1.469542 0.546460
v 0.468979 0.561771 0.463995
v -0.253672 1.469542 0.607739
v 0.368494 0.561771 0.546460
v -0.129277 1.469542 0.645473
v 0.253851 0.561771 0.607739
v 0.000089 1.469542 0.658215
v 0.129455 0.561771 0.645473
v 0.129455 1.469542 0.645473
v 0.000089 0.561771 0.658215
v 0.253851 1.469542 0.607739
v -0.129277 0.561771 0.645473
v 0.368494 1.469542 0.546460
v -0.253672 0.561771 0.607739
v 0.468979 1.469542 0.463995
v -0.368313 0.561771 0.546460
v 0.551445 1.469542 0.363509
v -0.468800 0.561771 0.463994
v 0.612722 1.469542 0.248866
v -0.551264 0.561771 0.363509
v 0.650457 1.469542 0.124472
v -0.612543 0.561771 0.248866
v 0.663198 1.469542 -0.004894
v -0.650276 0.561771 0.124472
v 0.650457 1.469542 -0.134260
v -0.663018 0.561771 -0.004895
v 0.612722 1.469542 -0.258654
v -0.650276 0.561771 -0.134261
v 0.551445 1.469542 -0.373298
v -0.612541 0.561771 -0.258655
v 0.468979 1.469542 -0.473782
v -0.551264 0.561771 -0.373298
v 0.368494 1.469542 -0.556249
v -0.468798 0.561771 -0.473782
v 0.253851 1.469542 -0.617526
v -0.368313 0.561771 -0.556249
v 0.129455 1.469542 -0.655261
v -0.253670 0.561771 -0.617527
v 0.000089 2.795758 -0.004894
v -0.129275 0.561771 -0.655261
v 0.000089 1.469542 -0.668002
v -0.174904 0.003728 0.220087
v -0.174904 0.003728 -0.164368
v 0.209551 0.003728 -0.164368
v 0.209551 0.003728 0.220087
v -0.174904 1.029568 0.220087
v -0.174904 1.029568 -0.164368
v 0.209551 1.029568 -0.164368
v 0.209551 1.029568 0.220087
usemtl trunk
s off
f 71 72 68 67
f 72 73 69 68
f 73 74 70 69
f 74 71 67 70
f 67 68 69 70
f 74 73 72 71
usemtl bluefoliage
f 66 62 60 58 56 54 52 50 48 46 44 42 40 38 36 34 32 30 28 26 24 22 20 18 16 14 12 10 8 6 2 1
f 62 64 60
f 35 4 37
f 37 4 39
f 39 4 41
f 41 4 43
f 43 4 45
f 45 4 47
f 47 4 49
f 49 4 51
f 51 4 53
f 53 4 55
f 55 4 57
f 57 4 59
f 59 4 61
f 61 4 63
f 3 4 5
f 63 4 65
f 33 4 35
f 1 64 66
f 60 64 58
f 31 4 33
f 58 64 56
f 56 64 54
f 29 4 31
f 54 64 52
f 52 64 50
f 27 4 29
f 50 64 48
f 48 64 46
f 25 4 27
f 46 64 44
f 44 64 42
f 23 4 25
f 42 64 40
f 40 64 38
f 21 4 23
f 38 64 36
f 36 64 34
f 19 4 21
f 34 64 32
f 32 64 30
f 17 4 19
f 30 64 28
f 28 64 26
f 15 4 17
f 26 64 24
f 24 64 22
f 13 4 15
f 22 64 20
f 20 64 18
f 11 4 13
f 18 64 16
f 16 64 14
f 9 4 11
f 14 64 12
f 12 64 10
f 7 4 9
f 10 64 8
f 8 64 6
f 6 64 2
f 66 64 62
f 2 64 1
f 65 4 3
f 5 4 7
f 3 5 7 9 11 13 15 17 19 21 23 25 27 29 31 33 35 37 39 41 43 45 47 49 51 53 55 57 59 61 63 65
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -1,2 +1 @@
# firstRepo
Visual Computing
Hello :D