Matlab based image adapter for hama beads