Psychology Project

Back

Task

This is the email for the job I first received

create a program that displays random images on a screen at a very quick rate, and then measures some simple physiological data through the parallel port. Apparently someone had a go at it but could not resolve issues with the amount of time the images were required to appear (50 milliseconds each).

In the end the actual task was to display a mask image for 100ms then a image meant to provoke a response from the viewer for 50ms there are three sets of images neutral negative and positive I had to repeat the three times in a set pattern once this was complete the sequence starts from the beginning but the mask image is displayed for 100ms like before but the response image is left for 750ms at the end of each sequence several valance and arousal prompts must be shown to make the viewer gauge their feelings towards the sequence which is registered on a parallel port device. Also the program must run a practice set of sequences negative and positive when begun to integrate the viewer into the system.

Personal Requirements

This was an individual paid project so I was required to complete the entire project by myself.
I had a supervisor the head of the Murdoch Psychology IT department, and a Client who required the software for her end of degree Psychology Thesis.

How it went

This project was passed around university by various lecturers I thought it sounded interesting and I was not sure I could complete it, I decided to attempt it I began trying to use Ogre and a flat mesh to hold the images in the end I used the CImg API which was much more suitable to the requirements and the Graphics Magic plug-in to process the jpeg images since CImg doesnít support jpeg without an external library to read them in.

I was given a CD of images in five separate folders the images were in jpg format many were more than 1meg in size the images themselves were random sizes although the average image was 800x600 I recompressed all the images so they were between 25-100kb each and installed graphics Magic package to allow the CImg library to read the Jpeg format.

Unfortunately since the program displays still images one at a time it isnít possible to have screenshots demonstrating my work so I have had to record three short amateur video clips to show the program working and I have two relevant pictures to show as well.

This file is the config.ini file loaded into the program at runtime. It controls the frequency of the Valance and Arousal screen prompts, console output, sequence Reporting which is sending data to the com port, the display time for masks and normal images in both long and short mode, what filename to save image data from the dynamic loading image process, how long sequences last and the pool of random number validity one of the program constraints was of the 70 images provided no two can be the same in a row and no image may be shown more than six times in total. This image was provided by the student requesting the program it is the Valance screen where the user is prompted to rate their feeling towards the sequence just watched on a com port device. This screen along with the Arousal rating screen is displayed thirty times over the full programs execution.


I have included three short movies here since it is the only reliable way to communicate the programs function still images just don't work with a image based program.

This movie shows running the program and editing the config.ini file, it briefly notes the parsing of the config.ini file if any value is read badly the program resorts to hard coded values to prevent out of range or bad config file issues, it mentions a small conflict between the CImg class and the Graphics Magic package this is referring to the text that is echoed to the console each time an image is loaded saying a local resource failed to load however the image loads correctly and the program works as it should I believe the conflict is with CImg and Graphics Magic failing to communicate properly when loading images. This movie shows the introduction sequence and the first Valance and Arousal prompt. The movie shows the console output which at this point is mainly tests and echoing the random number generation statistics, I also briefly mention the com port device used to gather user data when the Valance and Arousal stage is entered.
This movie shows the main sequence using the Neutral sequence I go into more detail about the random number generation even though its a small part of the overall program I seem to get quite sidetracked on the topic. The console shows the sequence data and reports on data send to the parallel port.

Problems Encountered

  • Incomplete and Incorrect requirements list
  • Conflicts between hardware and software ideaologies
  • Conflicting time requirements with other units for degree
  • Lack of timescale for project
  • Problems Resolved

  • Incomplete and Incorrect requirements list was an ongoing issue mainly through the client giving requirements to the supervisor who them diseminated them to me incorrectly several times this was fixed by repition and going over the requirements many times, also restructuring parts of the code to reflect the end product requirements.
  • Conflicts between hardware and software ideaologies The supervisor was set on using hardware interrupts and very low level timing functions that havent been supported since Win98 this wasent to much of an issue since I had no access to a reliable way to use this feature since it was unsupported by the target platform, however this didnt stop the many discussions over the subject for no reason.
  • Conflicting time requirements with other units for degree this was resolved mostly by putting this project on the backburner while i completed other assignments and exams for my degree this was mainly due to a lack of pressure from the supervisor for the project allowing me the freedom to work on other projects as required.
  • Lack of timescale for project The supervisor was very resistant to giving an exact timescale for the project or any milestones throughout. This was a very bad approach for me since it left me without any sense of urgency to complete the work.
  • Conclusion

    I ended up completing the job mainly just to see if it was possible for me. Luckily it was and I gave to the client a installation file full documentation on the program and its features complete with source code and Doxygen documentation and of course then I spent the following 2-3 weeks in lengthy conversations with the client because they hadn't read any of the documentation and I was given some wrong requirements by the project coordinator. In the end everything went well the program performed as required with minor modifications to a config.ini text file that is read in at runtime and I can successfully tick of the first paid programming job milestone on my resume :).