sample high level requirements

Upload: barfine

Post on 04-Jun-2018

236 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/14/2019 Sample High Level Requirements

    1/17

    Copyright 2002 by Kar l E. Wiegers. Permission i s gran ted to use, modif y, and distr ibu te thi s document.

    Software Requirements Specificationfor

    Optics Lab MeasurementSystem

    Version 1.0

    Prepared by William Reuschel

    AFB TECH

    October 2010

  • 8/14/2019 Sample High Level Requirements

    2/17

    Software Requir ements Specif ication for Page ii

    Table of Contents

    Table of Contents .......................................................................................................................... ii Revision History ............................................................................................................................ ii

    1.

    Introduction ..............................................................................................................................1

    1.1 Purpose ........................................................................................................................................ 1 1.2 Document Conventions ............................................................................................................... 1 1.3 Intended Audience and Reading Suggestions ............................................................................. 1 1.4 Project Scope ............................................................................................................................... 1 1.5 References ................................................................................................................................... 1

    2. Overall Description ..................................................................................................................2 2.1 Product Perspective ..................................................................................................................... 2 2.2 User Classes and Characteristics ................................................................................................. 1 2.3 Operating Environment ............................................................................................................... 1 2.4 Design and Implementation Constraints ..................................................................................... 1 2.5 User Documentation .................................................................................................................... 1 2.6 Assumptions and Dependencies .................................................................................................. 1

    3. System Features ........................................................................................................................2 3.1 Acquire Image Data ..................................................................................................................... 2 3.2 Measure display Contrast and Reflection.................................................................................... 4 3.3 Calculate display MTF ................................................................................................................ 4 3.4 Control Instrumentation .............................................................................................................. 5 3.5 Perform System Calibration ........................................................................................................ 6 3.6 Store Measurement Data ............................................................................................................. 7

    4. External Interface Requirements ...........................................................................................7 4.1 User Interfaces ............................................................................................................................. 7 4.2 Hardware Interfaces .................................................................................................................... 8 4.3 Software Interfaces ...................................................................................................................... 8 4.4 Communications Interfaces ......................................................................................................... 9

    5. Other Nonfunctional Requirements .......................................................................................9 5.1 Performance Requirements ......................................................................................................... 9

    5.2 Safety Requirements .................................................................................................................... 9 5.3 Security Requirements ................................................................................................................ 9 5.4 Software Quality Attributes ........................................................................................................ 9

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

    Revision History

    Name Date Reason For Changes Version

    William Reuschel 10/16 Initial Draft 0.9

  • 8/14/2019 Sample High Level Requirements

    3/17

    Software Requi rements Specif icati on for Page 1

    1. Introduction

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

    1.2 Document Conventions

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

    1.3 Intended Audience and Reading SuggestionsThis document is intended for the AFB TECH Optics Lab team and the professors from Marshall Universityserving 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 Procedure Replica 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

    http://localhost/var/www/apps/conversion/tmp/scratch_9/users.marshall.edu/~reuschel3/docs/olms_vs.pdfhttp://localhost/var/www/apps/conversion/tmp/scratch_9/users.marshall.edu/~reuschel3/docs/olms_vs.pdf
  • 8/14/2019 Sample High Level Requirements

    4/17

  • 8/14/2019 Sample High Level Requirements

    5/17

    Software Requir ements Specif icati on for Page 1

    Figure 1: System Flow Diagram

  • 8/14/2019 Sample High Level Requirements

    6/17

    Software Requi rements Specif icati on for 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 majorfeatures of the system. The only purpose for the OLMS is to manage the measurements that the Technicianused to take.

    Database Administrator:This user will have access to the database for the purposes of backing up and restoring, and general databasemanagement.

    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 expertCO-2: The measurement algorithms used by the system must meet the prerequisites and assumptionsoutlined 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.

  • 8/14/2019 Sample High Level Requirements

    7/17

    Software Requi rements Specif icati on for 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. Thiswill not consist of any calibration procedures. The system will also have to signal the power supplyto 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. LiveView images will begin streaming to a picture box, and the user will be given the option to changecamera settings and then take a picture.

    3.1.3 Functional Requirements

    Image.Prepare The system prepares the instrumentation to take images. Thefollowing are executed at different times throughout the process.

    Image.Prepare.Darkroom The system prompts the user to turn off the lights.

    Image.Prepare.Exposure The system shall test the optimal exposure setting for thecamera. The highest signal should be 80% of maximum.Returns true if within acceptable range (75-85%).

    Image.Prepare.LampWarmup The system will count down from 15 minutes from when thelamp was turned on. The system will show an on screen timer.If the user attempts to perform an action involving acquiringmeasurement data during this time the system will warn the userthat the lamp may not be warmed up, but will not stop the userfrom performing that action.

    Image.Prepare.MaxIlluminance The system shall prompt the user to open the shutter. The systemwill check that the illuminance is above a threshold level. Thisthreshold level will be user configurable. The system willinform the user of the illuminance level and the threshold status.

    Image.Prepare.DisplaySetup The system prompts the user to find a suitable region of thescreen to measure, place a replica mask, and mount the displayon the sphere. The user will be presented with diagramsexplaining the physical setup.

  • 8/14/2019 Sample High Level Requirements

    8/17

    Software Requi rements Specif icati on for Page 3

    Image.Camera.LiveView The system shall utilize the live view function of the camera.This will enable the user to see the electronic view finder of thecamera through the computers display.

    Image.Camera.Focus The system shall allow the user to focus the camera.

    Image.Camera.ChangeSetting The system shall allow the user to change the shutter speed, ISOsetting, f-stop, and white balance of the camera. These settingsare displayed on screen.

    Image.Camera.TakePicture The system will make an exposure with the camera and store theimage data in memory. The image will be displayed for theuser s review.

    Image.Camera.ApplyCorrections The system will apply the background subtraction and flat fieldcorrection calibration images to the stored image.

  • 8/14/2019 Sample High Level Requirements

    9/17

    Software Requi rements Specif icati on for 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 andreflection properties of the display. This process will require a user interface, and the user willselect regions of the image to serve as the high, low, and masked areas. This feature may requireimages with different environment conditions, which will be specified in the detailed functionalrequirements. 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 aloaded 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 Loads an image that was saved in feature 3.1CR.Acquire.Foreground The system allows the user to select a rectangular region of the

    image to be the foreground. The system averages the values toobtain a single foreground value

    CR.Acquire.Background The system allows the user to select a rectangular region of theimage to be the background. The system averages the values toobtain a single background value

    CR.Acquire.Replica The system allows the user to select a rectangular region of theimage of the replica mask. The system averages the values toobtain a single replica mask value.

    CR.Calculate.SpecularExcluded.Emissive

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

    CR.Calculate.SpecularEncluded.ReflectiveCR.Calculate.SpecularIncluded.EmissiveCR.Calculate.SpecularIncluded.Reflective

    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 systemthen sends this data in bitmap form to a script running on the MATLAB engine that calculates theMTF of the image.

    3.3.2 Stimulus/Response Sequences

  • 8/14/2019 Sample High Level Requirements

    10/17

    Software Requi rements Specif icati on for 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 tothe MATLAB Engine.

    3.3.3 Functional RequirementsMTF.LoadImage The system loads the image selected by the user into a picture

    box.MTF.CropImage The system allows the user to select a rectangular region of the

    image to be analyzed. This region must be fitted to be 2 n x 2 m pixels in dimensions.

    MTF.SendData The system converts the cropped region of the image into valuesthat can be used by the MATLAB script and then sends the valuesto the MATLAB engine.

    MTF.ReceiveData 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 aresponse 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 willadjust accordingly.Returns true if successful.

    PS.GetVoltage Returns the voltage measured by the power supplyPS.SetAmps 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

    PS.GetAmps Returns the number of amps in scientific notation as measured by the power supply.

    PS.SetOVP 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 ofthe power supply. OVP turns voltage off and locks the PS untilreset.Returns true if successful

  • 8/14/2019 Sample High Level Requirements

    11/17

    Software Requi rements Specif icati on for Page 6

    PS.ResetOVP Resets OVP status.Returns true if successful.

    PS.SetOutput Sets the PS output to on or off.PS.SetRemote Sets the remote setting for the PS. When remote is on, the

    front panel controls are locked.Returns true if successful.

    DMM.SetMeasurementType Sets the measurement type to DC Volts or DC Amps.Returns true if successful.DMM.SetRemote Sets the remote status to true or false. If remote is true, the

    front panel of the DMM is locked.Returns true if successful.

    DMM.SetMeasurementFrequency Sets the frequency of measurement to slow or fast.Returns true or false.

    DMM.Fetch Returns the most recent measurement from the DMM.LM.GetLuminance 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 bemade. The system must acquire at least two calibration images to be applied as corrections to allimages 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 andgathering the necessary data for calibrations.

    3.5.3 Functional Requirements

    Get FFC The system guides the user through using the uniformsource to take an image to serve as the FFC for theCamera.

    Get BS The system guides the user through the process ofacquiring an image to be used for the backgroundsubtraction

    Get photodiode calibration constant The system guides the user through using the whitestandard, power supply, and LS-100 to get a calibrationconstant for luminance.

    Get camera signal calibration constant The system guides the user though the process ofdetermining a calibration constant for converting thesignal of the camera into luminance.

  • 8/14/2019 Sample High Level Requirements

    12/17

    Software Requi rements Specif icati on for 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 The system creates a device profile for a device that includesinformation such as device name and model number as well as other

    qualities such as physical dimensions and display technology.DB.StoreMeasurements The system stores the MTF, contrast, and reflection data calculated fora 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 inaddition to a live view feed.

    The following commands will be present as interface elementsCamera 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 asthe different regions for calculating contrast and reflection. An image selected for analysis will bedisplayed and the user will be given the option to pan and zoom on the image. The user will be ableto select rectangular regions of any aspect ratio to serve as the regions for the dark, light, and replicamask area as required by the contrast and reflection procedures.

  • 8/14/2019 Sample High Level Requirements

    13/17

    Software Requi rements Specif icati on for 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 theMTF algorithm. The image will be displayed and the user will be able to pan and zoom. The usercan 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. Thecamera uses the Canon EDSDK that allows for all of the cameras functionality to be controlled bythe 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 theserial interface in the form of ASCII characters, and output from the instrument is also received as astring of ASCII characters. There is a predefined behavior for each command available in thedocumentation for the power supply.

    4.2.3 Keithley 2000 Digital Multimeter

    The Keithley 2000 Digital Multimeter communicates over the RS-232c interface and implements adifferent set of SCPI commands. These commands are well documented in the instrumentsdocumentation.

    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 aretransmitted as ASCII characters. Output is in the form of ASCII strings with a predeterminedformat.

    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 theEDSDK and call the functions in its libraries. The EDSDK defines its own set of data types, andmanages 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 todownload an image, the EDSDK creates a memory stream, downloads the data into this stream, andthen returns a pointer. See Canon EDSDK documentation for details.

  • 8/14/2019 Sample High Level Requirements

    14/17

    Software Requi rements Specif icati on for Page 9

    4.3.2 Matlab Engine

    The MATLAB Engine as a software interface used to pass information to and from MATLAB softwareinstalled 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 DatabaseThe 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 expertif.

    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 RequirementsOR-1: the Software System and algorithms must meet all of the standards laid out in the measurement

    documentation provided to AFB Tech.

  • 8/14/2019 Sample High Level Requirements

    15/17

    Software Requi rements Specif icati on for Page 10

    Appendix A: GlossaryModulation 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) isthe contrast and x is the spatial frequency.

    Flat-Field Correction (FFC): the correction used to account for the fall off on the edges of the framecaused by the camera.

    Background subtraction: this accounts for any hot pixels in the sensor of the camera.

    Reflection: Reflection describes the amount of light reflected from ambient sources.When applied to the contrast formula, the reflection factors can calculate thelevel of contrast for any given design illuminance.

    Diffuse Reflection: a surface exhibiting diffuse reflection will reflect light in 180. An exampleof a diffuse reflector is a white sheet of copy paper.

    Specular Reflection: a surface exhibiting specular reflection will reflect light in one direction. Anexample of this is a mirror.

    Live View: the live view feature of the Canon camera that allows the user stream imagesfrom the sensor.

    Emissive: emissive displays emit light in the form of a backlight. Most color LCDdisplays are emissive.

    Reflective: purely reflective displays emit no light in a darkroom. These displays areusually monochrome LCD displays.

  • 8/14/2019 Sample High Level Requirements

    16/17

    Software Requi rements Specif icati on for Page 11

    Appendix B: Analysis Models

    Figure 2: Instrumentation Diagram

  • 8/14/2019 Sample High Level Requirements

    17/17

    Software Requi rements Specif icati on for Page 12

    Appendix C: Issues ListIS-1: the Canon .cr2 file is proprietary and not well documented. Raw data will give the most accurateresults, but a demosaicking algorithm will need to be adopted.