Coronal densities and magnetic fields from K-coronameter and type IV radio burst data