Well, sorry...Sony has spent billions on their image sensor division. They have built a couple of fabs over the last number of years, which clock in at a couple billion a piece. They have also spent billions designing, prototyping, and and otherwise researching CMOS devices, image sensors, high density screens (like those in their mirrorless cameras), etc. Sony at large is somewhere around 60 billion in debt, and a fairly significant fraction of that has to do with just their CMOS unit related to image sensors and cameras. I did not actually mean to say they literally spent tens of billions just on the R&D for the patents themselves...the patents are just a natural byproduct of all the rest.
Canon has about 2,500 patents a year. If you found 27 relating to their primary part for their main division, I'm inclined to believe that's not an accurate assessment. 27 out of some 10,000 doesn't seem very realistic.
Same could really be said about Sony. As you stated, Sony also has oodles of other business units, and they file thousands of patents a year as well. Be it 27 or 60, neither really makes up a significant fraction of the total number of patents filed. However, using PatentFish, each of my searches only seemed to result in at most 64 results each. Out of three or four searches of 64 each, that is only around 200 patents total that I found in my PatentFish searches. In which case, 27 and 60 are much more meaningful percentages. Either PatentFish simply has a limit on searches, capping them at 64, or they just don't track all 2000 or so patents filed each year by these companies. Either way...in context, I don't think my numbers are all that bad.
It should be noted that Canon has a LOT of patents related to medical devices, particularly optics or IC devices that support their medical imaging devices. I'd say the majority of the patents I found were medical or memory related. Canon also has quite a lot of patents related to their printer division, particularly print heads. I'd have to say I saw around 18-20 patents for printer related stuff, the majority of which were print head patents. There were also a few semiconductor fab patents scattered here and there from both companies.
I should note that I was explicitly looking for patents that dealt directly with CMOS Image Sensors for use in digital cameras. Not just DSLRs, but digital cameras in general, of all forms. Yes, everything Canon does is imaging related, but the number of patents that I could find that dealt directly with CIS was lower than what I could find for Sony. It seemed Canon had a few patents per page dealing directly with CIS. It seemed in most cases almost all of the patents on each page for Sony dealt directly with CIS, and on more fronts than Canon (particularly on the small form factor front...small sensors for phones, tablets, small cameras, etc. as well as image sensor and image processor packaging, interlink, etc.) Both companies also had quite a number of CIS patents that seemed to be nearly identical...high efficiency CFA designs, High-k gates, strained silicon processes for use in CIS, parallel sensor readout and amplification, block readout and amplification, analog noise reduction in similar forms, etc.