3 Replies - 1565 Views - Last Post: 22 December 2004 - 10:39 PM Rate Topic: -----

#1 themarshter   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 1
  • Joined: 12-December 04

Receiving C++ Output Into Java In Realtime

Posted 12 December 2004 - 03:26 AM

I have a tracking system, written in C++, that uses a webcam to pickout one block of colour from its view and store the coordinates of the found point in an array.

I now have to write a Java gui to display these points as they are found, or at least receive the points in some form (maybe an input stream of values) which I can then process with the Java program.

I have read some things about piping the stdout from the C++ file to the Java program but not sure how this is actually done.

Any advice or ideas would be greatly appreciated, Ian

Is This A Good Question/Topic? 0
  • +

Replies To: Receiving C++ Output Into Java In Realtime

#2 Videege   User is offline

  • rÍvant.toujours
  • member icon

Reputation: 6
  • View blog
  • Posts: 1,413
  • Joined: 25-March 03

Re: Receiving C++ Output Into Java In Realtime

Posted 12 December 2004 - 09:09 AM

An easier method (though probably a bit slower) would possibly be to output your coordinates (in the C++ bit) to a file, then read that file in your java gui?
Was This Post Helpful? 0
  • +
  • -

#3 Amadeus   User is offline

  • g+ + -o drink whiskey.cpp
  • member icon

Reputation: 250
  • View blog
  • Posts: 13,507
  • Joined: 12-July 02

Re: Receiving C++ Output Into Java In Realtime

Posted 12 December 2004 - 11:41 AM

The only problem with writing to a file is when to trigger the java app to go get the information. You could run the C++ app from the java program, and use it's finish as a trigger to get the info from the file.
Was This Post Helpful? 0
  • +
  • -

#4 dlkj   User is offline

  • D.I.C Head

Reputation: 4
  • View blog
  • Posts: 137
  • Joined: 11-March 02

Re: Receiving C++ Output Into Java In Realtime

Posted 22 December 2004 - 10:39 PM

Output from C++ is easy.. just printf or cout to screen.
From Java, capturing that is the difficult part.

If I were to do it, I guess I would write a network application.. of course, that could be overkill.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1