From the practical requirements of new astronomical photoelectronic imaging detectors, much attention has been paid to the design of new permanent magnet focusing field systems, in which curved input-image and demagnification are allowable. The constrained inverse design of the focusing magnetic field in electrostatic and magnetic imaging systems applying new permanent magnet materials is discussed and investigated using the constrained optimization constrained variable metric (CVM) method.