VideoCapture.read() using OpenCV. Why is USB Camera faster than CSI Camera? (NO GPU)

I am using NanoPi Duo 2 for the real-time image acquisition project.

I have noticed a significant performance (speed) difference between using CSI camera and USB camera.

The performance difference is as follows, Time for OpenCV VideoCapture.read()

CSI_OV5640_Camera = ~0.04s (40 ms) USB_Logitech_HD_C270 = ~0.009 (9 ms) 

As far as I know, I understand that NanoPi Duo2 does not have any GPU and CSI camera will be handled by CPU (Same as USB Camera).

Using $ htop both CSI and USB cameras shows 100% @ one of 4 cores.

For background,

OpenCV 3.4.6 Build Output

Video I/O  - libv4l/libv4l2    NO  - v4l/v4l2          linux/videodev2.h 

$ v4l2-ctl –get-fmt-video

Format Video Capture:         Width/Height      : 640/480         Pixel Format      : 'YV12'         Field             : Any         Bytes per Line    : 960         Size Image        : 460800         Colorspace        : Default         Transfer Function : Default         YCbCr Encoding    : Default         Quantization      : Default         Flags             : 

One interesting thing Performance of using numpy ndarray from CSI and USB are ALSO different

pyzbar.decode() calculation CSI_OV5640_Camera = ~0.43s (430 ms) USB_Logitech_HD_C270 = ~0.19s (190 ms) 

I am thinking that encoding of the VideoCapture.read() are different but all I see is same sized (640×480, 3 colors) numpy ndarray with similar looking values.

Thank you for reading my question.

How to remove Ubuntu from a computer with a dual boot option (Ubuntu is on a separate SDD than Windows)

I’ve been using Ubuntu for quite some time now but I need to shift to Windows and I need the SSD which Ubuntu is taking. I have set up a dual boot option, one SSD is Windows 10 and the second is Ubuntu. I want to remove Ubuntu and be able to add that SSD to Windows 10 if that’s possible without reinstalling Windows.

Will signing messages with key derived from password work better than sending password

I was wondering recently how to create secure mechanism for sending password while log in to the system. Then i had wicked thought why to send password at all.

Let’s imagine mechanism where client sends user id who wants to be logged in, server “welcomes with bread and salt” by sending challenge and random salt.

Client calculate hash of concatenated salt and password, and then uses it as shared secret to calculate HMAC of challenge, and sends it back to server.

In this case login details are never shared across the network, and login message cannot be replayed.

But are they any downside of this which i didn’t thought about? And why it’s bad idea (I’m assuming is bad, as nobody is doing in this way)

Erro no Insert: There are more columns in the insert statement than values specified in the values clause

Quando vou dar um insert buscando dados a partir de outra tabela, esse erro é retornado, o que pode estar de errado com a query ?

INSERT INTO dbo.CRMRAT (IDCRMRAT, CODCOLIGADA, STATUS, TIPO, IDCRMCLIENTE, IDCRMCOLABORADOR, IDCRMPROJETO, DATA, HORAINICIO, HORAFIM, INTERVALO, KMDESLOCAMENTO, VALORPEDAGIO, VALORALIMENTACAO, VALORHOTEL, VALORESTACIONAMENTO, OUTRASDESPESAS, OBSERVACAO, USUARIOCRIACAO, DATACRIACAO, USUARIOALTERACAO, DATAALTERACAO, IDCRMFATURA, DATAFATURAMENTO)     VALUES ((SELECT MAX(IDCRMRAT) + 1 AS IDCRMRAT FROM CRMRAT ) , (SELECT CODCOLIGADA, STATUS, TIPO, IDCRMCLIENTE, IDCRMCOLABORADOR, IDCRMPROJETO, DATA, HORAINICIO, HORAFIM, INTERVALO, KMDESLOCAMENTO, VALORPEDAGIO, VALORALIMENTACAO, VALORHOTEL, VALORESTACIONAMENTO, OUTRASDESPESAS, OBSERVACAO, USUARIOCRIACAO, DATACRIACAO, USUARIOALTERACAO, DATAALTERACAO, IDCRMFATURA, DATAFATURAMENTO             FROM dbo.CRMRAT2 WHERE IDCRMRAT = 11 )) 

Erro apresentado:

inserir a descrição da imagem aqui

Which is the best way to deal with table, when we have more than 500 expandable list in a view page?

I have a view page in my application wherein I am listing the number of devices along with the device configuration details like protocol, Broker Ip, Payloads etc.I have designed this list in such a way that it expands on click and show the detailed information.

A we add more devices, this list keeps expanding and this list can go more than 500 or 1000 in some scenarios.

So which is the best way to deal with this complex expandable table list?

enter image description here

Why can’t I use any kernel greater than 4.2?

I’m pretty new in Linux. I used GNUU to download and install linux kernels and i manually downloaded every version newer than mine (4.18.0-25-generic) none of which worked. When I turned on my pc, i was left with a blank black screen and it wasn’t loading anything at all.

I read linux kernel >5 finally has some serious improvements with AMDs, and I’m deeply interessed in that. I recently had some freeze issues, and it turned out it was something related with KWin/compositor. (not sure if this is related).

This is my OS

Operating System: Kubuntu 19.04 KDE Plasma Version: 5.15.4 KDE Frameworks Version: 5.56.0 Qt Version: 5.12.2 Kernel Version: 4.18.0-25-generic OS Type: 64-bit Processors: 8 × AMD Ryzen 5 2500U with Radeon Vega Mobile Gfx Memory: 7,5 GiB of RAM 

This is my hardware

sclero                           description: Notebook     product: Swift SF315-41 (0000000000000000)     vendor: Acer     version: V1.02     serial: NXGV7ET00175005CC27200     width: 64 bits     capabilities: smbios-3.0 dmi-3.0 smp vsyscall32     configuration: chassis=notebook family=Swift 3 sku=0000000000000000 uuid=E003CDFF-4BE2-E781-2FFC-9822EF92F3FD   *-core        description: Motherboard        product: Becks_RR        vendor: RR        physical id: 0        version: V1.02        serial: NBGV511005750029DE7200        slot: Type2 - Board Chassis Location      *-firmware           description: BIOS           vendor: Insyde Corp.           physical id: 0           version: V1.02           date: 12/04/2017           size: 128KiB           capacity: 8128KiB           capabilities: pci upgrade shadowing cdboot bootselect edd int13floppynec int13floppytoshiba int13floppy360 int13floppy1200 int13floppy720 int13floppy2880 int9keyboard int10video acpi usb biosbootspecification uefi      *-cpu           description: CPU           product: AMD Ryzen 5 2500U with Radeon Vega Mobile Gfx           vendor: Advanced Micro Devices [AMD]           physical id: 4           bus info: cpu@0           version: AMD Ryzen 5 2500U with Radeon Vega Mobile Gfx           serial: Unknown           slot: FP5           size: 3344MHz           capacity: 3600MHz           width: 64 bits           clock: 100MHz           capabilities: x86-64 fpu fpu_exception wp vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp constant_tsc rep_good nopl nonstop_tsc cpuid extd_apicid aperfmperf pni pclmulqdq monitor ssse3 fma cx16 sse4_1 sse4_2 movbe popcnt aes xsave avx f16c rdrand lahf_lm cmp_legacy svm extapic cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw skinit wdt tce topoext perfctr_core perfctr_nb bpext perfctr_llc mwaitx hw_pstate sme ssbd sev vmmcall fsgsbase bmi1 avx2 smep bmi2 rdseed adx smap clflushopt sha_ni xsaveopt xsavec xgetbv1 xsaves clzero irperf xsaveerptr arat npt lbrv svm_lock nrip_save tsc_scale vmcb_clean flushbyasid decodeassists pausefilter pfthreshold avic v_vmsave_vmload vgif overflow_recov succor smca cpufreq           configuration: cores=4 enabledcores=4 threads=8         *-cache:0              description: L1 cache              physical id: 5              slot: L1 - Cache              size: 384KiB              capacity: 384KiB              clock: 1GHz (1.0ns)              capabilities: pipeline-burst internal write-back unified              configuration: level=1         *-cache:1              description: L2 cache              physical id: 6              slot: L2 - Cache              size: 2MiB              capacity: 2MiB              clock: 1GHz (1.0ns)              capabilities: pipeline-burst internal write-back unified              configuration: level=2         *-cache:2              description: L3 cache              physical id: 7              slot: L3 - Cache              size: 4MiB              capacity: 4MiB              clock: 1GHz (1.0ns)              capabilities: pipeline-burst internal write-back unified              configuration: level=3      *-memory           description: System Memory           physical id: b           slot: System board or motherboard           size: 8GiB         *-bank:0              description: SODIMM DDR4 Synchronous Unbuffered (Unregistered) 2400 MHz (0,4 ns)              product: 4ATF51264HZ-2G3B1              vendor: Micron Technology              physical id: 0              serial: 00000000              slot: DIMM 0              size: 4GiB              width: 64 bits              clock: 2400MHz (0.4ns)         *-bank:1              description: SODIMM DDR4 Synchronous Unbuffered (Unregistered) 2400 MHz (0,4 ns)              product: 4ATF51264HZ-2G3B1              vendor: Micron Technology              physical id: 1              serial: 00000000              slot: DIMM 0              size: 4GiB              width: 64 bits              clock: 2400MHz (0.4ns)      *-pci:0           description: Host bridge           product: Advanced Micro Devices, Inc. [AMD]           vendor: Advanced Micro Devices, Inc. [AMD]           physical id: 100           bus info: pci@0000:00:00.0           version: 00           width: 32 bits           clock: 33MHz         *-generic UNCLAIMED              description: IOMMU              product: Advanced Micro Devices, Inc. [AMD]              vendor: Advanced Micro Devices, Inc. [AMD]              physical id: 0.2              bus info: pci@0000:00:00.2              version: 00              width: 32 bits              clock: 33MHz              capabilities: msi ht bus_master cap_list              configuration: latency=0         *-pci:0              description: PCI bridge              product: Advanced Micro Devices, Inc. [AMD]              vendor: Advanced Micro Devices, Inc. [AMD]              physical id: 1.2              bus info: pci@0000:00:01.2              version: 00              width: 32 bits              clock: 33MHz              capabilities: pci pm pciexpress msi ht normal_decode bus_master cap_list              configuration: driver=pcieport              resources: irq:26 memory:e0900000-e09fffff            *-storage                 description: Non-Volatile memory controller                 product: Intel Corporation                 vendor: Intel Corporation                 physical id: 0                 bus info: pci@0000:01:00.0                 version: 03                 width: 64 bits                 clock: 33MHz                 capabilities: storage pm pciexpress msix nvm_express bus_master cap_list                 configuration: driver=nvme latency=0                 resources: irq:48 memory:e0900000-e0903fff         *-pci:1              description: PCI bridge              product: Advanced Micro Devices, Inc. [AMD]              vendor: Advanced Micro Devices, Inc. [AMD]              physical id: 1.7              bus info: pci@0000:00:01.7              version: 00              width: 32 bits              clock: 33MHz              capabilities: pci pm pciexpress msi ht normal_decode bus_master cap_list              configuration: driver=pcieport              resources: irq:27 memory:e0200000-e03fffff            *-network                 description: Wireless interface                 product: QCA6174 802.11ac Wireless Network Adapter                 vendor: Qualcomm Atheros                 physical id: 0                 bus info: pci@0000:02:00.0                 logical name: wlp2s0                 version: 32                 serial: 98:22:ef:92:f3:fd                 width: 64 bits                 clock: 33MHz                 capabilities: pm msi pciexpress bus_master cap_list ethernet physical wireless                 configuration: broadcast=yes driver=ath10k_pci driverversion=4.18.0-25-generic firmware=RM.4.4.1.c2-00057-QCARMSWP-1 ip=192.168.1.76 latency=0 link=yes multicast=yes wireless=IEEE 802.11                 resources: irq:60 memory:e0200000-e03fffff         *-pci:2              description: PCI bridge              product: Advanced Micro Devices, Inc. [AMD]              vendor: Advanced Micro Devices, Inc. [AMD]              physical id: 8.1              bus info: pci@0000:00:08.1              version: 00              width: 32 bits              clock: 33MHz              capabilities: pci pm pciexpress msi normal_decode bus_master cap_list              configuration: driver=pcieport              resources: irq:28 ioport:1000(size=4096) memory:e0500000-e08fffff ioport:d0000000(size=270532608)            *-display                 description: VGA compatible controller                 product: Raven Ridge [Radeon Vega Series / Radeon Vega Mobile Series]                 vendor: Advanced Micro Devices, Inc. [AMD/ATI]                 physical id: 0                 bus info: pci@0000:03:00.0                 version: c4                 width: 64 bits                 clock: 33MHz                 capabilities: pm pciexpress msi msix vga_controller bus_master cap_list                 configuration: driver=amdgpu latency=0                 resources: irq:50 memory:d0000000-dfffffff memory:e0000000-e01fffff ioport:1000(size=256) memory:e0800000-e087ffff            *-multimedia:0                 description: Audio device                 product: Advanced Micro Devices, Inc. [AMD/ATI]                 vendor: Advanced Micro Devices, Inc. [AMD/ATI]                 physical id: 0.1                 bus info: pci@0000:03:00.1                 version: 00                 width: 32 bits                 clock: 33MHz                 capabilities: pm pciexpress msi bus_master cap_list                 configuration: driver=snd_hda_intel latency=0                 resources: irq:62 memory:e08c8000-e08cbfff            *-generic UNCLAIMED                 description: Encryption controller                 product: Advanced Micro Devices, Inc. [AMD]                 vendor: Advanced Micro Devices, Inc. [AMD]                 physical id: 0.2                 bus info: pci@0000:03:00.2                 version: 00                 width: 32 bits                 clock: 33MHz                 capabilities: pm pciexpress msi msix cap_list                 configuration: latency=0                 resources: memory:e0700000-e07fffff memory:e08cc000-e08cdfff            *-usb:0                 description: USB controller                 product: Advanced Micro Devices, Inc. [AMD]                 vendor: Advanced Micro Devices, Inc. [AMD]                 physical id: 0.3                 bus info: pci@0000:03:00.3                 version: 00                 width: 64 bits                 clock: 33MHz                 capabilities: pm pciexpress msi msix xhci bus_master cap_list                 configuration: driver=xhci_hcd latency=0                 resources: irq:29 memory:e0600000-e06fffff               *-usbhost:0                    product: xHCI Host Controller                    vendor: Linux 4.18.0-25-generic xhci-hcd                    physical id: 0                    bus info: usb@1                    logical name: usb1                    version: 4.18                    capabilities: usb-2.00                    configuration: driver=hub slots=4 speed=480Mbit/s               *-usbhost:1                    product: xHCI Host Controller                    vendor: Linux 4.18.0-25-generic xhci-hcd                    physical id: 1                    bus info: usb@2                    logical name: usb2                    version: 4.18                    capabilities: usb-3.10                    configuration: driver=hub slots=4 speed=10000Mbit/s            *-usb:1                 description: USB controller                 product: Advanced Micro Devices, Inc. [AMD]                 vendor: Advanced Micro Devices, Inc. [AMD]                 physical id: 0.4                 bus info: pci@0000:03:00.4                 version: 00                 width: 64 bits                 clock: 33MHz                 capabilities: pm pciexpress msi msix xhci bus_master cap_list                 configuration: driver=xhci_hcd latency=0                 resources: irq:38 memory:e0500000-e05fffff               *-usbhost:0                    product: xHCI Host Controller                    vendor: Linux 4.18.0-25-generic xhci-hcd                    physical id: 0                    bus info: usb@3                    logical name: usb3                    version: 4.18                    capabilities: usb-2.00                    configuration: driver=hub slots=2 speed=480Mbit/s                  *-usb:0                       description: Video                       product: HD WebCam                       vendor: Chicony Electronics Co.,Ltd.                       physical id: 1                       bus info: usb@3:1                       version: 92.26                       capabilities: usb-2.00                       configuration: driver=uvcvideo maxpower=500mA speed=480Mbit/s                  *-usb:1                       description: USB hub                       product: USB2.0 Hub                       vendor: Genesys Logic, Inc.                       physical id: 2                       bus info: usb@3:2                       version: 88.32                       capabilities: usb-2.00                       configuration: driver=hub maxpower=100mA slots=4 speed=480Mbit/s                     *-usb:0                          description: Mouse                          product: G203 Prodigy Gaming Mouse                          vendor: Logitech                          physical id: 1                          bus info: usb@3:2.1                          version: 7.03                          serial: 0D8637603636                          capabilities: usb-2.00                          configuration: driver=usbhid maxpower=300mA speed=12Mbit/s                     *-usb:1                          description: Generic USB device                          product: USB2.0-CRW                          vendor: Generic                          physical id: 2                          bus info: usb@3:2.2                          version: 39.60                          serial: 20100201396000000                          capabilities: usb-2.00                          configuration: driver=rtsx_usb maxpower=500mA speed=480Mbit/s                     *-usb:2 UNCLAIMED                          description: Generic USB device                          product: EgisTec Touch Fingerprint Sensor                          vendor: EgisTec                          physical id: 3                          bus info: usb@3:2.3                          version: 10.41                          serial: 07029CDA                          capabilities: usb-1.10                          configuration: maxpower=100mA speed=12Mbit/s                     *-usb:3                          description: Bluetooth wireless interface                          vendor: Lite-On Technology Corp.                          physical id: 4                          bus info: usb@3:2.4                          version: 0.01                          capabilities: bluetooth usb-2.01                          configuration: driver=btusb maxpower=100mA speed=12Mbit/s               *-usbhost:1                    product: xHCI Host Controller                    vendor: Linux 4.18.0-25-generic xhci-hcd                    physical id: 1                    bus info: usb@4                    logical name: usb4                    version: 4.18                    capabilities: usb-3.10                    configuration: driver=hub slots=1 speed=10000Mbit/s            *-multimedia:1 UNCLAIMED                 description: Multimedia controller                 product: Advanced Micro Devices, Inc. [AMD]                 vendor: Advanced Micro Devices, Inc. [AMD]                 physical id: 0.5                 bus info: pci@0000:03:00.5                 version: 00                 width: 32 bits                 clock: 33MHz                 capabilities: pm pciexpress msi cap_list                 configuration: latency=0                 resources: memory:e0880000-e08bffff            *-multimedia:2                 description: Audio device                 product: Advanced Micro Devices, Inc. [AMD]                 vendor: Advanced Micro Devices, Inc. [AMD]                 physical id: 0.6                 bus info: pci@0000:03:00.6                 version: 00                 width: 32 bits                 clock: 33MHz                 capabilities: pm pciexpress msi bus_master cap_list                 configuration: driver=snd_hda_intel latency=0                 resources: irq:64 memory:e08c0000-e08c7fff         *-serial              description: SMBus              product: FCH SMBus Controller              vendor: Advanced Micro Devices, Inc. [AMD]              physical id: 14              bus info: pci@0000:00:14.0              version: 61              width: 32 bits              clock: 66MHz              configuration: driver=piix4_smbus latency=0              resources: irq:0         *-isa              description: ISA bridge              product: FCH LPC Bridge              vendor: Advanced Micro Devices, Inc. [AMD]              physical id: 14.3              bus info: pci@0000:00:14.3              version: 51              width: 32 bits              clock: 66MHz              capabilities: isa bus_master              configuration: latency=0      *-pci:1           description: Host bridge           product: Family 17h (Models 00h-0fh) PCIe Dummy Host Bridge           vendor: Advanced Micro Devices, Inc. [AMD]           physical id: 101           bus info: pci@0000:00:01.0           version: 00           width: 32 bits           clock: 33MHz      *-pci:2           description: Host bridge           product: Family 17h (Models 00h-0fh) PCIe Dummy Host Bridge           vendor: Advanced Micro Devices, Inc. [AMD]           physical id: 102           bus info: pci@0000:00:08.0           version: 00           width: 32 bits           clock: 33MHz      *-pci:3           description: Host bridge           product: Advanced Micro Devices, Inc. [AMD]           vendor: Advanced Micro Devices, Inc. [AMD]           physical id: 103           bus info: pci@0000:00:18.0           version: 00           width: 32 bits           clock: 33MHz      *-pci:4           description: Host bridge           product: Advanced Micro Devices, Inc. [AMD]           vendor: Advanced Micro Devices, Inc. [AMD]           physical id: 104           bus info: pci@0000:00:18.1           version: 00           width: 32 bits           clock: 33MHz      *-pci:5           description: Host bridge           product: Advanced Micro Devices, Inc. [AMD]           vendor: Advanced Micro Devices, Inc. [AMD]           physical id: 105           bus info: pci@0000:00:18.2           version: 00           width: 32 bits           clock: 33MHz      *-pci:6           description: Host bridge           product: Advanced Micro Devices, Inc. [AMD]           vendor: Advanced Micro Devices, Inc. [AMD]           physical id: 106           bus info: pci@0000:00:18.3           version: 00           width: 32 bits           clock: 33MHz           configuration: driver=k10temp           resources: irq:0      *-pci:7           description: Host bridge           product: Advanced Micro Devices, Inc. [AMD]           vendor: Advanced Micro Devices, Inc. [AMD]           physical id: 107           bus info: pci@0000:00:18.4           version: 00           width: 32 bits           clock: 33MHz      *-pci:8           description: Host bridge           product: Advanced Micro Devices, Inc. [AMD]           vendor: Advanced Micro Devices, Inc. [AMD]           physical id: 108           bus info: pci@0000:00:18.5           version: 00           width: 32 bits           clock: 33MHz      *-pci:9           description: Host bridge           product: Advanced Micro Devices, Inc. [AMD]           vendor: Advanced Micro Devices, Inc. [AMD]           physical id: 109           bus info: pci@0000:00:18.6           version: 00           width: 32 bits           clock: 33MHz      *-pci:10           description: Host bridge           product: Advanced Micro Devices, Inc. [AMD]           vendor: Advanced Micro Devices, Inc. [AMD]           physical id: 10a           bus info: pci@0000:00:18.7           version: 00           width: 32 bits           clock: 33MHz 

1k organic and social traffic with more than 30 Google adsense click for $3

1k plus organic and social traffic with more than 30 Google Adsense  click hello everyone I have launched a great promotion for google Adsense, Media net, and other alternative advertisement platforms, who can avail this awesome promotion at very cheap price.  1. My all traffic from the socail network, like Facebook, Pinterest, Reddit, vk and twitter. 2. All traffic from google, yahoo, Bing and Yandex search engine. 3. Rank your site in alexa.com 4. All my work are 100% safe and real for google Adsense and alternative platform. 5. Get more than 30 clicks to earn more than 5$ to 20$ . 6. Boost your CPC fast from 0.01 to 5$ .

by: STARHASSAN11
Created: —
Category: Traffic
Viewed: 266


iOS Settings Standards: Using Checkbox Rather Than Switch

If you are familiar with iOS devices, you know that the settings application uses the UISwitch control to show that a parameter is enabled or disabled. This control appears as a toggle switch and even has an animated switch motion that tracks the user’s finger as the switch slides from one side to the other.

On my iPad, I did notice an exception to this. A checkbox is used for what I would normally associate a radio button for.

The toggle switch takes up a significant amount of space on an iPhone, which I can put to better use.

I have access to the settings with a user interface from inside my application (and only from my app), and can depart from this practice of using the switch, by replacing it with a checkbox. (This would simply be a custom UIButton.) I am wondering whether there is a downside to doing this from the user experience perspective.

What is the smallest value of n such that an algorithm running at 100*n^2 operates faster than 2^n ? [How to figure out without brute force]

Okay, so I needed to find the smallest value of n such that algorithm 100*n^2 is faster than 2^n.

[what I have tried]

So, I instantly thought ‘0’. But, I then realized it can’t be 0, 0 implies that there are no digits being entered in the algorithm, it also implies that the program does not run or terminate.

I typed in 2^32 and got a number over 4 billion. Okay, this is good, I’m finding numbers that have 100*n^2 being faster than 2^n.

I halved that, n = 20.

I kept inserting values counting down until I got to n = 15.

I also counted up from n = 10, the answer is undoubtedly n = 15, but I have a problem . . . .I solved this using brute force and that isn’t good. What if I was given a bigger number and a larger bredth of numbers?

[What I need]

I need a way of finding the value instantaneously by only doing the math, I tried using logarithms, but my answer was wrong, my knowledge of logs is a bit rusty and I need a little help.

Think of it as a student trying to solve a question on an SAT or having a timer for a test.