Git Product home page Git Product logo

libneodencam's Introduction

libneodencam

Driver for Neoden 4 old generation cameras with VID=0x0828,PID=0x1002, implementing the API of NeodenCamera.dll for compatibility with the corresponding OpenPNP Java class. Uses libusb; protocol copied from ripe909/NeodenCamera64.

Tested on Linux. Might or might not compile on Windows, probably depending on the availability and compatibility of libusb on that plattform.

Note: This is not a v4l driver. It still needs the special Neoden4Camera driver class in OpenPNP. Turning this code into a v4l driver might be an interesting project – anyone...? ;P

Build & Install

mkdir build
cd build
cmake ..
make
sudo make install

Testing

Requires golang. First build the shared library. It will be placed in ./build. Then run the following command. It will take a photo with each connected camera and save it to cwd.

go run main.go

FOLLOWING SECTION MASSIVELY WIP!


Neoden 4 OpenPNP Linux How-to

1. Hardware & OS

  1. Image the built-in SSD using clonezilla from a bootable USB – in case you mess up and want to revert back. Remove the SSD and put it in a safe place
  2. Install a bigger (>=16GB) mSATA SSD. Available on eBay for < 10€. You could get away with the built-in 8GB SSD by using a very slim Linux distro
  3. While you're at it, upgrade the machine from its 2GB to 4GB RAM (single SO-DIMM DDR3 module)
  4. Install a (lightweight) Linux distro of your choice. I used Lubuntu 23.10, but something even more lightweight wouldn't hurt.

2. Software

  1. Install the following packages:
    • gcc
    • cmake
    • make
    • pkg-config
    • git
    • libusb-1.0
  2. Check out this repository, build and install the camera driver according to the instructions above
  3. Install OpenJDK v8. Serial communication between OpenPNP and the Neoden controller board did not work for me on Java v11
  4. Use my fork of OpenPNP as long as the corresponding PR hasn't been merged.

3. Configuration

This is rather complex. The OpenPNP Wiki recommends to configure a machine by following the Issues and Solutions Wizard.

Serial Port

On the stock mainboard, the machine interface is connected to /dev/ttyS1 and talks at 115200 baud. Your user account must be granted access to the serial ports. In Lubuntu, this is done by adding your account to the dialout group (sudo usermod -a -G dialout USERNAME).

Cameras

Make sure there are no other USB devices on the same bus to which the cameras are connected. You can use lsusb to figure that out. A Wifi adapter connected to one of the side ports caused torn/broken images on my machine.

In order to use both cameras, you need to add a Neoden4Camera and then two Neoden4SwitcherCamera instances, one for the head and one for the bottom camera. They both reference the Neoden4Camera instance in their config and each have an individual ID, configured under Switcher Number in Driver Settings.

  • Camera IDs: 0 and 1 (contrary to 1 and 5 in the Windows driver)
  • Resolution: 1024x1024
  • Exposure and Gain: Start with values around 20 – then adjust from there

libneodencam's People

Contributors

jsphpl avatar

Watchers

 avatar

libneodencam's Issues

Identify up/down cameras and assign fixed IDs

Currently, cameras are assigned IDs based on the order in which they appear in libusb's device list. This is likely not deterministic. Will need to take a look at the NeodenCamera.dll sources to check how up/down can be identified.

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.