Comments (8)
What's the advantage of using #define WIN32_LEAN_AND_MEAN
? According to https://learn.microsoft.com/en-us/windows/win32/winprog/using-the-windows-headers:
Define WIN32_LEAN_AND_MEAN to exclude APIs such as Cryptography, DDE, RPC, Shell, and Windows Sockets.
So it makes sense that some included headers would then be missing.
from apriltag.
Excluding rarely used headers reduces namespace pollution and improves build time. If one want to use it this library should not stand in the way if possible. Instead of including a very general header it should include exactly what it needs.
Here is the link to the fix that we use: modriplanetdoo@45a0a70
from apriltag.
With the diff I better understand what you aim for. I initially understood that you want to use the windows.h
header with #define WIN32_LEAN_AND_MEAN
and then additionally add the winsock.h
header, which would be counterintuitive in my view. Feel free to send a PR with this patch. Also add the required compile flags to the CI in order to make sure that this will not break in future.
Is timeval
only directly defined in winsock.h
? Is there no specific "time" header that includes this struct?
from apriltag.
As specified in documentation timeval
is defined in winsock.h
. It it also recommended to use Winsock2.h
which is recommended version of this header.
https://learn.microsoft.com/en-us/windows/win32/api/winsock/ns-winsock-timeval
Header winsock.h (include Winsock2.h)
I am not aware of any other time-related header.
from apriltag.
Why is struct timeval
(still) used at all might be the question... instead of a plain, standard C or C++ way of dealing with "time"?
from apriltag.
Why is
struct timeval
(still) used at all might be the question... instead of a plain, standard C or C++ way of dealing with "time"?
Do you know of a standard C way of dealing with time at microsecond resolution?
from apriltag.
A quick pointer could be "https://stackoverflow.com/a/67731965" (https://stackoverflow.com/questions/5833094/get-a-timestamp-in-c-in-microseconds/67731965#67731965).
Haven't grepped AprilTag for where timeval
is used... why is a timestamp needed to process AprilTags ;-) ?
from apriltag.
A quick pointer could be "https://stackoverflow.com/a/67731965" (https://stackoverflow.com/questions/5833094/get-a-timestamp-in-c-in-microseconds/67731965#67731965).
The response you linked recommends not using timespec_get
. So in the end, you are left with the native APIs. The question and the answer are using the POSIX function gettimeofday
which is also the one used here.
Haven't grepped AprilTag for where
timeval
is used... why is a timestamp needed to process AprilTags ;-) ?
The time is used for profiling.
from apriltag.
Related Issues (20)
- Help with thresholding parameters HOT 1
- How to run pose estimation in python ? HOT 3
- Anyone implmented c# wrapper for this? HOT 1
- error when i run make in ubuntu 22.04 HOT 1
- Has anyone confirmed that this library can work on ESP32S3? HOT 3
- How to use intrinsics in Scaramuzza format to estimate the apriltag pose? HOT 3
- Suggestions on improving detections in low light conditions HOT 4
- Python bindings for apriltag_detect throws error when no detection is found HOT 5
- What's the meaning of 'apriltag.c:448: homography_compute2: Assertion `max_val_idx >= 0' failed.'? HOT 5
- Planned Python Package Index (PyPI) package? HOT 4
- Build fail on Ubuntu Noble in g2d.c: `last_quadrant` is used unitialized; treat-all-warnings-as-errors HOT 4
- How to detect AprilGrid? HOT 5
- (Python) 'Nthreads' is an invalid keyword argument for this function HOT 1
- Question: Use more than 4 points for pose computation HOT 3
- corner location has always 0.125 pixel error
- ReadMe File Error HOT 2
- Question: How to process moving frames? HOT 5
- from apriltag import apriltag no module HOT 2
- quick_decode struct allocates 6Gb memory for standard52h13 family HOT 3
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 apriltag.