Image processing in middle-school mathematics - IEEE Xplore

1 downloads 0 Views 493KB Size Report
ABSTRACT. Image processing by computer can play an important motivational role in middle-school mathematics. The fact that digital images are represented ...
IMAGE PROCESSING IN MIDDLE-SCHOOL MATHEMATICS Steven L . Tanimoto

Department of Computer Science and Engineering, FR-35 University of Washington Seattle, Washington 98 195 USA Email: tanimotoQcs.Washington. edu ABSTRACT

of perceived relevance of mathematics to students’ futures, outmoded curricula and teaching metho is, and cultural tenets that mat,h is “hard,” “nerdy,” arid “uncool.” The convergence of cheap and powerful personal computers with high-quality graphics is enabling a host of new ways to teach and learn mathematics. One approach involves the use of scanned imagery. Unlike other graphical approaches, it has the power t o make an immediate and direct connection between the real visual world of the student and the world of mathematical objects. Students of diverse backgrounds and inclinations can all enter this world comfortably and on a culturally equal footing, because they customi ae it for themselves in the capturing of their own imafes. Finally, image processing is a highly relevant domain, extremely rich in mathematical ideas and potenti? 1 learning activities.

Image processing by computer can play an important motivational role in middle-school mathematics. The fact that digital images are represented by arrays of numbers attests to the relevance of mathematics in the exciting realm of visual imagery. The project “Mathematics Experiences Through Image Processing” has developed software and activities that offer alternative experiences in arithmetic, algebra, problem-solving, geometric transformations, and digital representation. This paper describes some of the software, learning activities, issues we have faced and insight>swe have gained from o u r experiences thus far.

1. INTRODUCTION In our project, “Mathematics Experiences Through Image Processing,” our group at the University of Waqhington h a s been exploring ways to introduce image processing to middle-school and high-school students with the goal of improving their attitudes towards matthematics. A combination of tightly structured learning activities with more exploratory ones permits students to acquire concepts, skills and terminology while developing feelings of empowerment and self-confidence in the use of mathematics with image processing. Our experiments at the public, inner-city Meany Middle School in Seattle, use custom software that runs on PC-486 computers under Microsoft Windows 3.1.

1.2. Recent Activity During the past two years, we have directed a program at the Meany School that engaged 25 eighthgrade students in 5 hours of image processin(; activities distributed over seven class meetings. Also, we have twice run a digital image processing coiirse for high-school students during the summer betwecn their junior and senior years.

2. EXPERIENCE WITH THE PIXEL CALCULATOR 2.1. Software Description

1.1. Rationale

The “Pixel Calculator” is a program that suppcrts display and manipulation of black-and-white images with an interface that is simultaneously visual and numerical. It is designed to present essential capabilities in a clear unintimidating manner. A Windows 3.1 menu bar presents standard options such as loading and saving

Abilities and attitudes of American students towards mathematics rank low according to international surveys [l]. Contributors to the problem include lack This work was supported in part by NSF Grant No. MDR9155709

501

0-8186-6950-0/94 $4.00 0 1994 IEEE

Figure 1: Screen shot of the Pixel Calculator program.

Figure 2: The math teacher “doctored” ‘)y a student using the Pixel Calculator.

files, printing and quitting. Viewing options permit disabling either the shades-of-gray display or the numerical display of pixel values. A zooming t,ool can be used to magnify or demagnify the image by successive powers of 2. Modification of pixel values is achieved through the use of a selection tool (any rectangular group of pixels can be selected) and a calculator-style interface. The calculator is conventional in appearance and function, except that a special I‘#” key is provided that permits entering a reference to the current pixel value(s) in a calculation. The results of each calculation automatically replace the values of the selected pixels. A screen shot from the Pixel Calculator is shown in Fig. 1, where the image has been magnified enough so that individual pixel values are visible.

image, students quickly learn that higher values correspond to brighter pixels and lower values *,odarker. In addition, it is typical for some students ,o shout out things like, “I found a 253!” Through such communication, they share with the rest of the :lass a sense of confidence in their ability t o do computer-based image/math activities. This activity of reporting winning p i x h is further enhanced conceptually by having students record the t and y coordinates (reported by the program on the status line) of the pixels they find. In repeated observations of students of ages 7 to 17, we discovered that almost all students new to interactive image processing need t o “edit ’ images, or rather, doctor them. The first thing the!. want to do with a picture of another person is to add imoustache, blacken out a tooth, add horns, or make clther “embellishments.” While in one of our first trials, we sought to discourage such “naught,iness,” we soor came t o see it as a natural part of students’ “taking possession” of the technology. With the Pixel Calculatoi, this embellishment activity becomes both a confidc nce-building activity and an opportunity t o build fluellicy with the calculator-based process of modifying piji els. A sample product of the embellishment activity lby one of the Meany School students is shown in Fig. 2. The “victim” here was the math teacher.

2.2. Inspecting Pixels and Changing Them

A student’s first experiences with image processing are crucial in terms of future motivation. It is important that students immediately get a feeling of empowerment and self-confidence with the technology. Consequently, the METIP introduct,ory activities have immediate psychological rewards but are conceptually simple. After launching the program, a student’s first step is to load an image. The visual feedback of seeing the loaded image is reassuring to a new user. The student’s next steps are to zoom into various areas of the image to discover what it looks like “up c l o ~ e . ~After ’ seeing the pixels appear as gray squares, students are typically a little surprised and intrigued to see the numbers on the pixels, which appear automatically at a slightly higher magnification. Challenged to find the highest-valued pixel in their

2.3. Contrast Enhancement

After students have doctored enough, they are ready t o do actual calculations with image values rather than simply enter constants. Fixing underexposed pictures or darkly-lit areas of otherwise acceptable pictures is

502

Figure 4: Result of decoding a message in a “mystery image.”

Figure 3: The result of calculating 255 - #: the photographic negative.

3. EXPERIENCE WITH IMAGE WARPING as easy as entering “* 4” on the calculator. Stretching the contrast in other parts of the 0-255 grayscale range is easily done with a combination of subtraction, multiplication, and addition. Photographic negation is closely related to contrast enhancement since it is also represented by a linear function on pixel values, in this case f = 255 - #. This is shown in Fig. 3.

Many students get ecstatic about image warping as soon as they have successfully “disfigured” their teacher or friends. The effects are so immediate and coripelling that students are more than happy to show off t heir images or even spend extra time on warping. We have encountered two challenges in using the Warper in mathematics class. The first is exjdaining to teachers and parents where the mathematics lies in the activity. The formula for the warping is rclatively complex and hidden from view. The effects stem too entertaining to really have anything to do wit11 mathematics. The second challenge is guiding the students in their warping just enough so that they becorie more aware of the mathemat,ics, without in any way being discouraged by that connection. The answer to both problems is a multifaceyed one. First, the importance of the NCTM Standards must be stressed to parents and teachers, and one must show how image processing in general and image Rarping in particular are “new relevant content” in theinselves. Second, after the students have been able to play for an hour or two, some focused activities and discussions must be undertaken that highlight the concept of a transformation, the invertibility of transformations, the control of transformations using line segmeiits, and emergent effects from the repeated applicatioi~of one transformation.

2.4. Discovering Hidden Messages

Once students are fluent in the use of the Pixel Calculator to enhance the contrast in images, they are prepared to solve puzzles that we call “mystery images.” These images have messages hidden in them, and they require fairly particular contrast-enhancement operations in order to be revealed. A decoded message from a mystery image can be seen in Fig. 4. These activities with the Pixel Calculator all deal with digital images in a way that makes a clear connection with traditional K-12 mathematics; there is use of arithmetic in specifying the contrast and brightness changes, and there is use of Cartesian coordinates i n reporting pixel positions. The “pixel key” labelled # allows the use of a variable in the linear functions used for negation and contrast enhancements, and this is a good subject for discussion before students begin using variables more formally in algebra. In contrast, our second software module, the Image Warper, offers a different line of activities - ones whose relationships to mathematics have to be more carefully explained to teachers and parents, since the mathematics involved is neither traditional nor explicit.

4. CONVOLUTION

Once students are familiar with digital image representation and contrast enhancement, they are intellectu-

503

Figure 6: Screen shot of the Convclver. Figure 5 : Screen shot of the Image Warper. 5. METIP PROGRAMMING

ENVIRONMENT After developing the Pixel Calculator ant1 the Image Warper, we decided to package certain iniage display and interaction functionality into an applications program interface so that subsequent prototyp ng of experimental METIP modules could be done eluickly, and not necessarily in C++. The resulting slftware system we call the “METIP Programming Environment.” It currently operates with two different high-level languages (XLISP-STAT and Visual Basic) as well as with c/c++. Aside from its value in prototyping neu modules, it may be attractive, in the future, to introdlice students to computer programming in an image-oriented context using this environment. Such an approach would share, with Logo and its turtle graphics, the idea of using a controllable visual domain t o give meaning to the programming activity for students. (In the other hand, the graphical objects that it manipLlates are directly derived from the students’ real wc rld, helping some students feel more at ease.

ally prepared for certain more complicated operations. The notion that nearby pixels can have their values combined arithmetically to compute a new pixel value is simple enough that high-school students can at least get a general sense of one kind of image convolution as an image transformation process. A program that we call the “Convolver” has been developed to support an introduction t o the subject of digital image convolution. The Convolver (see Fig. 6) offers multiple visualizations of convolution, including single-neighborhood application, animated scanning application, full-speed large-area application, and instantiation of the arithmetic formula at each neighborhood. In addition, the user may edit kernels (see Fig. 7) of dimensions up to 5 x 5 or load pre-edited kernels from a file. Normalization of the convolved image is handled automatically and adaptively (dependent upon the kernel), but information is displayed showing what normalization is being applied. The Convolver software includes the Pixel Calculator functionality so that the user may conveniently inspect or enhance the image resulting from convolution. We have tested the following learning activities with a group of 15 high-school students: smoothing t o make it easier t o see a face in a blocky image, edge enhancement for an “embossed” effect, and corner detection (to suggest one aspect of computer vision).

6. ATTAINING THE NCTM STANDARDS

Image processing activities can help in a1 tainment of the Standards f o r Curriculum and Evaluation of School Mathematics proposed by the National Col ncil of Teachers of Mathematics [2]. A full discussion riust address curricular content, communication, probtem solving, and much more than space permits here. Let us mention two interesting aspects.

504

One activity that we arranged for the students was so stimulating that the class got out of control, and

the activity had to be modified. (We had taken digital photos of groups of 2 to 5 students at a time and preloaded them onto the hard disks of the rrlachines in the lab; when the students discovered that tlifferent machines had different images, they became o\erly excited, running around the room t o see all the pictures.) On the other hand, some activities were less iuccessful in arousing student interest, and students required substantial encouragement to complete them. Image processing can help, in numerous w ~ y s at, tainment of the NCTM standards. Digital image processing should be taught not only for its mathematics connections, but also for its own sake. It is relevant new content that should be part of the K-12 curriculum, possibly integrated with mathematics, science, trt, and English (with multimedia authoring). Figure 7: The kernel-editing window of the Convolver.

8. SOFTWARE AVAILABILITY

The Pixel Calculator and Image Warper are beiiig made freely available to K-12 teachers who are willing to experiment with them in their classes and report their findings back to the METIP project. Furthcr information, including an order form, is available on the World-Wide Web at the URL: http://www.cs.washington.edu/research/metip/

6.1. Mathematical Modelling Issues

The Pixel Calculator, while it provides a non-threating but mathematical interface t o images, performs “pixel arithmetic,” not real arithmetic. As such it provides an excellent example of a mathematical system, consistent within itself, that is at once different from t,raditional arithmetic and very important in the real world [3]. Another modelling concept that METIP activities highlight is resolution, fundamental not only in imaging but also in audio and other digital representations.

9. ACKNOWLEDGEMENTS

The author would like to thank L. Bricker, C.3. Fain, P. Goldenberg, J. King, A. Kullavanijaya, M. LeBrassuer, D. Lee, S. Monk, A. Rothenberg and the National Science Foundation for their contributions to tilose aspects of the METIP project described here.

6.2. Connections There are numerous connections between image processing and nonmathematical subjects. In mathematics, while the Pixel Calculator emphasizes arithmetic, it is also easy t o use it in discussions of area, ratio, stat,is tics, shape, powers of 2 and many non-t,raditional, as well as traditional, topics.

10. REFERENCES

[ 13 National Research Council Board on Mat hematical Sciences and Mathematical Sciences Education Board. Everybody Counts: A Report t o tht Nation on the Future of Mathematics Education Washington, DC: National Academy Press. 1989.

7. CONCLUSIONS Image processing does indeed have the potential to motivate students t o learn more mathematics. Particular students respond differently to different activities. Although our objective was t o improve students’ attitudes towards mathematics, we found that the students had two other needs which we could also satisfy: (a) a need t o know basically what image processing is, regardless of .its connections to mathematics and other subjects, and (b) a need to work with a computer using something other than a video game or a word processor.

[2] National Council of Teachers of Matht:mat.ics, Curriculum and Evaluation Standards for School Mathematics, Reston, VA: NCTM, 1989. [3]Tanimoto, S. L., King, J. R., and Lee, I). Pixel arithmetic in mathematics education through image processing. Technical Report 93-05-08,Department of Computer Science and Engineering, University of Washington. Seattle WA. Ma.y, 1993.

505

Suggest Documents