Categories
Mastering Development

Knight Tour Backstracking with Warndorff rule improvement

The assignment said that I could improve it with Warnsdorff’s algorithm with int CountVisitedNeighbors(). Use this function to compare all of the knight’s possible moves. Choose the next move where the most neighbors have already been visited. *** static int BoardSize = 8; static int attemptedMoves = 0; / xMove[] and yMove[] define next move […]

Categories
Mastering Development

How to save a screenshot of the image when car is detected? [closed]

CLASSES = ["background", "aeroplane", "bicycle", "bird", "boat", "bottle", "bus", "car", "cat", "chair", "cow", "diningtable", "dog", "horse", "motorbike", "person", "pottedplant", "sheep", "sofa", "train", "tvmonitor"] while True: frame = vs.read() frame = imutils.resize(frame, width=400) (fH, fW) = frame.shape[:2] if detections is not None: for i in np.arange(0, detections.shape[2]): confidence = detections[0, 0, i, 2] if confidence < […]

Categories
Linux Mastering Development Ubuntu

Ubuntu stuck in tty screen

I installed Ubuntu 20.04 and then tried to change the nvidia driver in “additional drivers”. After restarting, ubuntu displayed this message “/Dev/sda5: clean, ….. Files, …… Blocks” So I pressed Ctrl alt F2, and a tty screen comes up, after logging in, I tried to auto update drivers, purge nvidea, startx, but nothing is working. […]

Categories
Development

csv file not written as expected

I want to generate a csv file along with the name and time when a person was recognized, but while trying to the csv file. I just want to get the first time a person was recognized as entry time and add the next time he was recognized as a separate column. Currently while I […]

Categories
Development Linux

GUI application on LXC on Proxmox

I am trying to run a GUI application on a server in LXC in Proxmox VE. When trying to start xorg with classical methods (X, xinit, startx), the error tty0 is missing: parse_vt_settings: Cannot open /dev/tty0 (No such file or directory) As far as I understand, this is a feature of LXC, but I do […]

Categories
Development

How can I get the class name of tensorflow models from zoo

recently I’ve been playing around with some of the models from the tensorflow object detection api zoo. Mainly, the coco ssd_inception, and the oidv4 ssd_mobilenet. The problem is when it comes to label the detections on the image. As an example when I run the oidv4 detector on this image it shows the labels that […]

Categories
Development Python

Python: List isn’t being passed to function properly

I’m making a maze runner program as an assignment and I’m running into a nasty bug. This program isn’t complete so it’s probably not going to function but I’m just trying to get this one specific bug out of the way. It’s an Index Error and I don’t understand why it’s appearing. Basically, the list […]

Categories
Development

How to scroll using coordinates with appium

im trying to scroll in a native android app by using the method below Dimension size = driver.manage().window().getSize(); int starty = (int) (size.height * 0.80); int endy = (int) (size.height * 0.20); int startx = size.width / 2; driver.swipe(startx, starty, startx, endy, 3000); Thread.sleep(2000); but at driver.swipe it gives me an error that says The […]

Categories
Development

how to combine a color detector and SSD detector for identifying a person?

I would like to combine a color detector and SSD detector for identifying a person in real-time but I faced some issue when there are more than a person and more than one area for detected color, I don’t know what is the reason? update: I knew the reason because of it calculates one box […]