Comments (5)
It looks like the function atan2 returns values expressed in radians which would need to be a double or a float, though we could convert those values to degrees before storing them. I'm leaning towards using option 3 since it saves space using an unsigned char but still allows us to have the degrees stored as meaningful values. The only drawback I can see to this approach is that you are unable to store degrees above 255, but I don't know that a Sobel filter would ever require a direction greater than 180 degrees anyway.
from canny-opencl.
I was trying to add us both as assignees, but it doesn't look lil it will let two people be assigned.
from canny-opencl.
I suppose the other downside of using unsigned char is that we would need to typecast it as an int in order to use it as a number value. I suppose this is a trade off of space versus compute time, though I don't know how much compute effort is required to typecast something.
from canny-opencl.
Yeah, it appears as though Github only allows one person to be assigned to an issue.
That's a good point about atan2
returning radians, since it would then make no sense to store degrees in a float
.
On the note of typecasting, I could be mistaken, but I have always assumed they are a compile time operation, so really no compute is required. Additionally, uchar
and int
should play nicely together without explicit casting. I guess technically adding a uchar
and an int
might cause one register to be zeroed before storing the uchar
, but that's negligible and up to the compiler.
This discussion has so far sold me on option 3 as being a good choice. I would be interested in seeing what the performance difference between a floating point radian representation and a unsigned char degree representation, whether there is a noticeable difference or not.
I have unassigned myself from this issue. I was planning on doing it, but it doesn't matter with me. If someone else would like to do it, feel free to assign yourself. If not, I'll take care of it when I have a chance.
from canny-opencl.
I've been working on it today and I think I have it almost ready to test.
from canny-opencl.
Related Issues (16)
- Sobel kernel is storing angle incorrectly
- Sobel kernel uses poor naming conventions
- atan vs atan2 HOT 2
- Benchmark should do component-wise analysis as well.
- Benchmark should be expanded to compare against other solutions. HOT 1
- Add Non-maximum Suppression.
- Benchmark results should be logged. HOT 1
- Cpu vs Gpu Kernels
- Derivatives
- Speed comparison with OpenCV HOT 2
- Linux version of this Project HOT 1
- Move source files to src directory.
- License / copyright
- Benchmarking should include multiple images of varying sizes.
- Image Processor sometimes uses integrated GPU when discrete is available. HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from canny-opencl.