Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.
The DjVu Imager program is intended to DjVu-encode the scans containing the half-tone illustrations and photos. The program is a freeware and is covered by the "GPL 2 and later" license.
Read more here: http://www.djvu-soft.narod.ru/scan/djvu_imager_en.htm
It would be interesting to compare the results of your approach with those of http://jwilk.net/software/didjvu.