General

Linux runs on huskylens2

userHead R. Hatami 2026-10-26 06:19:17 13 Views12 Replies

hi guys i was wondering if you could help me I bought a huskylens2 i managed to telnet into it using its ip and login root and it runs linux i can see the cam as /dev/video3 and it runs ffmpeg i want to get the bits from the camera i found a io file that has all the gpio pins in so i cant get a clear image and feed to process but i may need some help i know some really cool stuff to do with cameras and circuits like a dac to get an analog wave and a opamp to amplify it. it runs python too i tried to install opencv but it failed i found a compiled branch of k230 fw ver 1.8.1 which has opencv in im not sure if you can copy the files from 1.8.1 to 1.4.1 i havnt tried it yet but if you can read the bits in then you can read the bytes and make your own software for it with an interface if we find how that is displayed and your own applications

 

2026-10-26 07:53:48

I like to work on things together with people in a community so please msg me on discord reza2336 and we can make a group i also made a telegram group which would be cool because the robot could post to it its log.

try telegram 

http://t.me/Huskylens2

let me know if it works or not

userHeadPic R. Hatami
2026-10-26 07:32:32

ok so my robot now drives around i use a 13 pounds cheap plastic arduino bot

 

it looks for a person then looks for a face

 

in the future i want to ask who am i looking at and it will put the text in of the name and store the image to detect later which is machine learning

 

then i want to ask what are you doing then you say what you are doing.

 

when it docks it calls a friend on dfrobot community with huskylens and tells it my owner [reza] [is working on the computer]

 

it can keep a log aswell and read it to you if you go out and come back

example

at 12:00 i went to the kichen

at 12:05 i found a fly

at 12:06 i went to the lounge

at 12:08 my battery status showed it low

at 12:08 i went to the induction charging point to charge my battery i called a friend and talked to its owner here is the recording i asked what robot do you have, do you have a message for my owner, my owner implemented these new methods in my code etc.

at 12:30 my owner [reza] came home and asked can i see an image from your robot and it takes an image from the friends robot and sends it

 

if you use fall detection your robot could call all its friends for help and send the image and address

userHeadPic R. Hatami
R. Hatami wrote:

it can post it to your website too

2026-10-26 07:32:53
1 Replies
2026-10-26 07:23:20

TUTORIAL HOW TO DO COMPUTER VISION AND MACHINE LEARNING THE BEST WITHOUT WAITING EACH TIME

PART2

 

ok this is how its done

 

while True:
   ret, frame = cam.read()
   frame2 = frame
   frame3 = frame
   
   if ret:
       if takephoto == 1:
           takephoto=0
           #take()
           t1 = threading.Thread(target=edgedetection(), args=(4,))
           t2 = threading.Thread(target=persondetection(), args=(4,))
           t3 = threading.Thread(target=facedetection(), args=(4,))
           #t4 = threading.Thread(target=doordetection(), args=(4,))
           t1.start()
           t1.join()
           t2.start()
           t2.join()
           t3.start()
           t3.join()

userHeadPic R. Hatami
2026-10-26 07:16:57

OK I MESSED UP THAT POST

 

TUTORIAL HOW TO DO COMPUTER VISION AND MACHINE LEARNING THE BEST WITHOUT WAITING EACH TIME

 

in here you have a stream of frames it is in a while loop

while True: 
   # Capture frame-by-frame 
   ret, frame = cap.read()

   #add this

   frame1 = frame

   frame2 = frame

   frame3 = frame

   

userHeadPic R. Hatami
R. Hatami wrote:

this make 3 video streams and the frame1 rename to live so this is your clear live feed

frame 2 is processed by a separate thread and is edges so make thread run make grey and edge detection rename to edges

frame3 is door detection on the edges so change frame3 to door = edges and make a new thread to process door and look for a door by matching a line and rotating it like hough

2026-10-26 07:20:14
1 Replies
2026-10-26 07:14:26

TUTORIAL HOW TO DO COMPUTER VISION AND MACHINE LEARNING THE BEST WITHOUT WAITING EACH TIME

 

in here you have a stream of frames it is in a while loop

while True: 
   # Capture frame-by-frame 
   ret, frame = cap.read()

 

userHeadPic R. Hatami
R. Hatami wrote:

ok add

 

while True: 
   # Capture frame-by-frame 
   ret, frame = cap.read()

frame1 = frame under

2026-10-26 07:15:18
1 Replies
2026-10-26 07:10:00

i still want to get the bits out using something like this or /dev /bin/k230_iomux.py

so i can see other parts of the light spectrum not just visible anyone know electronics and dacs

userHeadPic R. Hatami
2026-10-26 07:07:29

ok i wrote a python file and found opencv2 is installed i used this i commented the imshow and waitkey as its not implemented im not sure how to display the image im a noob at python but not opencv i dont know if you can write the image to the frame buffer or something to display it so you dont need to compile or add intergrations i can try it tomorrow

 

import numpy as np 
import cv2 as cv 
 
cap = cv.VideoCapture(3) 
if not cap.isOpened(): 
   print("Cannot open camera") 
   exit() 
while True: 
   # Capture frame-by-frame 
   ret, frame = cap.read() 
 
   # if frame is read correctly ret is True 
   if not ret: 
       print("Can't receive frame (stream end?). Exiting ...") 
       break 
   # Our operations on the frame come here 
   gray = cv.cvtColor(frame, cv.COLOR_BGR2GRAY) 
   # Display the resulting frame 
   #cv.imshow('frame', gray) 
   #if cv.waitKey(1) == ord('q') 
# When everything done, release the capture 
cap.release() 
#cv.destroyAllWindows()

 

 

 

 

userHeadPic R. Hatami
2026-10-26 06:52:58

to use the cam you must after telnetting in

killall /opt/menu
 

then run this to capture one frame

ffmpeg -f v4l2 -video_size 1280x720 -i /dev/video3 -frames:v 1 photo.jpg
 

or write a python file .py

with this to capture 3 frames from the camera

 

import ffmpeg


( 
       ffmpeg.input("/dev/video3") 
       .output('frame_%d.png', vframes=3) 
       .run() 
)

 

now i have a frame i can make a stream and copy the frame to make multiple streams to process then used separate threads to process each stream keeping the live feed on main thread unprocessed

 

userHeadPic R. Hatami
2026-10-26 06:24:32

Huskylens2 Runs Linux

Get IP: [System settings] [WiFi] shows the ip its connected to

login: root
telnet [husky ip]

[top] shows processes running
kill pid
of /opt/menu
and the other pid

then run /opt/menu
shows what starts up
i found /dev/video3

the device also runs pyhton on it


cat /dev
shows there is a gpio chip

gpiodetect
gpioset
gpioget

dmesg

cat /etc/*release
from buildroot.org

pip install opencv-python
pip install numpy

ls /dev/i2c*

cat /opt/detect_sensor.py

userHeadPic R. Hatami