Skip to content

Commit

Permalink
Created readme, updated image capture module
Browse files Browse the repository at this point in the history
  • Loading branch information
Christian committed Apr 28, 2020
1 parent 57a6476 commit 8126db8
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Modules/Func_Capture_Image.m
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
31 changes: 31 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -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.

0 comments on commit 8126db8

Please sign in to comment.