https://www.baslerweb.com/cn/products/cameras/area-scan-cameras/ace/aca1300-200uc/
Development documentation
https://zh.docs.baslerweb.com/aca1300-200uc
pylon Library (C + +)
Main example function description
https://blog.csdn.net/juliarjuliar/article/details/79457719
CameraEventPrinter.h
//Contains a camera event handler that outputs a message for each event function
ConfigurationEventPrinter.h
//Contains a configured event handler that outputs a message for each event function
ImageEventPrinter.h
//Contains a configured event handler that outputs a message for each event function
PixelFormatAndAoiConfiguration.h
//Contains a configuration for setting pixel data format and image AOI
SampleImageCreator.h
//Contains functions to create sample images. If necessary, convert the image format to the target format
DeviceRemovalHandling
//Explains how to get a camera device removal notification and how to reconnect a removed device
Grab
//Describes how to use the CInstantCamera class to capture and process images. Image capture and processing are synchronized
Grab_CameraEvents
//Explain how to be notified after the camera event message is received. These events will be automatically retrieved and processed by the InstantCamera class. The information loaded by the event message will be disclosed in the form of parameter nodes in the camera node map
Grab_ChunkImage
//How to use block features, how to capture images and how to process these additional data. When the camera is in block mode, it transmits data blocks that are divided into blocks
Grab_MultiCast
//Explains how to open a camera in multicast mode and how to receive a multicast stream. Instances must start simultaneously on different computers
Grab_MultipleCameras
//Describes how to capture and process images from multiple cameras using the ClnstantCameraArray class. ClnstantCameraArray class represents an array of current camera device objects. It provides an interface for image capture basically consistent with instant camera
Grab_Strategies
//Describes the use of the current camera capture strategy
Grab_UsingExposureEndEvent
//Explains how to use the Exposure End event to speed up image acquisition
Grab_UsingGrabLoopThread
//Describes how to use the capture loop thread provided by the Instant Camera camera class to capture and process images.
Grab_UsingSequencer
//A method for capturing an image using a sequence feature of a camera is shown
GUI_ImageWindow
//Describes how to display images using the cpylonImageWindow class. Here, the image is captured and divided into multiple slices, and each slice is displayed in an independent window
ParametrizeCamera_AutoFunctions
Development steps
https://blog.csdn.net/weixin_44840658/article/details/89325995
1. First, you need to initialize Pylon, that is, call PylonInitialize();
2. Open the camera in a try{} catch() {} statement.
3. Call the transport layer factory class of the camera, define a reference to the factory class, and initialize it, that is, ctlfactory & tlfactory = ctlfactory:: getinstance();
4. Get all connected pylon cameras, DeviceInfoList_t devices; tlFactory.EnumerateDevices(devices);
5. Create a camera instance array, cinstantcameraarray cameras (min (devices. Size()), C_ maxCamerasToUse));
6. In a for loop, all detected cameras are attached to the camera instance array, cameras [i] Attach(tlFactory.CreateDevice(device[i]));
7. The two cameras start to capture images, and define a variable to access the capture results, cameras StartGrabbing(); CGrabResultPtr ptrGrabResult;
8. The for loop controls the number of captured pictures, defines a variable that can mark the camera sequence in the loop, and then accesses the relevant data of the camera through the cameras array
9. Finally, terminate the Pylon camera, that is, call Pylon terminate
#include <pylon/PylonIncludes.h> using namespace Pylon; using namespace std; static const uint32_t c_countOfImagesToGrab = 10; static const size_t c_maxCamerasToUse = 2; int main(int argc, char* argv[]) { int exitCode = 0; PylonInitialize(); try { CTlFactory& tlFactory = CTlFactory::GetInstance(); DeviceInfoList_t devices; if ( tlFactory.EnumerateDevices(devices) == 0 ) { throw RUNTIME_EXCEPTION( "No camera present."); } CInstantCameraArray cameras( min( devices.size(), c_maxCamerasToUse)); cout << "devices.size(): " << devices.size() << endl; for ( size_t i = 0; i < cameras.GetSize(); ++i) { cameras[ i ].Attach( tlFactory.CreateDevice( devices[ i ])); cout << "Using device " << cameras[ i ].GetDeviceInfo().GetModelName() << endl; } for( uint32_t i = 0; i < c_countOfImagesToGrab && cameras.IsGrabbing(); ++i) { cameras.RetrieveResult( 5000, ptrGrabResult, TimeoutHandling_ThrowException); intptr_t cameraContextValue = ptrGrabResult->GetCameraContext(); cout << "Camera " << cameraContextValue << ": " << cameras[ cameraContextValu].GetDeviceInfo().GetModelName() << endl; cout << "GrabSucceeded: " << ptrGrabResult->GrabSucceeded() << endl; cout << "SizeX: " << ptrGrabResult->GetWidth() << endl; cout << "SizeY: " << ptrGrabResult->GetHeight() << endl; const uint8_t *pImageBuffer = (uint8_t *) ptrGrabResult->GetBuffer(); cout << "Gray value of first pixel: " << (uint32_t) pImageBuffer[0] << endl << endl; } } catch (const GenericException &e) { cerr << "An exception occurred." << endl << e.GetDescription() << endl; exitCode = 1; } cerr << endl << "Press Enter to exit." << endl; while( cin.get() != '\n'); PylonTerminate(); return exitCode; }
hardware interface
Mechanical drawings https://www.baslerweb.com/cn/sales-support/downloads/document-downloads/basler-ace-usb3-c-mount-cad-technical-drawing/
3D printing stand https://www.baslerweb.com/cn/sales-support/downloads/document-downloads/blaze-ace-mounting-bracket-step-stl-model/
Pin | line | function |
---|---|---|
1 | Line 3 | General purpose I/O (GPIO) line |
2 | Line 1 | Photoelectric coupling I/O input line |
3 | Line 4 | General purpose I/O (GPIO) line |
4 | Line 2 | Photoelectric coupling I/O output line |
5 | - | Photoelectric coupling I/O line grounding |
6 | - | General purpose I/O (GPIO) line grounding |
Photoelectric coupling input circuit
GPIO input line
https://zh.docs.baslerweb.com/circuit-diagrams-(ace)
https://zh.docs.baslerweb.com/aca1300-200uc#general-purpose-io-lines
https://blog.csdn.net/IntegralforLove/article/details/94722689