Click here to Skip to main content
15,886,873 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: How to best pull together data from multiple sources (hardware sensors) in Win32? Pin
CPallini24-Jun-15 2:37
mveCPallini24-Jun-15 2:37 
GeneralRe: How to best pull together data from multiple sources (hardware sensors) in Win32? Pin
MW-83121724-Jun-15 3:08
MW-83121724-Jun-15 3:08 
GeneralRe: How to best pull together data from multiple sources (hardware sensors) in Win32? Pin
CPallini24-Jun-15 3:18
mveCPallini24-Jun-15 3:18 
GeneralRe: How to best pull together data from multiple sources (hardware sensors) in Win32? Pin
Albert Holguin24-Jun-15 11:57
professionalAlbert Holguin24-Jun-15 11:57 
GeneralRe: How to best pull together data from multiple sources (hardware sensors) in Win32? Pin
CPallini24-Jun-15 12:11
mveCPallini24-Jun-15 12:11 
GeneralRe: How to best pull together data from multiple sources (hardware sensors) in Win32? Pin
Albert Holguin24-Jun-15 12:16
professionalAlbert Holguin24-Jun-15 12:16 
AnswerRe: How to best pull together data from multiple sources (hardware sensors) in Win32? Pin
Albert Holguin24-Jun-15 12:04
professionalAlbert Holguin24-Jun-15 12:04 
GeneralRe: How to best pull together data from multiple sources (hardware sensors) in Win32? Pin
MW-83121724-Jun-15 23:55
MW-83121724-Jun-15 23:55 
The idea with thread pooling sounds very interesting. I'm not sure how applicable it is though.

I should have provided a little bit more specific information. Apologies.

The other sensors communicate with the PC via Bluetooth asynchronously. Each of them sends a couple-of-bytes-long data packet. All work at rougly the same speed. The pakets arrive in random order. It's not a problem as long as all the most recent packets are received.

In terms of the Kinect, I use almost all streams except for sound and color.

The idea is that once all of the samples have arrived, including the multi-source frame from Kinect, their respective readers would fire an event. Once the WaitForMultipleObjects() function sees that all the expected events have fired, it unblocks and the data is copied into a custom frame class before being pushed onto the FIFO.

On the consumer side, the things look a little bit more interesting. I can't afford to drop any frames from the Kinect. One of the heaviest tasks that need to be carried out is to run the Kinect Fusion algorithm. It runs best on the GPU. I am not sure if this task can be parallelized on a standard PC. Fusion runs way slowlier on the CPU. Maybe it would be possible to run two instances of the Fusion, one on GPU and the other on CPU, but I don't know how much sense it would make.

Obviously, one of the bottlenecks is the throughput of the given GPU.

I'm trying to develop this program in such a way that its performance would vary depending on PCs specifications, in particular the GPU and RAM. Poorer machines would process slowly whereas better ones would give up to real-time performance. Some of the top gaming PCs can run Fusion at Kinect's fps.

From what I can see, the consumer side would seem to work out best to as a straight serial operation. Basically, it would be something like:
1. Pop frame from FIFO
2. Preprocess it (include other not time-consuming processing)
3. Pass the frame to Fusion.
4. Loop back to 1. if not complete.


I hope it's a bit clearer now what kind of an application it is and what sort of requirements it would have.

I am not an experienced professional coder Smile | :) . I just use common sense. The best structure to this program that I was able to come up with was the one described in previous posts. I don't seem to see a better way of structuring it. I greatly appreciate your input guys. I look forward to seeing more opinions, suggestions etc.


Thanks,
MW
GeneralRe: How to best pull together data from multiple sources (hardware sensors) in Win32? Pin
Albert Holguin25-Jun-15 9:24
professionalAlbert Holguin25-Jun-15 9:24 
GeneralRe: How to best pull together data from multiple sources (hardware sensors) in Win32? Pin
MW-83121726-Jun-15 3:04
MW-83121726-Jun-15 3:04 
QuestionSDI Project Question Pin
Arrin23-Jun-15 9:00
Arrin23-Jun-15 9:00 
SuggestionRe: SDI Project Question Pin
David Crow23-Jun-15 9:50
David Crow23-Jun-15 9:50 
GeneralRe: SDI Project Question Pin
Arrin23-Jun-15 12:21
Arrin23-Jun-15 12:21 
QuestionUse #define or enum in switch() case(s) ? Pin
Vaclav_22-Jun-15 5:40
Vaclav_22-Jun-15 5:40 
AnswerRe: Use #define or enum in switch() case(s) ? Pin
PIEBALDconsult22-Jun-15 5:51
mvePIEBALDconsult22-Jun-15 5:51 
AnswerRe: Use #define or enum in switch() case(s) ? Pin
Jochen Arndt22-Jun-15 6:51
professionalJochen Arndt22-Jun-15 6:51 
AnswerRe: Use #define or enum in switch() case(s) ? Pin
Albert Holguin22-Jun-15 9:49
professionalAlbert Holguin22-Jun-15 9:49 
AnswerRe: Use #define or enum in switch() case(s) ? Pin
Vaclav_22-Jun-15 15:42
Vaclav_22-Jun-15 15:42 
GeneralRe: Use #define or enum in switch() case(s) ? Pin
Frankie-C22-Jun-15 22:44
Frankie-C22-Jun-15 22:44 
GeneralRe: Use #define or enum in switch() case(s) ? Pin
Vaclav_23-Jun-15 4:44
Vaclav_23-Jun-15 4:44 
AnswerRe: Use #define or enum in switch() case(s) ? Pin
Albert Holguin24-Jun-15 12:12
professionalAlbert Holguin24-Jun-15 12:12 
GeneralRe: Use #define or enum in switch() case(s) ? Pin
Vaclav_26-Jun-15 5:25
Vaclav_26-Jun-15 5:25 
GeneralRe: Use #define or enum in switch() case(s) ? Pin
Albert Holguin26-Jun-15 10:16
professionalAlbert Holguin26-Jun-15 10:16 
GeneralJust released the latest version of my open source project... Pin
Corvusoft21-Jun-15 4:30
Corvusoft21-Jun-15 4:30 
GeneralRe: Just released the latest version of my open source project... Pin
CPallini21-Jun-15 21:37
mveCPallini21-Jun-15 21:37 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.