I have to detect rubber slit from camera (rubber is cut or not) from 2 cameras. 3rd camera for character & digit recognition. These 3 cameras has to interface with PC & need to access from API.
Our query is, if we give trigger to camera, how can we save image in PC Hard disk directly.
Is this is possible?
We have our own software in which we have to show input & output image to client.
So, looking for cameras which can store images in PC Hard disk directly.
Cameras are going to install in automation machine which will be on factory floor
Do you have any such cameras?
Low cost camera with PC interface
Hi SwapnilBhole
Would this work for you: https://docs.luxonis.com/software/depthai/examples/rgb_full_resolution_saver/?
Thanks,
Jaka
jakaskerl Yes it will work. But, how can I connect 3 camera with CPU? I mean, after connecting, will all camera will have different IP address & based on that, I will run script for respective camera or how it will be ?
Hi SwapnilBhole
I'm going to assume you are using POE devices for factory floor. If 3 devices are connected to the same network (via a router or other DHCP server), the devices will have separate IPs. If there is no DHCP server, you would need to set them to static IPs to make them accessible at the same time.
You can run multiple devices using multithreading approach: https://docs.luxonis.com/software/depthai/multi-device-setup/ - luxonis/depthai-experimentsblob/master/gen2-multiple-devices/main.py
Thanks,
Jaka
I am planning to use OAK-1-Lite. This is USB. So how can I connect ??
Hi @SwapnilBhole
Same thing but instead of IP, you use MXID for identification. No extra steps are needed for usb (like making sure devices are not on the same IP), just plug and play.
Thanks,
Jaka
jakaskerl Thanks
jakaskerl I have to keep this camera on for 22 hours per day. This will be in industrial environment 0 degree to max 55 degree. will this camera sustain for this?
SwapnilBhole
Should work. Reference: https://docs.luxonis.com/hardware/platform/environmental-specifications/operating-temperature/#Max%20temperature
Thanks,
Jaka
Where I can find getting started for OAK-1 Lite camera.
I found this. but, this is for PoE
- Edited
I have purchase OAK-1 Lite.
I have to capture only image. Its working, but I have to do it very fast.
What are different optimization for capturing image only?
import depthai as dai
import cv2
pipeline = dai.Pipeline()
cam_rgb = pipeline.createColorCamera()
cam_rgb.setBoardSocket(dai.CameraBoardSocket.RGB)
cam_rgb.setResolution(dai.ColorCameraProperties.SensorResolution.THE_1080_P)
#cam_rgb.setAutoExposureEnable(True)
xout = pipeline.createXLinkOut()
xout.setStreamName("video")
cam_rgb.video.link(xout.input)
with dai.Device(pipeline) as device:
while True:
frame = device.getOutputQueue(name="video", maxSize=4, blocking=False).get()
img = frame.getCvFrame()
cv2.imshow("OAK Image", img)
cv2.imwrite("C:\depthai\demo_code\save_image\captured_image.jpg", img)
break
if cv2.waitKey(1) == ord('q'):
break
cv2.destroyAllWindows()
Hi @SwapnilBhole
What do you mean by "very fast".
If you want to do it any faster than you have it currently, you would need to put the saving part in a separate process/(maybe thread would work as well).
Thanks,
Jaka
jakaskerl
"very fast" meaning is I have to capture image in minimum possible time.
Can I reduce any line of above code?
or is there any another method to capture image as fast as I can?
Threading I will use. But, need some direction or sample code.
SwapnilBhole
It's pretty much as minimal as you can make it without reducing frame size.
perhaps setting pipeline.setXLinkChunkSize(0)
could help with latency.
cv2.imshow("OAK Image", img)
also takes additional time to display, so removing it would speed up the host loop.
Thanks,
Jaka
We are using this OAK-1-Lite inside industrial machine (machine vision system). since, CPU is kept below machine & camera is at top, distance from camera to CPU is 3 meter approx. Can you suggest any good USB cable which can send data upto 3 meter?
I am using camera only for capturing image & later on for OCR.
Hi @SwapnilBhole
We've seen some problems with longer standard USB cables. I'd suggest you get one that says "active" USB cable. Those ones can carry data up to 10m or more.
Thanks,
Jaka
Hi @jakaskerl ,
We have OAK-1-Lite. our task is to capture image from this.
task-1: keep camera on in streaming mode & capture image.
in this, we are getting clear image. distance between object & camera is 10cm & we changed to 12 cm.
task-2: we have capture image directly. no streaming mode.
in this case, image is blur. how can we resolve this.
task-3: This is autofocus, we have to change it to fixed focus. any reference?
@SwapnilBhole ,
it's not in focus because camera isn't producing frames to run 3A (auto focus, exposure, whitebalance). You can create Script node and just discard preview frames so 3A is run and frames are in focus.
script_discard.setProcessor(dai.ProcessorType.LEON_MSS)
script_discard.setScript("""
while True:
node.io['preview'].get()
""")
cam.preview.link(script_discard.inputs['preview'])