Skip to content

Ch 24 - Add edge detection section #177

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 84 commits into from
Aug 20, 2019
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
84 commits
Select commit Hold shift + click to select a range
1bbfb8a
Start converting prototype to react
jasmaa May 27, 2019
1e49a41
Finish convolution demo
jasmaa May 29, 2019
b75bd59
Improve UI, refactor code
jasmaa May 30, 2019
cbe0ee4
Add sobel image processing demo
jasmaa Jun 3, 2019
b048f1a
Improve sobel ui
jasmaa Jun 4, 2019
87778c9
Add gradient initial explanations
jasmaa Jun 4, 2019
3d99a57
Swap in image processing funcs in convolution demo, improve doc
jasmaa Jun 5, 2019
2c6de14
Fix grid input bug, generalize grid input ui
jasmaa Jun 6, 2019
cf7e77e
Start gradient demo
jasmaa Jun 6, 2019
2d963a9
Fix and improve gradient demo
jasmaa Jun 8, 2019
02d8d4c
Add topology demo
jasmaa Jun 11, 2019
967190a
Try to improve mobile support
jasmaa Jun 12, 2019
383756a
Make convolution demo more clear, replace max spread with reduce
jasmaa Jun 13, 2019
2a9a53c
Style changes, fix gradient drawing
jasmaa Jun 13, 2019
32901c3
Start suppression demo
jasmaa Jun 17, 2019
f37d358
Start pipeline demo
jasmaa Jun 19, 2019
5dda712
Add image uplaod and indicator to pipeline demo
jasmaa Jun 20, 2019
6c06ab1
Add movement control, refactor code
jasmaa Jun 20, 2019
21ce7db
UI and documentation improvements
jasmaa Jun 24, 2019
eaaec72
Start moving over explanations
jasmaa Jun 25, 2019
5f910f3
Replace third party media, fix grid input update bug
jasmaa Jun 27, 2019
b95f853
Implement remaining edge detection processes
jasmaa Jun 27, 2019
de86cc2
Tweaking explanations and reworking on convolution demo
jasmaa Jul 2, 2019
0898a19
Fix image processing bugs
jasmaa Jul 2, 2019
fbc3292
Start reworking gradient demo
jasmaa Jul 2, 2019
7e1c619
Add control UI to gradient demo
jasmaa Jul 3, 2019
c8771d9
Start replacing 3dcss with threejs in pipeline demo
jasmaa Jul 5, 2019
33f6eb0
Fix material update bug
jasmaa Jul 5, 2019
359aa9b
Re-implement pipeline demo with three
jasmaa Jul 8, 2019
3fc7e5d
Improve pipeline demo code and docs
jasmaa Jul 10, 2019
e0bd01f
Rework suppression demo
jasmaa Jul 11, 2019
c6d5b9b
Minor bug fixes, improve suppression demo
jasmaa Jul 12, 2019
fabb2e3
Add threshold section
jasmaa Jul 12, 2019
dc719d5
Add hysteresis and canny sections
jasmaa Jul 15, 2019
4512f83
Split into multiple pages, modify header injection
jasmaa Jul 17, 2019
ed46d47
Reworking convolution demo
jasmaa Jul 17, 2019
323575c
Reworking convolution topology demos
jasmaa Jul 18, 2019
4ee7950
Testing sticky footer, add breadcrumbs in injection
jasmaa Jul 19, 2019
fb296a1
Rewrite explanations
jasmaa Jul 19, 2019
a087da8
Rebuild vis with gray colorscale for surface
jasmaa Jul 19, 2019
d0f0d5b
Add opacity and boldness changes for gradient vectors
jasmaa Jul 22, 2019
72f2afd
Combine pillar and ramp diagrams in convolution demo
jasmaa Jul 22, 2019
f6637ca
Add out of bounds for convolution demo
jasmaa Jul 23, 2019
92fdba4
Extend 2d pipeline demo
jasmaa Jul 23, 2019
61fa32c
Add RGB demo
jasmaa Jul 24, 2019
05f512b
Add grayscale demo, improve readability
jasmaa Jul 25, 2019
043e9c6
Minor UI changes
jasmaa Jul 26, 2019
bcf1485
Start adding webcam
jasmaa Jul 29, 2019
cd02bb9
Clean up pipeline code and add webcam
jasmaa Jul 29, 2019
dbc1d57
Add pattern selection for sobel pipeline
jasmaa Jul 29, 2019
12dd2a1
Improving webcam performance
jasmaa Jul 29, 2019
7e5c286
Add pixel magnifier, fix image upload bug
jasmaa Jul 30, 2019
c570993
Change sobel colorscale to red-green
jasmaa Jul 31, 2019
5bc5fe1
Rehaul text for robust edge detection
jasmaa Jul 31, 2019
2aa9265
Improving mobile support
jasmaa Aug 1, 2019
dd020cf
Minor changes to suppression demo
jasmaa Aug 2, 2019
4170a2f
Separate magnifier component
jasmaa Aug 5, 2019
9a00aa4
Disable nav to section 3, pipeline improvements
jasmaa Aug 5, 2019
be66ec4
Modularize and lazy load demos
jasmaa Aug 5, 2019
ca07880
Minor changes to webcam
jasmaa Aug 6, 2019
217de34
Start condensing convolution demo
jasmaa Aug 6, 2019
88b8bc7
Minor improvements to convolution magnifier, add loading fallback
jasmaa Aug 7, 2019
bf1b0e8
Reorganize text and add noise demo
jasmaa Aug 7, 2019
899d920
Add default image reset, minor ui changes
jasmaa Aug 9, 2019
e2033f2
Try remove modules for mobile
jasmaa Aug 10, 2019
b9205aa
Fixing touch and sizing for mobile
jasmaa Aug 12, 2019
7cacfb1
Convert grids to canvas
jasmaa Aug 12, 2019
16bf6f7
Fixing mobile bugs
jasmaa Aug 12, 2019
4002101
Fixing touch scrolling bug
jasmaa Aug 12, 2019
337c19b
Fixing mobile rendering bug
jasmaa Aug 12, 2019
05cf27f
Minor ui changes
jasmaa Aug 13, 2019
0d1afdc
Improve convolution demo
jasmaa Aug 13, 2019
c7c63ee
Fix css on topology demo
jasmaa Aug 14, 2019
f9049ea
Replace RGB demo
jasmaa Aug 14, 2019
6197016
Add blurbs, rewrite grayscale func and rgb section
jasmaa Aug 14, 2019
e5ca541
Minor style changes
jasmaa Aug 15, 2019
b47dfd1
Remove unused code and assets
jasmaa Aug 16, 2019
4afd532
Merge edge detection to one page
jasmaa Aug 17, 2019
795be97
Merge filters in convolution demo
jasmaa Aug 17, 2019
9a9bec9
Add collapsable section, clean up text
jasmaa Aug 18, 2019
20673d4
Fix for mobile
jasmaa Aug 18, 2019
2343490
Make requested changes
jasmaa Aug 20, 2019
57c5136
Revert global changes
jasmaa Aug 20, 2019
8fcc95f
Fix diff problems
jasmaa Aug 20, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix css on topology demo
  • Loading branch information
jasmaa committed Aug 14, 2019
commit c7c63ee63d4669462d564ee9650038f0c024441c
2 changes: 1 addition & 1 deletion 24-Perception/Edge-Detection/js/demos/ConvolutionDemo.js
Original file line number Diff line number Diff line change
Expand Up @@ -516,7 +516,7 @@ class ConvolutionMagnifier extends React.Component {

this.setState({
cursorX: cursorX,
cursorY: cursorY - magnifier.getBoundingClientRect().height,
cursorY: cursorY - 0.8*magnifier.getBoundingClientRect().height,
magnifyVisible: true,
});
}
Expand Down
26 changes: 16 additions & 10 deletions 24-Perception/Edge-Detection/js/demos/TopologyDemo.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ class TopologyDemo extends React.Component {
}

resize() {
/*
if (innerWidth > 800) {
this.canvas.style.width = (innerWidth / 4 - 80) + 'px';
this.graphContainer.childNodes[0].style.width = (innerWidth / 4 - 80) + 'px';
Expand All @@ -32,6 +33,7 @@ class TopologyDemo extends React.Component {
this.graphContainer.childNodes[0].style.width = (innerWidth / 2) + 'px';
this.graphContainer.childNodes[0].style.height = (innerWidth / 2) + 'px';
}
*/
}

/**
Expand Down Expand Up @@ -61,15 +63,14 @@ class TopologyDemo extends React.Component {
for (let j = 0; j < source.width; j++) {
if (i % this.graphInterval == 0 && j % this.graphInterval == 0) {
let value = source.getValue(i, j);
topoData.push({ x: j, y: -i, z: value, style: `rgb(${value}, ${value}, ${value})`});
topoData.push({ x: j, y: -i, z: value, style: `rgb(${value}, ${value}, ${value})` });
}
}
}

// Draw topology map
let options = {
width: `${this.size}px`,
height: `${this.size}px`,
width: '100%',
style: 'surface',
xBarWidth: this.graphInterval,
yBarWidth: this.graphInterval,
Expand All @@ -86,8 +87,8 @@ class TopologyDemo extends React.Component {
};

this.graphContainer = document.getElementById(`${this.imageId}-topology`);
let graph = new vis.Graph3d(this.graphContainer, topoData, options);
graph.setCameraPosition({ horizontal: 0, vertical: Math.PI / 2, distance: 1.3 });
this.graph = new vis.Graph3d(this.graphContainer, topoData, options);
this.graph.setCameraPosition({ horizontal: 0, vertical: Math.PI / 2, distance: 2 });

this.resize();
}
Expand All @@ -100,17 +101,22 @@ class TopologyDemo extends React.Component {
defaultImage: '../images/test.png',
processHandler: () => this.process(),
}, null),
e('br', null, null),
e('div', { className: 'flex-container' },
e('div', null,
e('canvas', {
id: `${this.imageId}-canvas`,
width: this.size,
height: this.size,
className: 'center',
style: {
width: '50%',
}
}, null),
e('div', {
id: `${this.imageId}-topology`,
}, null)
),
e('br', null, null),
e('div', {
id: `${this.imageId}-topology`,
}, null)

);
}
}