Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Design and Architecture
  4. Better language for complex GUI and input/output devices?

Better language for complex GUI and input/output devices?

Scheduled Pinned Locked Moved Design and Architecture
javaquestionloungepythonhtml
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    ai_mc
    wrote on last edited by
    #1

    Hello. First, let me introduce myself: I am a Java (6 years exp), Python(2 years exp), and C (2 years exp) developer. This thread is both a question for all programmers (feel free to reply!) and a little bit informative for some :) So, I have been working on a relatively complex system (link[^]) that does the following: a- (OpenCV) reads frame by frame and detect motion, from a webcam b- reads from a second webcam without processing, just to watch c- controls a parallel port or usb device d- generates custom simple sounds e- logs everything described here. f- has a Graphic User Interface to control all of the above parameters. So 2 webcams, audio out, usb device, and graphic user interface, is in short what this system has. I've done this in python and it took me some 10k lines of code and weeks/months of time. So far works with some random errors, and a below-decent (in my opinion) interface. I wanted to ask this community if Java might be a better language at accomplishing this task, which is my hypothesis, but would like a second opinion or your general opinion about this: 1- OpenCV 2- Generating audio 3- Controlling a USB device 4- multithreading 5- GUI ------- I don't want to bias your opinion, but so far here is what i currently believe based on my work and exp programming on both languages: 1- OpenCV: Probably the same in both languages. Maybe Java is easier/more mature but IDK 2- Audio: Probably the same (someone might have done an audio class before) 3- Low level peripherals: I don't know. Probably Java has a disadvantage here? 4- Java's multithreading and multiprocessing seems to be far superior. Here's why: . When you launch threads in Java, the JVM will allocate it on a free processor if available. If you have 8 processors and you launch 8 threads, ideally it will allocate one in each. . While in Python , multithreading will use the same process for all threads. I managed to work around this by using multiprocessing [^] and what i gained was to make use of quad core and some better stability (OpenCV would complain with TKinter running at

    P 1 Reply Last reply
    0
    • A ai_mc

      Hello. First, let me introduce myself: I am a Java (6 years exp), Python(2 years exp), and C (2 years exp) developer. This thread is both a question for all programmers (feel free to reply!) and a little bit informative for some :) So, I have been working on a relatively complex system (link[^]) that does the following: a- (OpenCV) reads frame by frame and detect motion, from a webcam b- reads from a second webcam without processing, just to watch c- controls a parallel port or usb device d- generates custom simple sounds e- logs everything described here. f- has a Graphic User Interface to control all of the above parameters. So 2 webcams, audio out, usb device, and graphic user interface, is in short what this system has. I've done this in python and it took me some 10k lines of code and weeks/months of time. So far works with some random errors, and a below-decent (in my opinion) interface. I wanted to ask this community if Java might be a better language at accomplishing this task, which is my hypothesis, but would like a second opinion or your general opinion about this: 1- OpenCV 2- Generating audio 3- Controlling a USB device 4- multithreading 5- GUI ------- I don't want to bias your opinion, but so far here is what i currently believe based on my work and exp programming on both languages: 1- OpenCV: Probably the same in both languages. Maybe Java is easier/more mature but IDK 2- Audio: Probably the same (someone might have done an audio class before) 3- Low level peripherals: I don't know. Probably Java has a disadvantage here? 4- Java's multithreading and multiprocessing seems to be far superior. Here's why: . When you launch threads in Java, the JVM will allocate it on a free processor if available. If you have 8 processors and you launch 8 threads, ideally it will allocate one in each. . While in Python , multithreading will use the same process for all threads. I managed to work around this by using multiprocessing [^] and what i gained was to make use of quad core and some better stability (OpenCV would complain with TKinter running at

      P Offline
      P Offline
      Pete OHanlon
      wrote on last edited by
      #2

      For a desktop based UI, I would use C# and WPF. You can drop to low level code with it if you need to. It plays well with things like OpenCV and it is a powerful way to build custom UIs. The downside is that it's complex to learn.

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups