Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mjpg camera feature #1075

Merged
merged 4 commits into from
Nov 22, 2020
Merged

Mjpg camera feature #1075

merged 4 commits into from
Nov 22, 2020

Conversation

desertgreg
Copy link
Contributor

@desertgreg desertgreg commented Nov 15, 2020

Description

This pull request adds MjpgCaptureCamera and MjpgCaptureCameraWizard to OpenPNP. This class allows you to use IP cameras which output Mjpg streams.

Justification

My pick and place machine is using an Mjpg camera for its up camera and this feature should be generally useful for anyone who wants to use one of these cameras.

Instructions for Use

In the machine configuration GUI you can add an MjpgCaptureCamera anywhere that you are able to use any other type of camera (e.g. OpenPnpCaptureCamera, OpenCvCamera, etc)
UsingMJPGCaptureCamera

There is currently only one setting which is the IP address and port number to pull the MJPG stream from:
MjpgCaptureCameraSettings

mjpg_camera2

Implementation Details

  1. I have tested the code on my pick and place machine which uses a this type of camera. I tested editing pipelines on this camera type as well as simply viewing the stream in the OpenPnP gui
  2. I used the code formatter and tried to follow the style as closely as possible.
  3. No changes to the org.openpnp.spi or org.openpnp.model packages
  4. mvn test succeeded without errors.

@vonnieda
Copy link
Member

Looks good to me! Could you mention what kind of camera it is so that others can consider the same?

@desertgreg
Copy link
Contributor Author

I am using this kind of camera. Full disclosure, this is a "smart" camera that my son and I made for robotics competitions. It has the ability to run OpenCV pipelines but right now I'm just using it as an IP camera.
https://limelightvision.io/

@vonnieda
Copy link
Member

Great, thanks @desertgreg!

@vonnieda vonnieda merged commit 02f7348 into openpnp:develop Nov 22, 2020
@desertgreg desertgreg deleted the MjpgCameraFeature branch November 22, 2020 21:13
vonnieda added a commit that referenced this pull request Dec 23, 2020
* develop:
  Added possibility to disable ContactProbeNozzle actuator temporarily. To (#1026)
  ReferenceDragFeeder works with 0402 parts with vision enabled and dis… (#1088)
  a feeder in feeder's list is grayed out if no active placement uses it. (#1068)
  Closes #1005: Replace actuator text field with combobox (#1080)
  Feature / Global Axes and Framework for Enhanced Motion Control (#1035)
  Fix for issue 755 "ReferenceStripFeeder Breaks When Part Pitch > Hole to Hole Distance" (#1083)
  Improved loop syntax, fixed code to update the part info whenever the combo box is changed. (#1077)
  MjpgCaptureCamera was missing image transform support.  Added the missing code so the image trasnform settings now work correctly. (#1078)
  set list length of combo boxes to 20 items. (#1069)
  Implemented part count display on the ReferenceStripFeederConfigurationWizard (#1076)
  Mjpg camera feature (#1075)

# Conflicts:
#	src/main/java/org/openpnp/machine/reference/ReferenceMachine.java
@markmaker
Copy link
Collaborator

markmaker commented Jan 14, 2021

Hi @desertgreg

Just wanted to tell you this is great!

I wanted to test it for #1095 I entered more or less the first online MJPG cam I found, and it worked:

MJPEG Cam
http://213.193.89.202/axis-cgi/mjpg/video.cgi

Cool stuff!!

I changed quite some things, you can follow #1095 to see what and why.

_Mark

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants