Go to Post Sometimes the best feeling doesn't come from watching yourself excel but rather from watching others excel. - kristenliz_28 [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Closed Thread
 
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 17-01-2016, 00:31
Cobra Commander's Avatar
Cobra Commander Cobra Commander is offline
Registered User
FRC #0498 (Cobra Commanders)
Team Role: Leadership
 
Join Date: Jan 2015
Rookie Year: 2001
Location: Glendale, AZ
Posts: 30
Cobra Commander is on a distinguished road
Question GRIP with USB Camera

I am trying to use GRIP with my USB camera. I know the camera works and is configured correctly but, with my input set to webcam 0 it says it can not find the camera.

What source must I use to access my USB camera?
  #2   Spotlight this post!  
Unread 18-01-2016, 02:46
ThomasClark's Avatar
ThomasClark ThomasClark is offline
Registered User
FRC #0237
 
Join Date: Dec 2012
Location: Watertown, CT
Posts: 146
ThomasClark has much to be proud ofThomasClark has much to be proud ofThomasClark has much to be proud ofThomasClark has much to be proud ofThomasClark has much to be proud ofThomasClark has much to be proud ofThomasClark has much to be proud ofThomasClark has much to be proud ofThomasClark has much to be proud ofThomasClark has much to be proud of
Re: GRIP with USB Camera

What's the exact error message that happens when you create a camera source?
__________________
GRIP (Graphically Represented Image Processing) - rapidly develop computer vision algorithms for FRC
  #3   Spotlight this post!  
Unread 18-01-2016, 21:03
Cobra Commander's Avatar
Cobra Commander Cobra Commander is offline
Registered User
FRC #0498 (Cobra Commanders)
Team Role: Leadership
 
Join Date: Jan 2015
Rookie Year: 2001
Location: Glendale, AZ
Posts: 30
Cobra Commander is on a distinguished road
Re: GRIP with USB Camera

This is the part that I believe you are looking for.

Code:
WARNING: Failed to initialize CameraSource
java.io.IOException: A problem occurred trying to start the frame grabber for Webcam 0
This is the full error

Code:
Loading Dependency Injection Framework
Jan 19, 2016 1:59:31 AM java.util.logging.LogManager$RootLogger log
CONFIG: Configuration done.
platform: /Linux/arm/
Jan 19, 2016 1:59:41 AM edu.wpi.grip.core.Main start
INFO: Loading file test.grip
Jan 19, 2016 1:59:45 AM edu.wpi.grip.core.Source initializeSafely
WARNING: Failed to initialize CameraSource
java.io.IOException: A problem occurred trying to start the frame grabber for Webcam 0
	at edu.wpi.grip.core.sources.CameraSource.start(CameraSource.java:191)
	at edu.wpi.grip.core.sources.CameraSource.initialize(CameraSource.java:174)
	at edu.wpi.grip.core.Source.initializeSafely(Source.java:98)
	at edu.wpi.grip.core.serialization.SourceConverter.unmarshal(SourceConverter.java:60)
	at com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:72)
	at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:66)
	at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:50)
	at com.thoughtworks.xstream.converters.collections.AbstractCollectionConverter.readItem(AbstractCollectionConverter.java:71)
	at com.thoughtworks.xstream.converters.collections.CollectionConverter.addCurrentElementToCollection(CollectionConverter.java:98)
	at com.thoughtworks.xstream.converters.collections.CollectionConverter.populateCollection(CollectionConverter.java:91)
	at com.thoughtworks.xstream.converters.collections.CollectionConverter.populateCollection(CollectionConverter.java:85)
	at com.thoughtworks.xstream.converters.collections.CollectionConverter.unmarshal(CollectionConverter.java:80)
	at com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:72)
	at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:66)
	at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.unmarshallField(AbstractReflectionConverter.java:480)
	at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.doUnmarshal(AbstractReflectionConverter.java:412)
	at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.unmarshal(AbstractReflectionConverter.java:263)
	at com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:72)
	at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:66)
	at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:50)
	at com.thoughtworks.xstream.core.TreeUnmarshaller.start(TreeUnmarshaller.java:134)
	at com.thoughtworks.xstream.core.AbstractTreeMarshallingStrategy.unmarshal(AbstractTreeMarshallingStrategy.java:32)
	at com.thoughtworks.xstream.XStream.unmarshal(XStream.java:1206)
	at com.thoughtworks.xstream.XStream.unmarshal(XStream.java:1190)
	at com.thoughtworks.xstream.XStream.fromXML(XStream.java:1061)
	at edu.wpi.grip.core.serialization.Project.open(Project.java:68)
	at edu.wpi.grip.core.serialization.Project.open(Project.java:62)
	at edu.wpi.grip.core.Main.start(Main.java:53)
	at edu.wpi.grip.core.Main.main(Main.java:35)
Caused by: org.bytedeco.javacv.FrameGrabber$Exception: cvGrabFrame() Error: Could not grab frame. (Has start() been called?)
	at org.bytedeco.javacv.OpenCVFrameGrabber.start(OpenCVFrameGrabber.java:214)
	at org.bytedeco.javacv.FrameGrabber.restart(FrameGrabber.java:430)
	at edu.wpi.grip.core.sources.CameraSource.start(CameraSource.java:189)
	... 28 more

Jan 19, 2016 1:59:45 AM edu.wpi.grip.core.Main onExceptionEvent
SEVERE: Failed to initialize CameraSource
java.io.IOException: A problem occurred trying to start the frame grabber for Webcam 0
	at edu.wpi.grip.core.sources.CameraSource.start(CameraSource.java:191)
	at edu.wpi.grip.core.sources.CameraSource.initialize(CameraSource.java:174)
	at edu.wpi.grip.core.Source.initializeSafely(Source.java:98)
	at edu.wpi.grip.core.serialization.SourceConverter.unmarshal(SourceConverter.java:60)
	at com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:72)
	at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:66)
	at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:50)
	at com.thoughtworks.xstream.converters.collections.AbstractCollectionConverter.readItem(AbstractCollectionConverter.java:71)
	at com.thoughtworks.xstream.converters.collections.CollectionConverter.addCurrentElementToCollection(CollectionConverter.java:98)
	at com.thoughtworks.xstream.converters.collections.CollectionConverter.populateCollection(CollectionConverter.java:91)
	at com.thoughtworks.xstream.converters.collections.CollectionConverter.populateCollection(CollectionConverter.java:85)
	at com.thoughtworks.xstream.converters.collections.CollectionConverter.unmarshal(CollectionConverter.java:80)
	at com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:72)
	at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:66)
	at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.unmarshallField(AbstractReflectionConverter.java:480)
	at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.doUnmarshal(AbstractReflectionConverter.java:412)
	at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.unmarshal(AbstractReflectionConverter.java:263)
	at com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:72)
	at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:66)
	at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:50)
	at com.thoughtworks.xstream.core.TreeUnmarshaller.start(TreeUnmarshaller.java:134)
	at com.thoughtworks.xstream.core.AbstractTreeMarshallingStrategy.unmarshal(AbstractTreeMarshallingStrategy.java:32)
	at com.thoughtworks.xstream.XStream.unmarshal(XStream.java:1206)
	at com.thoughtworks.xstream.XStream.unmarshal(XStream.java:1190)
	at com.thoughtworks.xstream.XStream.fromXML(XStream.java:1061)
	at edu.wpi.grip.core.serialization.Project.open(Project.java:68)
	at edu.wpi.grip.core.serialization.Project.open(Project.java:62)
	at edu.wpi.grip.core.Main.start(Main.java:53)
	at edu.wpi.grip.core.Main.main(Main.java:35)
Caused by: org.bytedeco.javacv.FrameGrabber$Exception: cvGrabFrame() Error: Could not grab frame. (Has start() been called?)
	at org.bytedeco.javacv.OpenCVFrameGrabber.start(OpenCVFrameGrabber.java:214)
	at org.bytedeco.javacv.FrameGrabber.restart(FrameGrabber.java:430)
	at edu.wpi.grip.core.sources.CameraSource.start(CameraSource.java:189)
	... 28 more

Jan 19, 2016 1:59:45 AM edu.wpi.grip.core.Main onExceptionEvent
SEVERE: src must have a value to run this step.
Jan 19, 2016 1:59:45 AM edu.wpi.grip.core.Main onExceptionEvent
SEVERE: src must have a value to run this step.
Jan 19, 2016 1:59:45 AM edu.wpi.grip.core.Main onExceptionEvent
SEVERE: src must have a value to run this step.
Jan 19, 2016 1:59:45 AM edu.wpi.grip.core.Main onExceptionEvent
SEVERE: src must have a value to run this step.
Jan 19, 2016 1:59:45 AM edu.wpi.grip.core.Main onExceptionEvent
SEVERE: Input must have a value to run this step.
Jan 19, 2016 1:59:45 AM edu.wpi.grip.core.Main onExceptionEvent
SEVERE: Input must have a value to run this step.
Jan 19, 2016 1:59:45 AM edu.wpi.grip.core.Main onExceptionEvent
SEVERE: Input must have a value to run this step.
Jan 19, 2016 1:59:45 AM edu.wpi.grip.core.Main onExceptionEvent
SEVERE: Input must have a value to run this step.
Jan 19, 2016 1:59:45 AM edu.wpi.grip.core.Main onExceptionEvent
SEVERE: Input must have a value to run this step.
Jan 19, 2016 1:59:45 AM edu.wpi.grip.core.Main onExceptionEvent
SEVERE: Input must have a value to run this step.
Jan 19, 2016 1:59:45 AM edu.wpi.grip.core.Main onExceptionEvent
SEVERE: Value must have a value to run this step.
Jan 19, 2016 1:59:45 AM edu.wpi.grip.core.Main onExceptionEvent
SEVERE: Value must have a value to run this step.
Jan 19, 2016 1:59:45 AM edu.wpi.grip.core.Main onExceptionEvent
SEVERE: Value must have a value to run this step.
Jan 19, 2016 1:59:45 AM edu.wpi.grip.core.Main onExceptionEvent
SEVERE: Value must have a value to run this step.
Jan 19, 2016 1:59:45 AM edu.wpi.grip.core.Main onExceptionEvent
SEVERE: Value must have a value to run this step.
Jan 19, 2016 1:59:45 AM edu.wpi.grip.core.Main onExceptionEvent
SEVERE: Value must have a value to run this step.
Jan 19, 2016 1:59:45 AM edu.wpi.grip.core.Main onExceptionEvent
SEVERE: Value must have a value to run this step.
Jan 19, 2016 1:59:46 AM edu.wpi.grip.core.Main onExceptionClearedEvent
INFO: Exception Cleared Event
Jan 19, 2016 1:59:46 AM edu.wpi.grip.core.Main onExceptionClearedEvent
INFO: Exception Cleared Event
Jan 19, 2016 1:59:46 AM edu.wpi.grip.core.Step runPerformIfPossible
WARNING: The CV resize operation did not perform correctly.
java.lang.RuntimeException: /home/javacpp-presets/opencv/cppbuild/linux-frc/opencv-3.0.0/modules/imgproc/src/imgwarp.cpp:3208: error: (-215) ssize.area() > 0 in function resize

	at org.bytedeco.javacpp.opencv_imgproc.resize(Native Method)
	at edu.wpi.grip.generated.opencv_imgproc.Resize.perform(Resize.java:58)
	at edu.wpi.grip.core.Operation.perform(Operation.java:61)
	at edu.wpi.grip.core.Step.runPerformIfPossible(Step.java:137)
	at edu.wpi.grip.core.Step.onInputSocketChanged(Step.java:156)
	at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:483)
	at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74)
	at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47)
	at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322)
	at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304)
	at com.google.common.eventbus.EventBus.post(EventBus.java:275)
	at edu.wpi.grip.core.serialization.ConnectionConverter.unmarshal(ConnectionConverter.java:58)
	at com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:72)
	at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:66)
	at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:50)
	at com.thoughtworks.xstream.converters.collections.AbstractCollectionConverter.readItem(AbstractCollectionConverter.java:71)
	at com.thoughtworks.xstream.converters.collections.CollectionConverter.addCurrentElementToCollection(CollectionConverter.java:98)
	at com.thoughtworks.xstream.converters.collections.CollectionConverter.populateCollection(CollectionConverter.java:91)
	at com.thoughtworks.xstream.converters.collections.CollectionConverter.populateCollection(CollectionConverter.java:85)
	at com.thoughtworks.xstream.converters.collections.CollectionConverter.unmarshal(CollectionConverter.java:80)
	at com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:72)
	at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:66)
	at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.unmarshallField(AbstractReflectionConverter.java:480)
	at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.doUnmarshal(AbstractReflectionConverter.java:412)
	at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.unmarshal(AbstractReflectionConverter.java:263)
	at com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:72)
	at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:66)
	at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:50)
	at com.thoughtworks.xstream.core.TreeUnmarshaller.start(TreeUnmarshaller.java:134)
	at com.thoughtworks.xstream.core.AbstractTreeMarshallingStrategy.unmarshal(AbstractTreeMarshallingStrategy.java:32)
	at com.thoughtworks.xstream.XStream.unmarshal(XStream.java:1206)
	at com.thoughtworks.xstream.XStream.unmarshal(XStream.java:1190)
	at com.thoughtworks.xstream.XStream.fromXML(XStream.java:1061)
	at edu.wpi.grip.core.serialization.Project.open(Project.java:68)
	at edu.wpi.grip.core.serialization.Project.open(Project.java:62)
	at edu.wpi.grip.core.Main.start(Main.java:53)
	at edu.wpi.grip.core.Main.main(Main.java:35)

Jan 19, 2016 1:59:46 AM edu.wpi.grip.core.Main onExceptionEvent
SEVERE: The CV resize operation did not perform correctly.
java.lang.RuntimeException: /home/javacpp-presets/opencv/cppbuild/linux-frc/opencv-3.0.0/modules/imgproc/src/imgwarp.cpp:3208: error: (-215) ssize.area() > 0 in function resize

	at org.bytedeco.javacpp.opencv_imgproc.resize(Native Method)
	at edu.wpi.grip.generated.opencv_imgproc.Resize.perform(Resize.java:58)
	at edu.wpi.grip.core.Operation.perform(Operation.java:61)
	at edu.wpi.grip.core.Step.runPerformIfPossible(Step.java:137)
	at edu.wpi.grip.core.Step.onInputSocketChanged(Step.java:156)
	at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:483)
	at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74)
	at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47)
	at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322)
	at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304)
	at com.google.common.eventbus.EventBus.post(EventBus.java:275)
	at edu.wpi.grip.core.serialization.ConnectionConverter.unmarshal(ConnectionConverter.java:58)
	at com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:72)
	at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:66)
	at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:50)
	at com.thoughtworks.xstream.converters.collections.AbstractCollectionConverter.readItem(AbstractCollectionConverter.java:71)
	at com.thoughtworks.xstream.converters.collections.CollectionConverter.addCurrentElementToCollection(CollectionConverter.java:98)
	at com.thoughtworks.xstream.converters.collections.CollectionConverter.populateCollection(CollectionConverter.java:91)
	at com.thoughtworks.xstream.converters.collections.CollectionConverter.populateCollection(CollectionConverter.java:85)
	at com.thoughtworks.xstream.converters.collections.CollectionConverter.unmarshal(CollectionConverter.java:80)
	at com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:72)
	at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:66)
	at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.unmarshallField(AbstractReflectionConverter.java:480)
	at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.doUnmarshal(AbstractReflectionConverter.java:412)
	at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.unmarshal(AbstractReflectionConverter.java:263)
	at com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:72)
	at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:66)
	at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:50)
	at com.thoughtworks.xstream.core.TreeUnmarshaller.start(TreeUnmarshaller.java:134)
	at com.thoughtworks.xstream.core.AbstractTreeMarshallingStrategy.unmarshal(AbstractTreeMarshallingStrategy.java:32)
	at com.thoughtworks.xstream.XStream.unmarshal(XStream.java:1206)
	at com.thoughtworks.xstream.XStream.unmarshal(XStream.java:1190)
	at com.thoughtworks.xstream.XStream.fromXML(XStream.java:1061)
	at edu.wpi.grip.core.serialization.Project.open(Project.java:68)
	at edu.wpi.grip.core.serialization.Project.open(Project.java:62)
	at edu.wpi.grip.core.Main.start(Main.java:53)
	at edu.wpi.grip.core.Main.main(Main.java:35)

Jan 19, 2016 1:59:46 AM edu.wpi.grip.core.Step runPerformIfPossible
WARNING: The HSL Threshold operation did not perform correctly.
java.lang.IllegalArgumentException: HSL Threshold needs a 3-channel input
	at edu.wpi.grip.core.operations.composite.HSLThresholdOperation.perform(HSLThresholdOperation.java:68)
	at edu.wpi.grip.core.Step.runPerformIfPossible(Step.java:137)
	at edu.wpi.grip.core.Step.onInputSocketChanged(Step.java:156)
	at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:483)
	at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74)
	at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47)
	at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322)
	at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304)
	at com.google.common.eventbus.EventBus.post(EventBus.java:275)
	at edu.wpi.grip.core.serialization.ConnectionConverter.unmarshal(ConnectionConverter.java:58)
	at com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:72)
	at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:66)
	at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:50)
	at com.thoughtworks.xstream.converters.collections.AbstractCollectionConverter.readItem(AbstractCollectionConverter.java:71)
	at com.thoughtworks.xstream.converters.collections.CollectionConverter.addCurrentElementToCollection(CollectionConverter.java:98)
	at com.thoughtworks.xstream.converters.collections.CollectionConverter.populateCollection(CollectionConverter.java:91)
	at com.thoughtworks.xstream.converters.collections.CollectionConverter.populateCollection(CollectionConverter.java:85)
	at com.thoughtworks.xstream.converters.collections.CollectionConverter.unmarshal(CollectionConverter.java:80)
	at com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:72)
	at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:66)
	at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.unmarshallField(AbstractReflectionConverter.java:480)
	at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.doUnmarshal(AbstractReflectionConverter.java:412)
	at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.unmarshal(AbstractReflectionConverter.java:263)
	at com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:72)
	at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:66)
	at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:50)
	at com.thoughtworks.xstream.core.TreeUnmarshaller.start(TreeUnmarshaller.java:134)
	at com.thoughtworks.xstream.core.AbstractTreeMarshallingStrategy.unmarshal(AbstractTreeMarshallingStrategy.java:32)
	at com.thoughtworks.xstream.XStream.unmarshal(XStream.java:1206)
	at com.thoughtworks.xstream.XStream.unmarshal(XStream.java:1190)
	at com.thoughtworks.xstream.XStream.fromXML(XStream.java:1061)
	at edu.wpi.grip.core.serialization.Project.open(Project.java:68)
	at edu.wpi.grip.core.serialization.Project.open(Project.java:62)
	at edu.wpi.grip.core.Main.start(Main.java:53)
	at edu.wpi.grip.core.Main.main(Main.java:35)

Jan 19, 2016 1:59:46 AM edu.wpi.grip.core.Main onExceptionEvent
SEVERE: The HSL Threshold operation did not perform correctly.
java.lang.IllegalArgumentException: HSL Threshold needs a 3-channel input
	at edu.wpi.grip.core.operations.composite.HSLThresholdOperation.perform(HSLThresholdOperation.java:68)
	at edu.wpi.grip.core.Step.runPerformIfPossible(Step.java:137)
	at edu.wpi.grip.core.Step.onInputSocketChanged(Step.java:156)
	at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:483)
	at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74)
	at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47)
	at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322)
	at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304)
	at com.google.common.eventbus.EventBus.post(EventBus.java:275)
	at edu.wpi.grip.core.serialization.ConnectionConverter.unmarshal(ConnectionConverter.java:58)
	at com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:72)
	at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:66)
	at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:50)
	at com.thoughtworks.xstream.converters.collections.AbstractCollectionConverter.readItem(AbstractCollectionConverter.java:71)
	at com.thoughtworks.xstream.converters.collections.CollectionConverter.addCurrentElementToCollection(CollectionConverter.java:98)
	at com.thoughtworks.xstream.converters.collections.CollectionConverter.populateCollection(CollectionConverter.java:91)
	at com.thoughtworks.xstream.converters.collections.CollectionConverter.populateCollection(CollectionConverter.java:85)
	at com.thoughtworks.xstream.converters.collections.CollectionConverter.unmarshal(CollectionConverter.java:80)
	at com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:72)
	at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:66)
	at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.unmarshallField(AbstractReflectionConverter.java:480)
	at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.doUnmarshal(AbstractReflectionConverter.java:412)
	at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.unmarshal(AbstractReflectionConverter.java:263)
	at com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:72)
	at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:66)
	at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:50)
	at com.thoughtworks.xstream.core.TreeUnmarshaller.start(TreeUnmarshaller.java:134)
	at com.thoughtworks.xstream.core.AbstractTreeMarshallingStrategy.unmarshal(AbstractTreeMarshallingStrategy.java:32)
	at com.thoughtworks.xstream.XStream.unmarshal(XStream.java:1206)
	at com.thoughtworks.xstream.XStream.unmarshal(XStream.java:1190)
	at com.thoughtworks.xstream.XStream.fromXML(XStream.java:1061)
	at edu.wpi.grip.core.serialization.Project.open(Project.java:68)
	at edu.wpi.grip.core.serialization.Project.open(Project.java:62)
	at edu.wpi.grip.core.Main.start(Main.java:53)
	at edu.wpi.grip.core.Main.main(Main.java:35)

Jan 19, 2016 1:59:46 AM edu.wpi.grip.core.Main start
INFO: SUCCESS! The project is running in headless mode!
  #4   Spotlight this post!  
Unread 18-01-2016, 22:04
ThomasClark's Avatar
ThomasClark ThomasClark is offline
Registered User
FRC #0237
 
Join Date: Dec 2012
Location: Watertown, CT
Posts: 146
ThomasClark has much to be proud ofThomasClark has much to be proud ofThomasClark has much to be proud ofThomasClark has much to be proud ofThomasClark has much to be proud ofThomasClark has much to be proud ofThomasClark has much to be proud ofThomasClark has much to be proud ofThomasClark has much to be proud ofThomasClark has much to be proud of
Re: GRIP with USB Camera

What model camera is it?

Just to make sure, it's plugged into the roboRIO, right?
__________________
GRIP (Graphically Represented Image Processing) - rapidly develop computer vision algorithms for FRC
  #5   Spotlight this post!  
Unread 20-01-2016, 17:10
Cobra Commander's Avatar
Cobra Commander Cobra Commander is offline
Registered User
FRC #0498 (Cobra Commanders)
Team Role: Leadership
 
Join Date: Jan 2015
Rookie Year: 2001
Location: Glendale, AZ
Posts: 30
Cobra Commander is on a distinguished road
Re: GRIP with USB Camera

The model is not on it and the box is long gone. It is a logitech webcam of some type.

Putting the camera on the dashboard works fine, yes it is plugged into the RoboRio.
  #6   Spotlight this post!  
Unread 22-01-2016, 19:37
Cobra Commander's Avatar
Cobra Commander Cobra Commander is offline
Registered User
FRC #0498 (Cobra Commanders)
Team Role: Leadership
 
Join Date: Jan 2015
Rookie Year: 2001
Location: Glendale, AZ
Posts: 30
Cobra Commander is on a distinguished road
Re: GRIP with USB Camera

I updated to Grip 1.1.1 unfortunately I am still unable to create my camera source.

When I plug the webcam into the labtop it works, so I know the camera is compatible and works. I can output the camera to the dashboard, therefore the camera is operation when plugged into the roboRio.



Code:
VIDEOIO ERROR: V4L: index 0 is not correct!
Jan 23, 2016 12:33:05 AM edu.wpi.grip.core.Source initializeSafely
WARNING: Failed to initialize CameraSource
java.io.IOException: A problem occurred trying to start the frame grabber for Webcame 0

Do I need to be using a different source when it is plugged into the RIO?
  #7   Spotlight this post!  
Unread 22-01-2016, 19:56
Cobra Commander's Avatar
Cobra Commander Cobra Commander is offline
Registered User
FRC #0498 (Cobra Commanders)
Team Role: Leadership
 
Join Date: Jan 2015
Rookie Year: 2001
Location: Glendale, AZ
Posts: 30
Cobra Commander is on a distinguished road
Re: GRIP with USB Camera

I found my own problem. I should have read the error more carefully.

Code:
INFO: Loading file /home/lvuser/project.grip
VIDEOIO ERROR: V4L2: Pixel format of incoming image is unsupported by OpenCV
VIDEOIO ERROR: V4L: setting property #16 is not supported
VIDIOC_STREAMON: Bad file descriptor
VIDIOC_STREAMON: Bad file descriptor
Jan 23, 2016 12:57:05 AM edu.wpi.grip.core.Source initializeSafely
WARNING: Failed to initialize CameraSource
java.io.IOException: A problem occurred trying to start the frame grabber for Webcam 0
The webcam I am using's pixel format is unsupported by OpenCV
  #8   Spotlight this post!  
Unread 22-01-2016, 20:33
nollchr nollchr is offline
Registered User
FRC #2170 (Titanium Tomahawks)
Team Role: Mentor
 
Join Date: Feb 2014
Rookie Year: 2014
Location: Glastonbury, CT
Posts: 28
nollchr is an unknown quantity at this point
Re: GRIP with USB Camera

Quote:
Originally Posted by Cobra Commander View Post
I found my own problem. I should have read the error more carefully.

Code:
INFO: Loading file /home/lvuser/project.grip
VIDEOIO ERROR: V4L2: Pixel format of incoming image is unsupported by OpenCV
VIDEOIO ERROR: V4L: setting property #16 is not supported
VIDIOC_STREAMON: Bad file descriptor
VIDIOC_STREAMON: Bad file descriptor
Jan 23, 2016 12:57:05 AM edu.wpi.grip.core.Source initializeSafely
WARNING: Failed to initialize CameraSource
java.io.IOException: A problem occurred trying to start the frame grabber for Webcam 0
The webcam I am using's pixel format is unsupported by OpenCV
We are getting the same problem with the USB Microsoft LifeCam 3000-HD
  #9   Spotlight this post!  
Unread 22-01-2016, 23:11
NickB NickB is offline
Registered User
FRC #2002
 
Join Date: Jan 2016
Location: Oregon
Posts: 5
NickB is an unknown quantity at this point
Re: GRIP with USB Camera

I am also trying to get my Microsoft LifeCam 3000-HD to work, but using RoboRealm. After using the FRC_CameraClient module, I get the error "Invalid Jpeg Format". It works fine when connecting directly to the PC. The only other discussion I have found about this is in this (http://www.roborealm.com/forum/index.php?thread_id=5472) RoboRealm thread:

"It seems that they are using jpeg images but with a couple bytes at the beginning of the stream that indicate size, fps, etc. Its not a standard stream format so we'll have to create something specific to handle these kinds of streams."

Perhaps the RoboRio is formatting USB Webcam images specifically for the dashboard? Even if not, it seems to be an issue with the RoboRio, since other webcams are having this same issue. Later in that thread, however, the guy who was having issues said he was able to successfully get the image to come in right, but he doesn't really explain how.

Edit: This (http://www.chiefdelphi.com/forums/sh...d.php?t=134404) thread details how the RoboRio handles USB Webcams. According to it, the images extracted from the webcam is missing a part of the normal JPEG header. While his modified camera viewer may not be useful, he also explains that the Intermediate Vision template will re-encode the images locally.

Last edited by NickB : 22-01-2016 at 23:55. Reason: Found possible solution?
  #10   Spotlight this post!  
Unread 23-01-2016, 11:48
Cobra Commander's Avatar
Cobra Commander Cobra Commander is offline
Registered User
FRC #0498 (Cobra Commanders)
Team Role: Leadership
 
Join Date: Jan 2015
Rookie Year: 2001
Location: Glendale, AZ
Posts: 30
Cobra Commander is on a distinguished road
Re: GRIP with USB Camera

This defiantly seems to be the problem.

It seems to get closer if you don't start the camera in the code. It can at least find the camera this way but, it has extraneous data.

Code:
VIDEOIO ERROR: V4L/V4L2: VIDIOC_S_CROP
VIDEOIO ERROR: V4L: setting property #16 is not supported
Corrupt JPEG data: 2 extraneous bytes before marker 0xd6
Corrupt JPEG data: 4 extraneous bytes before marker 0xd
How would we go about implementing such a solution?
  #11   Spotlight this post!  
Unread 23-01-2016, 12:28
NickB NickB is offline
Registered User
FRC #2002
 
Join Date: Jan 2016
Location: Oregon
Posts: 5
NickB is an unknown quantity at this point
Re: GRIP with USB Camera

Just got RoboRealm to pick up the USB Webcam image using the Intermediate Vision example program.
Closed Thread


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 04:17.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi