Comments (2)
It would be nice if you provide sample list, which reproduces the issue (you
can attach it as a code file). "slightly less than 2E9" is a bit vague. Also
you don't tell anything about the number of points.
Original comment by [email protected]
on 2 Oct 2014 at 7:06
from aforge.
1) Provide list with 4 or more x,y list points where all values are 2E9 - 1.
2) Try: 2,000,000,000. - 1.
Given that, we've found issues with values much more reduced...
We're not presently dedicated to this issue-- just trying to help you.
We've found success & failures with values @ (.5 * Int32.MaxValue).
We're in the field running real field data and not purposed @ debugging your
code.
3) The number of points is ~believed not critical, but obviously you need to
get into the process... ie, >3.
-------
Somewhat irritated by the tongue lash,
spending a few hours after our immediate above,
we believe we've found the problem:
1)
Within AForge's 2.2.5.0 AForge.Math.DLL @ method "public List<IntPoint>
FindHull(List<IntPoint> points)", the following source line appears to be the
issue:
"if ((newPoint.X - prevPoint.X) * (lastPoint.Y - newPoint.Y) - (lastPoint.X -
newPoint.X) * (newPoint.Y - prevPoint.Y) < 0)".
2)This line, when loaded as previously described (ie, large Int32 magnitudes),
May throw exception:
"...'System.ArgumentOutOfRangeException' occurred in MSCORLIB.DLL".
3) Further investigation shows possibility of ~ (8 * Int32.MaxValue^2).
4) Solution, we ~think: Change the subject line so as to process LONG values;
ex:
//-------------------------------------------------
// check if current point is on the left side from two last points
//test:
long sub1 = newPoint.X - prevPoint.X;
long sub2 = lastPoint.Y - newPoint.Y;
long sub3 = lastPoint.X - newPoint.X;
long sub4 = newPoint.Y - prevPoint.Y;
long mult1 = sub1 * sub2;
long mult2 = sub3 * sub4;
long diff = mult1 - mult2;
if (diff < 0)
//if ((newPoint.X - prevPoint.X) * (lastPoint.Y - newPoint.Y) - (lastPoint.X - newPoint.X) * (newPoint.Y - prevPoint.Y) < 0)
{
// add the point to the hull
convexHullTemp.Add(newPoint);
// and remove it from the list of points to process
pointsToProcess.RemoveAt(0);
prevPoint = lastPoint;
lastPoint = newPoint;
}
else
{
// remove the last point from the hull
convexHullTemp.RemoveAt(convexHullTemp.Count - 1);
lastPoint = prevPoint;
prevPoint = convexHullTemp[convexHullTemp.Count - 2];
}
//-------------------------------------------------
That's our 2cents, Vaguely.
:-)
If you desire converse, please eme directly at "[email protected]" .
We're working in the gulf & google connect not regularly available.
Bests, RJF.
Original comment by [email protected]
on 2 Oct 2014 at 9:18
from aforge.
Related Issues (20)
- GetPinCapabilitiesAndConfigureSizeAndRate() does not release streamConfig HOT 1
- problems with 3 cameras HOT 2
- NewFrame event doesn't fire after stop and start again in Windows service HOT 4
- ignoring 12bit Videoformat fails ... obviously a typo <= instead of >= HOT 1
- ProcessImage support for 32bpp
- GC.KeepAlive for UnmanagedImages HOT 2
- Subtraction of double with Complex has wrong output HOT 1
- Access Violation in Clone() for ROI subimage aligned with bottom of original image
- Keep Aspect Ratio HOT 1
- Add Deep Reinforcement Learning to MachineLearning namespace
- Export to GitHub HOT 4
- Missnig packages on NuGet HOT 1
- Patch for memory leak in Video.FFMPEG's VideoFileWriter::Close() HOT 1
- Optional standard gradient calculation in Sobel filter
- getting timestamp with avireader method
- AForge.Net VideoCaptureDevice.VideoCapabilities doesn't work.
- Convolution filter with threshold doubles frequency of 'zero' values
- "ApplyMask" and "MaskedFilter" filters doesn't work correctlly HOT 6
- POSIT does not properly offset Z axis.
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 aforge.