This paper proposes an experiment
in which students build microdevices
for conveniently electrolyzing water and use image recognition and
processing technology to measure the volume of gas generated during
the reaction in a noncontact way. Taking advantage of three ratio
relationships between (i) gas volume and the area of bubbles, (ii)
the factual size and the size on the picture, and (iii) the area on
the picture and the pixel number, the experiment converts the measurement
of trace gas volume into measurement of bubbles’ pixel number
on the picture, which simplifies the complex problem. The device includes
pencil refills as the electrodes, compressing the reaction space in
the interval between two glass slides to squeeze the gas generated
into flat-cylinder shaped bubbles with a fixed height. The students
use a smartphone to take pictures and use software to process the
images. Briefly, edges of bubbles are recognized and enhanced by PowerPoint,
followed by a cutout process by Photoshop to get the bubbles’
image without the background; a histogram tool is then used for analyzing
the pixel number of bubbles to finally get the volume of hydrogen
and oxygen. Results of the survey among participating students proved
the pedagogical effectiveness of this project.