2

I am trying to install opencv 3.4.12 in rpi4.

AFAIK, Enabling Neon flag can accelerate the performance. But in cmake output I observe that Neon feature is not detected as CPU/HW feature. (cmake ouput below)

--   CPU/HW features:
--     Baseline:
--       requested:                 NEON
--       disabled:                  VFPV3 NEON

Whereas when i run check CPU info i can see the neon flags.

pi@raspberrypi:~ $ cat /proc/cpuinfo
processor   : 0
model name  : ARMv7 Processor rev 3 (v7l)
BogoMIPS    : 108.00
Features    : half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt vfpd32 lpae evtstrm crc32 
CPU implementer : 0x41
CPU architecture: 7
CPU variant : 0x0
CPU part    : 0xd08
CPU revision    : 3

processor   : 1
model name  : ARMv7 Processor rev 3 (v7l)
BogoMIPS    : 108.00
Features    : half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt vfpd32 lpae evtstrm crc32 
CPU implementer : 0x41
CPU architecture: 7
CPU variant : 0x0
CPU part    : 0xd08
CPU revision    : 3

processor   : 2
model name  : ARMv7 Processor rev 3 (v7l)
BogoMIPS    : 108.00
Features    : half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt vfpd32 lpae evtstrm crc32 
CPU implementer : 0x41
CPU architecture: 7
CPU variant : 0x0
CPU part    : 0xd08
CPU revision    : 3

processor   : 3
model name  : ARMv7 Processor rev 3 (v7l)
BogoMIPS    : 108.00
Features    : half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt vfpd32 lpae evtstrm crc32 
CPU implementer : 0x41
CPU architecture: 7
CPU variant : 0x0
CPU part    : 0xd08
CPU revision    : 3

Hardware    : BCM2711
Revision    : b03114
Serial      : 100000005ce5f0a0
Model       : Raspberry Pi 4 Model B Rev 1.4

Can anyone point me what am i doing wrong here ?

5
  • You are misinterpreting the junk data you get from /proc/cpuinfo. It was broken by the Linux kernel developers.
    – Dougie
    Commented Feb 13, 2021 at 9:28
  • 1
    So do you mean rpi4 doesnt have neon supported ? Or is there any update in kernal that can fix this ?
    – Mayank
    Commented Feb 13, 2021 at 11:28
  • No. I mean that cpuinfo incorrectly reports what the CPU can do. Should get fixed with the switch to aarch64.
    – Dougie
    Commented Feb 13, 2021 at 16:53
  • @Dougie I'm pretty certain the Pi 4 supports VFPV3 and NEON. If you claim the opposite, do you have any links for a reference? Commented Feb 15, 2021 at 11:57
  • @DmitryGrigoryev I'm saying that the kernel reports it incorrectly for ARM8. But gets it right with AARCH64. Because the ARM support in the kernel is broken.
    – Dougie
    Commented Feb 16, 2021 at 23:00

1 Answer 1

1

This appears to be a bug which is fixed in version 3.4.13. A possible workaround is to pass -DENABLE_NEON to cmake.

1
  • Thanks for pointer. I haven't checked the same...i will accept it as answer ASA i can get this working on my board. Thanks again.
    – Mayank
    Commented Feb 15, 2021 at 15:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.