From 8126db831a080d426aab6a15424ca27744e81338 Mon Sep 17 00:00:00 2001 From: Christian Date: Tue, 28 Apr 2020 16:31:10 -0400 Subject: [PATCH] Created readme, updated image capture module --- Modules/Func_Capture_Image.m | 5 ++++- README.md | 31 +++++++++++++++++++++++++++++++ 2 files changed, 35 insertions(+), 1 deletion(-) create mode 100644 README.md diff --git a/Modules/Func_Capture_Image.m b/Modules/Func_Capture_Image.m index 9fca5fc..e7ba82d 100644 --- a/Modules/Func_Capture_Image.m +++ b/Modules/Func_Capture_Image.m @@ -2,11 +2,14 @@ %FUNC_CAPTURE_IMAGE Implementation of image capture from the camera. % This function should return an n x m x 3 uint8 image array + GIGE_CAM_IP_ADDRESS = '169.254.90.219'; + + % Set to 0 when actual camera is connected test = 1; if(~test) % Initialize a connection to the camera - g = gigecam('169.254.90.219','PixelFormat', 'BayerBG8'); + g = gigecam(GIGE_CAM_IP_ADDRESS,'PixelFormat', 'BayerBG8'); % Change the ExposureTime setting (in us) g.ExposureTimeAbs = 20000; diff --git a/README.md b/README.md new file mode 100644 index 0000000..53542cc --- /dev/null +++ b/README.md @@ -0,0 +1,31 @@ +## Surface Inspection Integration +This is the first working version, containing all the code to communicate with the IRC, camera, and run the image processing algorithm. The architecture and organization of this software package will change significantly. + +This early software can be tested with the IRC and Camera hardware with minimal setup. + + + +## Quickstart + +1. Clone this repository to your machine +2. Download the trained network from the following link: https://filelocker.uconn.edu/public_download?shareId=0d857639f812a7baf4d3838015a8f4fa . When prompted for a password, enter **resnet** +3. Copy RES101TrainedNET.mat into the Data folder +4. Open MATLAB to the directory you cloned this repository to +5. Configure connections to the IRC and Camera, as described below. +6. Clear your MATLAB workspace: `clear all;` +7. Run `main.m` to start the program. The IRC will be automatically connected to, and the system will respond to packets from the IRC. +8. After testing, run `fclose(tcpConn)` to close the TCP connection to the IRC. + + + + + +### Configuring IRC Connection + +At the top of the `main.m` file, adjust the IRC IP address and Port number to match the actual IRC. + + + +### Configuring the Camera Connection + +In `Modules\Func_Capture_Image.m` modify the IP address for the camera. Setting the `test` variable to `0` will enable the use of the camera. When `test` is set to `1`, a testing image is loaded every time the capture image function is called. \ No newline at end of file