Implementation of an ionizing radiation detector based on a FPGA-controlled COTS CMOS image sensor