Catalyzes the oxidative deamination of primary amines to the corresponding aldehydes with the concomitant production of hydrogen peroxide and ammonia. Its preferred substrates in vitro are the diamines histamine and 1-methylhistamine and it could therefore play a role in allergic and immune responses. Has a broad specificity for diamines and can also act on cadaverine and putrescine, two products of amino acid catabolism. It could also act on polyamines, like spermidine and spermine though less efficiently, and regulate various biological processes