Giter Site home page Giter Site logo

Comments (5)

kazunarikudo avatar kazunarikudo commented on July 28, 2024

Hi Severi,

Thank you for providing us your request!

Do you mean you would like to control multiple cameras in a single Harvester GUI?

Would this also mean that you’d like to see images from those cameras in the GUI, too?

Regards,
Kazunari

from harvesters.

severij avatar severij commented on July 28, 2024

I meant multiple camera support in case of Harvester Core, but now I actually noticed that this is a duplicate of issue #11. :) So closing this.

from harvesters.

kazunarikudo avatar kazunarikudo commented on July 28, 2024

Hi Severi (@severij ),

Let me hear your opition: Which point do you see an advantage of supporting mulitple cameras within a single Harvester Core object?

Say, the current implementation maps a Harvester Core object to a single camera and it's obvisouly minimalistic and simplest (so I like this way from maintainance point of view).

Technically speaking, this way can support multiple devices just having multiple Harvester Core objects and of course, the interface is the same because you're using the same Harvester Core object.

Actually I was thinking about supporting multiple devices within a single Harvester Core object but I have changed my mind having above perspective.

Anyway, I would highly appreciate if you could tell me your point to consider if we should make it or not. In addition, it should be very helpful if you could show some lines of code that you expect to have.

Regards,
Kazunari

from harvesters.

severij avatar severij commented on July 28, 2024

I would say there is no clear advantage, except maybe being more intuitive to the user (but that might be just me). Having a harvester.device_info_list with multiple cameras makes you think that you could also connect multiple cameras with that HC object, but of course this is impossible with the current implementation.

An alternative implementation would need a separate class for Device, which could be used like

camera1 = harvester.get_device(0)  # Returns a Device object
camera2 = harvester.get_device(1)

or something like that. So the Device class would have many of the features that Harvester class currently has. Then the device objects could be used separately:

camera1.start_image_acquisition()
camera2.start_image_acquisition()

# Acquisition of images with the cameras
...

camera1.stop_image_acquisition()
camera2.stop_image_acquisition()

I think this way the process of connecting and disconnecting of the device could be made automatic, like for example connecting the device in the __init__ of the Device and disconnecting it in the __del__. If there is a separate Device class, then the role of Harvester object would be handling the cti-files and listing the available cameras.

However, I'm not sure if this is any better or more difficult from the maintenance point of view. I want to add that I'm totally happy with the current implementation of Harvester, since it works just fine. :)

Edit:
Since most of the people probably will be working with just one camera, I'm not sure if any alternative solution would be worth the effort. On the other hand the current implementation is quite simple, having just one object (Harvester).

from harvesters.

kazunarikudo avatar kazunarikudo commented on July 28, 2024

Nice :-) Okay, I've got your point and would like to take a bit more time to concider a way to implement your elegant usage. My mind had been sticking on a way to use devices within a HC object anyway and it had kept preventing to reach your idea. Thank you!

from harvesters.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.