Anda di halaman 1dari 17

Software Requirements Specification for

Optics Lab Measurement System


Version 1.0

Prepared by William Reuschel

AFB TECH

October 2010

Copyright 2002 by Karl E. Wiegers. Permission is granted to use, modify, and distribute this document.

Software Requirements Specification for <Project>

Page ii

Table of Contents
Table of Contents .......................................................................................................................... ii Revision History ............................................................................................................................ ii 1. Introduction ..............................................................................................................................1
1.1 1.2 1.3 1.4 1.5 2.1 2.2 2.3 2.4 2.5 2.6 3.1 3.2 3.3 3.4 3.5 3.6 4.1 4.2 4.3 4.4 5.1 5.2 5.3 5.4 Purpose ........................................................................................................................................ 1 Document Conventions ............................................................................................................... 1 Intended Audience and Reading Suggestions ............................................................................. 1 Project Scope ............................................................................................................................... 1 References ................................................................................................................................... 1 Product Perspective ..................................................................................................................... 2 User Classes and Characteristics ................................................................................................. 1 Operating Environment ............................................................................................................... 1 Design and Implementation Constraints ..................................................................................... 1 User Documentation .................................................................................................................... 1 Assumptions and Dependencies .................................................................................................. 1 Acquire Image Data ..................................................................................................................... 2 Measure display Contrast and Reflection.................................................................................... 4 Calculate display MTF ................................................................................................................ 4 Control Instrumentation .............................................................................................................. 5 Perform System Calibration ........................................................................................................ 6 Store Measurement Data ............................................................................................................. 7 User Interfaces ............................................................................................................................. 7 Hardware Interfaces .................................................................................................................... 8 Software Interfaces ...................................................................................................................... 8 Communications Interfaces ......................................................................................................... 9 Performance Requirements ......................................................................................................... 9 Safety Requirements .................................................................................................................... 9 Security Requirements ................................................................................................................ 9 Software Quality Attributes ........................................................................................................ 9

2. Overall Description ..................................................................................................................2

3. System Features........................................................................................................................2

4. External Interface Requirements ...........................................................................................7

5. Other Nonfunctional Requirements .......................................................................................9

6. Other Requirements ................................................................................................................9 Appendix A: Glossary..................................................................................................................10 Appendix B: Analysis Models .....................................................................................................11 Appendix C: Issues List ...............................................................................................................12

Revision History
Name William Reuschel Date 10/16 Reason For Changes Initial Draft Version 0.9

Software Requirements Specification for <Project>

Page 1

1. Introduction
1.1 Purpose
This document describes the functional and nonfunctional requirements for the Optics Lab Measurement System (OLMS) to be used in the AFB TECH Optics Lab. This document contains information for release 1 of the system.

1.2 Document Conventions


In this document, low level requirements inherit the priority of the high level requirements unless otherwise stated.

1.3 Intended Audience and Reading Suggestions


This document is intended for the AFB TECH Optics Lab team and the professors from Marshall University serving as advisors. The AFB TECH team will find the Major Features, Other Nonfunctional Requirements, and Other Requirements sections most helpful when reading this document.

1.4 Project Scope


The scope of this project is defined in the document Vision and Scope Document for the Optics Lab Measurement System[1].

1.5 References
1. Reuschel, William. Vision and Scope Document for the Optics Lab Measurement System. users.marshall.edu/~reuschel3/docs/olms_vs.pdf 2. Kelley, E. Display Ambient-Character-Reflectance and Contrast Measurement Procedure. users.marshall.edu/~reuschel3/docs/DisplayCharacterReflectances-SOW1-1p0.pdf 3. Kelley, E. Display Reflection Measurement ProcedureReplica Mask Measurements. users.marshall.edu/~reuschel3/docs/ReplicaMaskMeasurements.pdf 4. Kelley, E. Camera Flat-Field Correction Determination. users.marshall.edu/~reuschel3/docs/CameraFFC-1p0.pdf

Software Requirements Specification for <Project>

Page 2

2. Overall Description
2.1 Product Perspective
The Optics Lab Measurement System (OLMS) is a new software based system that replaces the current manual methods for taking display measurements using the AFB TECH Optics Lab. This system will make the measurements easier to perform and more accurate. It will coordinate and track calibration data, gather data from instrumentations, provide interfaces to guide the user through the measurement process, and store data and images. The system will run on the PC in the optics lab and interact with all of the instrumentation currently being used to take measurements. See Figure 1.

Software Requirements Specification for <Project>

Page 1

Figure 1: System Flow Diagram

Software Requirements Specification for <Project>

Page 1

2.2 User Classes and Characteristics


Measurement Technician: There will only be one major user class for the system. This user will have access to all of the major features of the system. The only purpose for the OLMS is to manage the measurements that the Technician used to take. Database Administrator: This user will have access to the database for the purposes of backing up and restoring, and general database management.

2.3 Operating Environment


Matlab R2010a and the Image Processing Toolbox v7.0 3 Serial Ports 4 GB RAM 250 GB HDD Windows 7 64-bit

2.4 Design and Implementation Constraints


CO-1: The process must pass a usability test by a low vision expert CO-2: The measurement algorithms used by the system must meet the prerequisites and assumptions outlined in the Optics Lab measurement procedures [2, 3].

2.5 User Documentation


UD-1: The system shall provide help tips on all user interface screens. UD-2: The system shall have a comprehensive user manual approved by a low vision expert.

2.6 Assumptions and Dependencies


AS-1: All documentation for measurement and calibration procedures are complete and correct. AS-2: Any SVD to be measured will fit on the optics table and will not have any physical obstructions to prevent measurement. DE-1: All required instruments have a computer interface.
DE-2: The MATLAB MTF module is complete.

Software Requirements Specification for <Project>

Page 2

3. System Features
3.1 Acquire Image Data
3.1.1 Description and Priority This feature allows the user to acquire image data to be used in later analysis. Before an image can be taken, the physical setup of the lab must be properly configured. Priority = high. 3.1.2 Stimulus/Response Sequences Stimulus: The user will request to prepare the lab for taking an image. Response: The user will be guided through the sequence of steps to physically set up the lab. This will not consist of any calibration procedures. The system will also have to signal the power supply to switch on the output. Stimulus: The user requests to take an image Response: The system will interface with the Canon EDSDK to connect with the camera. Live View images will begin streaming to a picture box, and the user will be given the option to change camera settings and then take a picture. 3.1.3 Functional Requirements Image.Prepare Image.Prepare.Darkroom Image.Prepare.Exposure The system prepares the instrumentation to take images. The following are executed at different times throughout the process. The system prompts the user to turn off the lights. The system shall test the optimal exposure setting for the camera. The highest signal should be 80% of maximum. Returns true if within acceptable range (75-85%). The system will count down from 15 minutes from when the lamp was turned on. The system will show an on screen timer. If the user attempts to perform an action involving acquiring measurement data during this time the system will warn the user that the lamp may not be warmed up, but will not stop the user from performing that action. The system shall prompt the user to open the shutter. The system will check that the illuminance is above a threshold level. This threshold level will be user configurable. The system will inform the user of the illuminance level and the threshold status. The system prompts the user to find a suitable region of the screen to measure, place a replica mask, and mount the display on the sphere. The user will be presented with diagrams explaining the physical setup.

Image.Prepare.LampWarmup

Image.Prepare.MaxIlluminance

Image.Prepare.DisplaySetup

Software Requirements Specification for <Project>

Page 3

Image.Camera.LiveView

Image.Camera.Focus Image.Camera.ChangeSetting

Image.Camera.TakePicture

Image.Camera.ApplyCorrections

The system shall utilize the live view function of the camera. This will enable the user to see the electronic view finder of the camera through the computers display. The system shall allow the user to focus the camera. The system shall allow the user to change the shutter speed, ISO setting, f-stop, and white balance of the camera. These settings are displayed on screen. The system will make an exposure with the camera and store the image data in memory. The image will be displayed for the users review. The system will apply the background subtraction and flat field correction calibration images to the stored image.

Software Requirements Specification for <Project>

Page 4

3.2 Measure display Contrast and Reflection


3.2.1 Description and Priority Once a user has acquired an image using feature 3.1, it will be possible to obtain contrast and reflection properties of the display. This process will require a user interface, and the user will select regions of the image to serve as the high, low, and masked areas. This feature may require images with different environment conditions, which will be specified in the detailed functional requirements. Priority = High. 3.2.2 Stimulus/Response Sequences Stimulus: The user requests to start contrast and reflection measurements Response: The system starts a sequence of steps that ask the user to select the proper regions of a loaded image to serve as the data points for the contrast and reflection measurements. The system will then calculate contrast and reflection properties based on these selections. 3.2.3 Functional Requirements CR.LoadImage CR.Acquire.Foreground CR.Acquire.Background CR.Acquire.Replica CR.Calculate. SpecularExcluded.Emissive CR.Calculate. SpecularEncluded.Reflective CR.Calculate. SpecularIncluded.Emissive CR.Calculate. SpecularIncluded.Reflective Loads an image that was saved in feature 3.1 The system allows the user to select a rectangular region of the image to be the foreground. The system averages the values to obtain a single foreground value The system allows the user to select a rectangular region of the image to be the background. The system averages the values to obtain a single background value The system allows the user to select a rectangular region of the image of the replica mask. The system averages the values to obtain a single replica mask value.

The system performs CR.Acquire with the different images as defined in the Optics Lab measurement procedure documents.

3.3 Calculate display MTF


3.3.1 Description and Priority The system allows the user to crop an image to the proper size for the MTF analysis. The system then sends this data in bitmap form to a script running on the MATLAB engine that calculates the MTF of the image. 3.3.2 Stimulus/Response Sequences

Software Requirements Specification for <Project>

Page 5

Stimulus: The user requests to perform MTF analysis on an image Response: The system displays the image and allows the user to draw a rectangle around the area to be cropped. This regions dimensions must conform to a power of 2. The system passes this data to the MATLAB Engine. 3.3.3 Functional Requirements MTF.LoadImage MTF.CropImage MTF.SendData MTF.ReceiveData The system loads the image selected by the user into a picture box. The system allows the user to select a rectangular region of the image to be analyzed. This region must be fitted to be 2n x 2m pixels in dimensions. The system converts the cropped region of the image into values that can be used by the MATLAB script and then sends the values to the MATLAB engine. The system receives the data from the MATLAB engine.

3.4 Control Instrumentation


3.4.1 Description and Priority The system will be able to control all of the instrumentation being used in the measurement process. The three instruments are the Agilent Power Supply (PS), Minolta LS-100 Luminance Meter (LM), and the Keithley 2000 Digital Multimeter (DMM). Priority = High. 3.4.2 Stimulus/Response Sequences Stimulus: The user requests to send a command to the instrumentation Response: The system sends the correct command to the instrument and waits for a response. If a response is received, the user is notified. 3.4.3 Functional Requirements PS.SetVoltage Sets the voltage of the power supply to specified input value 0 48 volts. Either volts or amps can be set, the other value will adjust accordingly. Returns true if successful. Returns the voltage measured by the power supply Sets amps to specified value between 0 8. Either volts or amps can be set, the other value will adjust accordingly. Returns true if successful Returns the number of amps in scientific notation as measured by the power supply. Sets the voltage protection to specified number 0 48. If the power supply attempts to set a voltage higher than this number, it trips Over Voltage Protection (OVP), which is a feature of the power supply. OVP turns voltage off and locks the PS until reset. Returns true if successful

PS.GetVoltage PS.SetAmps PS.GetAmps PS.SetOVP

Software Requirements Specification for <Project>

Page 6

PS.ResetOVP PS.SetOutput PS.SetRemote DMM.SetMeasurementType DMM.SetRemote DMM.SetMeasurementFrequency DMM.Fetch LM.GetLuminance

Resets OVP status. Returns true if successful. Sets the PS output to on or off. Sets the remote setting for the PS. When remote is on, the front panel controls are locked. Returns true if successful. Sets the measurement type to DC Volts or DC Amps. Returns true if successful. Sets the remote status to true or false. If remote is true, the front panel of the DMM is locked. Returns true if successful. Sets the frequency of measurement to slow or fast. Returns true or false. Returns the most recent measurement from the DMM. Returns the most recent measurement string from the luminance meter.

3.5 Perform System Calibration


3.5.1 Description and Priority The Optics Lab has specific calibration requirements that must be met before measurements can be made. The system must acquire at least two calibration images to be applied as corrections to all images that are taken. This will use feature 3.1 to acquire the images. Priority = medium. 3.5.2 Stimulus/Response Sequences Stimulus: User requests to perform system calibration. Response: The system guides the user through the process of taking the calibration images and gathering the necessary data for calibrations. 3.5.3 Functional Requirements Get FFC Get BS Get photodiode calibration constant Get camera signal calibration constant The system guides the user through using the uniform source to take an image to serve as the FFC for the Camera. The system guides the user through the process of acquiring an image to be used for the background subtraction The system guides the user through using the white standard, power supply, and LS-100 to get a calibration constant for luminance. The system guides the user though the process of determining a calibration constant for converting the signal of the camera into luminance.

Software Requirements Specification for <Project>

Page 7

3.6 Store Measurement Data


3.6.1 Description and Priority The system will be able to create a device profile and store measurement data in the profile. 3.6.2 Stimulus/Response Sequences Stimulus: The user requests to save data acquired in features 3.1, 3.2, 3.3, or 3.5. Response: The system connects to a database and inserts the data. 3.6.3 Functional Requirements DB. Profile DB.StoreMeasurements The system creates a device profile for a device that includes information such as device name and model number as well as other qualities such as physical dimensions and display technology. The system stores the MTF, contrast, and reflection data calculated for a display. User information, date, and comments will also be recorded.

4. External Interface Requirements


4.1 User Interfaces
Live View UI: This user interface will present all of the instrument controls and the camera controls to the user in addition to a live view feed. The following commands will be present as interface elements Camera controls: Shutter Speed F-stop Focus Instrument controls Set power supply voltage Get amperage reading Get luminance meter reading Contrast and Reflection UI: This interface screen will provide the user with the option to select portions of the image to serve as the different regions for calculating contrast and reflection. An image selected for analysis will be displayed and the user will be given the option to pan and zoom on the image. The user will be able to select rectangular regions of any aspect ratio to serve as the regions for the dark, light, and replica mask area as required by the contrast and reflection procedures.

Software Requirements Specification for <Project>

Page 8

MTF Crop UI: This interface will allow the user to select a region of a test image to be cropped and sent to the MTF algorithm. The image will be displayed and the user will be able to pan and zoom. The user can select a rectangular region with both dimensions constrained to powers of 2.

4.2 Hardware Interfaces


4.2.1 Canon EOS 40D Digital Camera The Canon EOS 40D digital camera communicates with the computer over a USB cable. The camera uses the Canon EDSDK that allows for all of the cameras functionality to be controlled by the computer. 4.2.2 Agilent 3634a DC Power Supply The Agilent power supply communicates over the serial RS-232c interface and implements a set of Standard Commands for Programmable Instruments (SCPI). Commands are transmitted over the serial interface in the form of ASCII characters, and output from the instrument is also received as a string of ASCII characters. There is a predefined behavior for each command available in the documentation for the power supply.

4.2.3 Keithley 2000 Digital Multimeter The Keithley 2000 Digital Multimeter communicates over the RS-232c interface and implements a different set of SCPI commands. These commands are well documented in the instruments documentation. 4.2.4 Minolta LS-100 Luminance Meter The LS-100 communicates of the RS-232c interface and has a custom set of commands that are transmitted as ASCII characters. Output is in the form of ASCII strings with a predetermined format.

4.3 Software Interfaces


4.3.1 Canon EDSDK 2.8 The SDK for the camera is a series of libraries. The system will create a new instance of the EDSDK and call the functions in its libraries. The EDSDK defines its own set of data types, and manages all of the transactions between the camera and the PC. The system will send commands to the camera via the EDSDK per feature 3.1.Image.Camera. When the system executes a command, an error code will be retrieved. If the system requests to download an image, the EDSDK creates a memory stream, downloads the data into this stream, and then returns a pointer. See Canon EDSDK documentation for details.

Software Requirements Specification for <Project>

Page 9

4.3.2 Matlab Engine


The MATLAB Engine as a software interface used to pass information to and from MATLAB software installed on the host computer. A new instance of the MATLAB engine is created and arrays are passed back and forth through function calls from the host language.

4.3.3 Database The specific database technology has not been chosen yet.

4.4 Communications Interfaces


None specified at this time.

5. Other Nonfunctional Requirements


5.1 Performance Requirements
PE-1: The total time to take a measurement will be less than 15 minutes.

5.2 Safety Requirements


No safety requirements have been identified.

5.3 Security Requirements


No security requirements have been identified.

5.4 Software Quality Attributes


SQ-1: the Software will be accessible to low vision users and pass usability tests from a low vision expert if. SQ-2: the Software will emphasize repeatability within 5% variation between measurements. SQ-3: the Software will emphasize ease of use so the new users can be trained within two weeks.

6. Other Requirements
OR-1: the Software System and algorithms must meet all of the standards laid out in the measurement documentation provided to AFB Tech.

Software Requirements Specification for <Project>

Page 10

Appendix A: Glossary
Modulation transfer function (MTF): Conceptually, MTF is the response (contrast) of the screen at different spatial frequencies. This is represented as a function where f(x) is the contrast and x is the spatial frequency. Flat-Field Correction (FFC): Background subtraction: Reflection: the correction used to account for the fall off on the edges of the frame caused by the camera. this accounts for any hot pixels in the sensor of the camera. Reflection describes the amount of light reflected from ambient sources. When applied to the contrast formula, the reflection factors can calculate the level of contrast for any given design illuminance. a surface exhibiting diffuse reflection will reflect light in 180. An example of a diffuse reflector is a white sheet of copy paper. a surface exhibiting specular reflection will reflect light in one direction. An example of this is a mirror. the live view feature of the Canon camera that allows the user stream images from the sensor. emissive displays emit light in the form of a backlight. Most color LCD displays are emissive. purely reflective displays emit no light in a darkroom. These displays are usually monochrome LCD displays.

Diffuse Reflection: Specular Reflection: Live View: Emissive: Reflective:

Software Requirements Specification for <Project>

Page 11

Appendix B: Analysis Models

Figure 2: Instrumentation Diagram

Software Requirements Specification for <Project>

Page 12

Appendix C: Issues List


IS-1: the Canon .cr2 file is proprietary and not well documented. Raw data will give the most accurate results, but a demosaicking algorithm will need to be adopted.

Anda mungkin juga menyukai