星期五, 12月 06, 2019

炬为Type-C PD多功能usb测试仪充电器检测仪直流数显电压表电流表

炬为Type-C PD多功能usb测试仪充电器检测仪直流数显电压表电流表

Type-c PD双向电流 一屏多数据显示 USB多口

彩屏版的是USB3.0的接口 ,USB3.0的接口比黑白屏USB2.0的区别是USB3.0支持更多的快充协议比如华为的10V4A和OPPO的闪充等超级闪充,向下兼容USB2.0的QC2.0、QC3.0、MTK快充等 彩屏版还新增三个功能(Type-c双向电流显示,屏保和屏幕翻转 ),不过都带有Type-c 接口 都支持PD3.0 PD3.0的快充协议,彩屏和黑白屏价格只相差2元 推荐购买彩屏版本 性价比比较高。关于U3.O兼容U2.0接口的温馨提示: 如果插入的USB母座不是蓝色的表示为USB2.0,而本表此次采用的A公USB3.0的兼容接口,如果要插到2.0接口,有极少数的需要稍微拔出来少少就能牢固接触,如果是插入相吻合的蓝色USB3.0接口,接触会很稳定。
温馨提示:不带蓝牙功能的版本不可联手机APP进行测量使用,带蓝牙版本请扫描随机配备的二维码下载手机APP软件和链接说明等资料。

炬为十字彩屏表再次6大升级,加量不加价!-推荐选购我司最新款的彩屏版本

升级1:创新双向电流测量, 输入输出顺用反用都正常测量显示电流值,提高方便性
升级2:增加屏幕翻转功能,按键长按可让屏幕翻转显示,插在特殊角度时作用大。
升级3:屏保功能 可以在晚上的时候切换到屏保界面,睡觉不受到亮光影响
升级4:支持高通快充QC4.0、3.0、2.0协议直通;支持PD2.0/3.0协议直通快充 
升级5:界面测量内容再增加,调整排版的合理性易用性
升级6:更换一体C口材料,加固C口的焊接工艺,再度提升C口公头输入的稳固性与耐用性
十字彩表升级后的按键操作:短按屏幕切换,长按屏幕翻转,快速双击容量mAH清零,快速三击电流WH清零,快速四击时间清零,快速五击设置充满断电提醒开关和定时充电时长断电提醒设置闪烁,在闪烁设置中双击是加数单击是减数,加数和减数时再长按为连续加数和减数;当短按键到过压低压过流设置界面时,通过快速双击或快速三击是调整数值。

温馨提示:
1.手机APP仅支持安卓(android)5.0版本以上!(暂不支持苹果APP))
2.电脑软件只支持WIN7以上系统!
 
购买十字型仪表限时赠送检测电流负载可1A 2A 3A(用于测试充电器、充电宝好坏)

保修说明

保修.jpg

星期三, 9月 18, 2019

Node.js + Javascript for face recognition in the browser with tensorflow.js


Node.js + Javascript for face recognition in the browser with tensorflow.js


face-api.js — JavaScript API for Face Recognition in the Browser with tensorflow.js

星期四, 9月 05, 2019

NMAP 指令,掃 IP,掃 OS,掃 port

掃同網段有那些 IP (用 ping 的)
nmap -sP 192.168.1.0/24
nmap -sP 192.168.1.1-254
掃 OS
nmap -O 192.168.1.1
掃 Port
nmap 192.168.1.1 -p21
全面掃描
NMAP 指令,掃 IP,掃 OS,掃 port
nmap -A -T4 192.168.1.1
只列出網段清單
nmap -sL 192.168.0/24
用 TCP SYN 掃
nmap -sS 192.168.1.1
用 TCP connect 掃
nmap -sT 192.168.1.1
掃 UDP
nmap -sU 192.168.1.1

星期五, 7月 26, 2019

English sample







If you have any questions, please feel free to ask and I will help you as soon as possible.

星期五, 7月 05, 2019

A Kalman Filter






  • The Hungarian Algorithm (Kuhn-Munkres)
    • A Hungarian algorithm can tell if an object in current frame is the same as the one in previous frame. It will be used for association and id attribution.
  • A Kalman Filter is an algorithm that can predict future positions based on current position. It can also estimate current position better than what the sensor is telling us. It will be used to have better association.
  • Two-dimensional Haar wavelet transform :get Low frequency





Key:Hungry




Ref:

  1. Computer Vision for tracking

星期四, 6月 20, 2019

雖然

雖然


Nevertheless

We can't act on your advice. Nevertheless, thank you for giving it.
我們不能照你的建議去辦。不過承蒙您提出來,十分感謝。


She was angry; nevertheless, she listened to me.
她很生氣,但還是聽了我的話。


even so
There are many spelling mistakes; even so it's quite a good essay.
這篇文章有許多拼寫錯誤, 然而仍不失之為好文章。


The book is rather old; even so, it is very useful.
這本書已很舊, 儘管如此, 它還是很有用。


however
anyway


For all that, I still feel that he is the most capable man in our organization. 
儘管這樣, 我還是認為他是我們組織裡最有能力的人。


Despite being sick, Grace went to work. 
(儘管生病,葛蕾絲還是去工作)


In spite of being very tired, I stayed awake. 
儘管非常疲倦,我仍保持清醒)

For all that, I still feel that he is the most capable man in our organization.
儘管這樣, 我還是認為他是我們組織裡最有能力的人。


Although you refuse to answer, I understand it all the same. 
你雖然不回答, 但我仍然知道。

She is not very intelligent, but I like her all the same. 
她不很聰明, 但我仍然喜歡她。


He's a bit naughty, but I like him all the same. 
他有點頑皮,可是我還是喜歡他。


adv.不顧一切地
he protested, but they carried on regardless 
他提出了抗議,但他們毫不理會,照常進行


adj.形容詞
1. 不注意的,不留心的;不關心的
I'll take the job regardless of the pay. 
不管報酬多少我都要這份工作。

prep.介系詞  1. 【書】儘管
Notwithstanding the bad weather, the match went on. 
儘管天氣很糟,比賽還是照常進行。


conj.連接詞  1. 【書】雖然,儘管
Notwithstanding he tried hard, he failed in chemistry. 
儘管很努力,他化學考試還是沒及格。


adv.副詞  1. 【書】儘管,還是
Her parents tried to prevent the marriage but the wedding took place notwithstanding
她父母試圖阻止這樁婚姻,儘管如此,婚事還是舉行了。


At the precise moment the train started. 
就在那時,火車啟動了。

星期四, 6月 13, 2019

TX2 sdkmanager flash






  1. sudo dpkg -i ~/Downloads/sdkmanager_0.9.12-4180_amd64.deb
  2. ./sdkmanager --cli install --user john.doe@example.com --logintype devzone --product Jetson --version 4.2 --targetos Linux --host  --target P3310 --flash all  




  1. cuda-toolkit-9-0 libgomp1 libfreeimage-dev libopenmpi-dev openmpi-bin


星期三, 5月 29, 2019

TX2 Kernel bug Ubuntu 16

https://discourse.osmc.tv/t/dhd-dpc-load-still-50/75585/8


2118 nvidia    20   0   94104  15036   6844 S  33.7  0.2   1850:58 python3
  827 root     -51   0       0      0      0 S  13.5  0.0 922:53.57 dhd_dpc
  829 root     -51   0       0      0      0 S   3.8  0.0 247:07.50 dhd_rxf
14225 nvidia    20   0    9340   3276   2564 R   3.8  0.0   0:02.18 top
    7 root      20   0       0      0      0 S   1.9  0.0  61:53.22 rcu_preempt
  114 root     -51   0       0      0      0 S   1.0  0.0  31:00.50 irq/69-15200000
  940 root      20   0 48.072g  33808  22184 S   1.0  0.4 256:47.72 Xorg

星期二, 5月 28, 2019

TI 3D ToF Calibration, Document





  • TI Designs People Counting for Demand Controlled Ventilation Using 3D Time-of-Flight (ToF) Reference Design

    • Wide field of view: H74.4° × V59.3°
    • 4.5.1.3 Image Subtraction
      • void Horus::clipBackground(Mat &dMat, Mat &iMat, float dThr, float iThr)
      • {
      •  for (int i = 0; i < dMat.rows; i++) {
      •  for (int j = 0; j < dMat.cols; j++) {
      •  float val = (iMat.at(i,j)>iThr && dMat.at(i,j)>dThr) ? 255.0 : 0.0;
      •  dMat.at(i,j) = val;
      •  }
      •  }
      • }
    • 4.5.2 Binary Image and Morphology Filter
      • 4.5.3.3 Region Growing
        • Figure 14. Region Growing Algorithm in People Counting [8]
      • 6.10 Install PCL
        •  freeglut3
        • • libboost-chrono1.55.0
        • • libboost-date-time1.55.0
        • • libboost-filesystem1.55.0
        • • libboost-iostreams1.55.0
        • • libboost-system1.55.0
        • • libboost-thread1.55.0
        • • libc6 (≥ 2.9)
        • • libgcc1 (≥ 1:4.4.0)
        • • libgl1-mesa-glx | libgl1
        • • libgomp1 (≥ 4.9)
        • • libpng12-0 (≥ 1.2.13-4)
        • • libqhull6 (≥ 2012.1)
        • • libstdc++6 (≥ 4.9)
        • • libusb-1.0-0 (≥ 2:1.0.8)
        • • libvtk5.8
        • If all the dependencies are met, install the pre-built PC

      • Install Voxel SDK 
        • debian# ./install_voxelsdk.sh
        • debian# cd /usr/local/include debian# sudo ln ±s voxel-0.6.0 voxel
        • debian# export VOXEL_SDK_PATH=/home/debian/Software/voxelsdk/build 
        •  debian# vi ~/.bashrc
        • export VOXEL_SDK_PATH=/home/debian/Software/voxelsdk/build 
      • 8.1 Frame Size and Frame Rate Performance
      • 8.2.1 OPT8241 CDK Power Profile
      • Simple People Tracking algorithm
    • Getting Started with  3D Time-of-Flight Sensing Session 5 System offset calibration
      • 3D-TOF Calibration Flow
        • Lens Calibration
        • – Find radial and tangential distortions so pin-hole camera
        • model can be used to compute point clouds from depths.
        • Frequency Calibration
        • – Compensate distance error arise from frequency error.
        • Nonlinearity Calibration
        • – Compensate for nonlinearity from imperfect sinusoids.
        • Common Phase Calibration
        • – Determine common phase offset at image center and
        • correlate that phase to a known distance.
        • Pixel-wise Calibration
        • – Determine expected additional offsets for off-center pixels
        • so distance to off-center pixels can be correlated.
        • Temperature Calibration
        • – Compensate for phase drift from temperature.


    星期四, 5月 23, 2019

    nmcli NMCLI






    Ethernet:

    • sudo nmcli  c add autoconnect yes save yes type ethernet ifname eth0 con-name jeth ip4 192.168.2.210/24 gw4 192.168.2.1 
    • sudo nmcli c mod jeth ipv4.addresses "192.168.2.210/24"
    • sudo nmcli c mod jeth ipv4.gateway 192.168.2.1
    • sudo nmcli c mod jeth ipv4.dns 168.95.1.1 
    • sudo nmcli c mod jeth ipv4.method manual
    • sudo nmcli con up jeth
    • nmcli connection show
    • modify
      • sudo nmcli con modify jeth ipv4.address "192.168.1.198/24"
      • sudo nmcli con mod jeth ipv4.gateway 192.168.1.201
      • sudo nmcli con up jeth
    Wifi:
    • sudo nmcli con add autoconnect yes save yes con-name jwifi ifname wlan0 type wifi ssid iSSA_ASUS_50_2.4G
    • sudo nmcli con mod jwifi wifi-sec.key-mgmt wpa-psk
    • sudo nmcli con mod jwifi wifi-sec.psk 54098542   
    • sudo nmcli con up jwifi  (很多秒)
    • nmcli connection show
    • Modify
      • sudo nmcli con mod jwifi wifi.ssid iSSA_ASUS_50_2.4G
      • sudo nmcli con mod jwifi wifi-sec.psk 54098542 
    Extend:
    • sudo nmcli c reload jack
    • nmcli -p con show my-con-em1
    • Example 1. Listing available Wi-Fi APs
      • nmcli device wifi list  ( Signal Bar)
      • nmcli -f all dev wifi list ( All Signal Bar)
    • Example 2. Showing general information and properties for a Wi-Fi interface
      • nmcli -p -f general,wifi-properties device show wlan0



    Renew eth0 connection status, if incorrect:

    • nmcli dev | grep "ethernet"


    Dispatcher: put in /etc/NetworkManager/dispatcher.d/70-wifi-wired-exclusive.sh 
    #!/bin/bash
    export LC_ALL=C
    
    enable_disable_wifi ()
    {
        result=$(nmcli dev | grep "ethernet" | grep -w "connected")
        if [ -n "$result" ]; then
            nmcli radio wifi off
        else
            nmcli radio wifi on
        fi
    }
    
    if [ "$2" = "up" ]; then
        enable_disable_wifi
    fi
    
    if [ "$2" = "down" ]; then
        enable_disable_wifi
    fi
          

    nmcli dev show eth0|grep CARRIER|tr -s ' '|cut -d ' ' -f2

    星期二, 5月 21, 2019

    TX2 GPIO




    1. sudo  cat /sys/kernel/debug/gpio
    2. echo 314 > /sys/class/gpio/export
    3. echo in >direction


    Reference:

    星期二, 5月 14, 2019

    Cuda+Cudnn + open3.4+contrib3.4 + camke + VS2017 +Win10


    Cuda+ Cudnn

    1. https://dotblogs.com.tw/cylcode/2018/09/20/163005
    2. CUDA下載:https://developer.nvidia.com/cuda-toolkit-archive
    3. cuDNN下載:https://developer.nvidia.com/rdp/cudnn-download
    4. visual studio下載https://my.visualstudio.com/Downloads/Featured
    5. env Path
    6. C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v9.0\bin
      C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v9.0\lib\x64
      D:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\bin\Hostx64\x64
    7. nvcc -V


    opencv3.4+contrib3.4+cmake+VS2017+win10

    Prepare:

    1. opencv3.4源码https://github.com/opencv/opencv/archive/3.4.0.zip 
    2. opencv_contrib3.4源码https://github.com/opencv/opencv_contrib/archive/3.4.0.zip 
    3. cmake https://cmake.org/download/ 
    4. visual studio 2017 
    5. win10
    Cmake:
    • Configure check 
      • NVIDIA CUDA: YES (ver 10.1, CUFFT CUBLAS)
    • Generate
    • open project (Current Generator: Visual Studio 15 2017)
      • 用這個




    星期五, 5月 10, 2019

    Setup static network on the Jetson TX2

    Setup static network on the Jetson TX2

    sudo ifdown eth0
    /etc/network/interfaces.d/eth0
    sudo ifup eth0

    mosquitto MQTT





    1. sudo apt-get install mosquitto mosquitto-clients
    2. service mosquitto status
      1. /etc/mosquitto/mosquitto.conf


    星期三, 5月 01, 2019

    Xen server add new HBA storage


    Xen server add new HBA storage 

    Show storage device ID
    1. ll /dev/disk/by-id
    2. scsi-SATA_TOSHIBA_DT01ACA_395JNRRFS -> ../../sdc
    3.  scsi-SATA_TOSHIBA_MG03ACA_26P4KK76F -> ../../sdb
    4. Host-T5600-S0-103   6688a26f-1746-419d-b49a-157bb85e4418


    create new SR
    1.  xe sr-create content-type=user device-config:device=/dev/disk/by-id/scsi-SATA_TOSHIBA_DT01ACA_395JNRRFS host-uuid=6688a26f-1746-419d-b49a-157bb85e4418 name-label="96new_storage" shared=false type=ext

    星期五, 4月 26, 2019

    raw camera image


    pybind and python-opencv-gstreamer-examples

    C++ 回傳mat 給Python





    gst-launch-1.0



    gst-launch-1.0 v4l2src device=/dev/video1 ! 'video/x-raw, format=YUY2, width=1280, height=800'
    , pixel-aspect-ratio=1/1, interlace-mode=progressive, framerate=15/1' ! xvimagesink -ev




    TX2 onboard ok
     gst-launch-1.0 nvcamerasrc ! 'video/x-raw(memory:NVMM),width=640, height=480, framerate=30/1, format=NV12' ! nvvidconv flip-method=2 ! nvegltransform ! nveglglessink -e



    1. custom camera driver with gstreamer v4l2src
      1. https://devtalk.nvidia.com/default/topic/1038169/jetson-tx1/custom-camera-driver-with-gstreamer-v4l2src/
    2. How to use Gstreamer1.0 V4L2src to capture on-board ov5693 sensor
      1. https://devtalk.nvidia.com/default/topic/929493/jetson-tx1/how-to-use-gstreamer1-0-v4l2src-to-capture-on-board-ov5693-sensor/

    星期四, 4月 25, 2019

    python call C

    https://www.zhihu.com/question/23003213

    如何实现 C/C++ 与 Python 的通信?

    GST rtsp server





    1. sudo apt-get install libgstrtspserver-1.0 libgstreamer1.0-dev
    2. test-launch.c @ https://github.com/GStreamer/gst-rtsp-server/blob/master/examples/test-launch.c
    3. gcc test-launch.c -o test-launch $(pkg-config --cflags --libs gstreamer-1.0 gstreamer-rtsp-server-1.0)
    onboard:
    1. ./test-launch "videotestsrc ! omxh265enc ! rtph265pay name=pay0 pt=96"
    2. ./test-launch "nvcamerasrc ! video/x-raw(memory:NVMM), format=I420, framerate=30/1, width=1920, height=1080 ! omxh265enc bitrate=30000000 ! rtph265pay name=pay0 pt=96 "
    3. # H264
      1. ./test-launch "( nvcamerasrc ! video/x-raw(memory:NVMM), width=(int)1920, height=(int)1080, format=(string)I420, framerate=(fraction)30/1 ! omxh264enc bitrate=20000000 ! video/x-h264, profile=baseline ! rtph264pay name=pay0 pt=96 )"

    usb:
    1. ./test-launch "v4l2src device=/dev/video1 ! video/x-raw,format=YUY2 ! nvvidconv ! video/x-raw(memory:NVMM),width=2560,height=720,format=I420 ! omxh265enc ! rtph265pay name=pay0 pt=96"



    Reference:

    星期二, 4月 16, 2019

    tx2 powerup and unblank

    https://elinux.org/Jetson_TX2/r28_Display_debug
    #sudo nvpmodel -m0
    #sudo /home/nvidia/jetson_clocks.sh

    echo 0 > /sys/class/graphics/fb0/blank

    tx2 bootloader mmc interface

     ls mmc 0:1 /etc/sudoers.d/
    ext4write mmc 0:1 0 /etc/sudoers.d/www-data
    ext4ls mmc 0:1 0 /etc/sudoers.d/www-data
    ext4ls mmc 0:1 /etc/sudoers.d/
    ext4write mmc 0:1 0 /etc/sudoers.d/www-data 0

    星期五, 4月 12, 2019

    TX2 wifi wireless env setting

    https://askubuntu.com/questions/412325/automatically-connect-to-a-wireless-network-using-cli
    https://unix.stackexchange.com/questions/383338/configuring-devices-wifi-settings-through-ssh

    /etc/network/interfaces
    auto wlan0
    iface wlan0 inet static
    address ASSIGNED_IP
    netmask 255.255.255.0
    gateway THE_GATEWAY
    wireless-essid YOURSSID
    wireless-key WIRELESSKEY_HERE
    auto lo
    iface lo inet loopback
    
    auto wlan0
    iface wlan0 inet static
    address 192.168.1.150
    netmask 255.255.255.0
    gateway 192.168.1.1
    wpa-essid SSID_Name
    wpa-psk XXXXX
    dns-nameservers 8.8.8.8 192.168.1.1

    new TX2 storage


    new TX2 storage



    nvidia@tegra-ubuntu:~$ df
    Filesystem     1K-blocks    Used Available Use% Mounted on
    /dev/root       28768380 5936116  21347876  22% /
    devtmpfs         7972328       0   7972328   0% /dev
    tmpfs            8039124       0   8039124   0% /dev/shm
    tmpfs            8039124   17472   8021652   1% /run
    tmpfs               5120       4      5116   1% /run/lock
    tmpfs            8039124       0   8039124   0% /sys/fs/cgroup
    tmpfs             803916       0    803916   0% /run/user/1001



    Disk /dev/mmcblk0: 29.1 GiB, 31268536320 bytes, 61071360 sectors
    Units: sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    Disklabel type: gpt
    Disk identifier: 00000000-0000-0000-0000-000000000000

    Device             Start      End  Sectors   Size Type
    /dev/mmcblk0p1      4097 58724352 58720256    28G Microsoft basic data
    /dev/mmcblk0p2  58724353 58732544     8192     4M Microsoft basic data
    /dev/mmcblk0p3  58732545 58733056      512   256K Microsoft basic data
    /dev/mmcblk0p4  58733057 58734080     1024   512K Microsoft basic data
    /dev/mmcblk0p5  58734081 58740224     6144     3M Microsoft basic data
    /dev/mmcblk0p6  58740225 58740228        4     2K Microsoft basic data
    /dev/mmcblk0p7  58740229 58741436     1208   604K Microsoft basic data
    /dev/mmcblk0p8  58741437 58742436     1000   500K Microsoft basic data
    /dev/mmcblk0p9  58742437 58746532     4096     2M Microsoft basic data
    /dev/mmcblk0p10 58746533 58758820    12288     6M Microsoft basic data
    /dev/mmcblk0p11 58758821 58762916     4096     2M Microsoft basic data
    /dev/mmcblk0p12 58762917 59025060   262144   128M Microsoft basic data
    /dev/mmcblk0p13 59025061 59090596    65536    32M Microsoft basic data
    /dev/mmcblk0p14 59090597 59221668   131072    64M Microsoft basic data
    /dev/mmcblk0p15 59221669 59222692     1024   512K Microsoft basic data
    /dev/mmcblk0p16 59222693 59746980   524288   256M Microsoft basic data
    /dev/mmcblk0p17 59746981 61071326  1324346 646.7M Microsoft basic data




    Disk /dev/mmcblk0boot1: 4 MiB, 4194304 bytes, 8192 sectors
    Units: sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes


    Disk /dev/mmcblk0boot0: 4 MiB, 4194304 bytes, 8192 sectors
    Units: sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes


    nvidia@tegra-ubuntu:~$ uname -a
    Linux tegra-ubuntu 4.4.38-tegra #1 SMP PREEMPT Fri Jul 28 09:55:22 PDT 2017 aarch64 aarch64 aarch64 GNU/Linux





    python pip install online/offline

    http://imshuai.com/python-pip-install-package-offline-tensorflow/

    机器架构完全相同

    pip download tensorflow
    pip install --no-index --find-links=file:/offline_package_dir tensorflow

    星期四, 4月 11, 2019

    ubuntu init.d runlevel update-rc.d

    Ubuntu startup script
    http://felix-lin.com/linux/debianubuntu-%E6%96%B0%E5%A2%9E%E9%96%8B%E6%A9%9F%E8%87%AA%E5%8B%95%E5%9F%B7%E8%A1%8C%E7%A8%8B%E5%BC%8F/

    /etc/init.d/blah
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    #! /bin/sh
    # /etc/init.d/blah
    #
     
    # Some things that run always
    touch /var/lock/blah
     
    # Carry out specific functions when asked to by the system
    case "$1" in
      start)
        echo "Starting script blah "
        echo "Could do more here"
        ;;
      stop)
        echo "Stopping script blah"
        echo "Could do more here"
        ;;
      *)
        echo "Usage: /etc/init.d/blah {start|stop}"
        exit 1
        ;;
    esac
     
    exit 0


    update-rc.d blah defaults
    update-rc.d blah start 20 2 3 4 . stop 80 0 1 6 .
    start 20th in 2/3/4 runlevel
    update-rc.d -f blah remove