Use of OCR to read node graphs [closed] - python

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 5 years ago.
Improve this question
I would like to code a program that will use a phones camera to read a node graph and then perform dijkstra's algorithm on it, displaying the shortest path.
Could pytesseract or other OCR tools for python read node graphs (such as in the image. Real use would be on printed ones) and give me enough information to get node coordinates and what letters are next to them, as well as the positions of the edges/which nodes they connect and what numbers are next to them?
Any help would be much appreciated.
https://i.stack.imgur.com/RUZwA.jpg

Related

Change an objects mesh Node in Python Script? [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 2 years ago.
Improve this question
Lets say I have a simple cube and a sphere, is their a way I can make the cubes mesh node match that of the sphere in python? Similar to the Modify --> Replace method. I have tried cmds.nodeCast but I dont want to switch them. Just to copy exactly from the other.
If you're ok with instances then you can select both objects and run this:
import maya.cmds as cmds
sel = cmds.ls(sl=True)
cmds.connectAttr(sel[0] + ".outMesh", sel[1] + ".inMesh", force=True)

How to detect a moving object in a short sequence of images using opencv? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 4 years ago.
Improve this question
I am having a short sequence of grayscale images ( 20 images ), which is consecutive frames collected from a camera. I need to identify the location of a small moving object in each image. I have tried to use background subtraction, and can identify the moving pixels in each image. How can I proceed to detect the exact location of that moving object ?
You can try this way.
(1) find the object using template matching at first time.
https://docs.opencv.org/3.0-beta/doc/tutorials/imgproc/histograms/template_matching/template_matching.html?highlight=template%20matching
(2) Tracking the object using camshift or other tracking algorithm.
https://github.com/opencv/opencv/blob/master/samples/python/camshift.py

How to remove stamps/watermarks from masked images? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 6 years ago.
Improve this question
I have an image that I'm masking, but even the text gets thresholded. Here's a thresdholded image below:
As you can see, the time, letters and such are also a part of the mask. I want to get rid of them. How do I go about it?
If the images follow that kind of pattern, you could try to apply a morphological closing.
Whith a mask the right size for the closing and opening, it will get rid of the text in the image, leaving it black.
Note that applying a closing may also slightly modify the rest of the image (for instance, a circular mask may smooth the edges of the circle in the center of the mask).

How to detect who is move white or black in python-chess library? [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 6 years ago.
Improve this question
I am created some chess program and want to detect who have move white or black. Which objects stores information which pieces will move Board, GameNode?
import chess.pgn
import chess.uci
# ??? Board().is_white_move()?
# ??? GameNode.is_white_move()?
I analysed code but not found good explanation.
I assume that you are looking at python-chess.
There's a turn attribute of the Board instance.

How to find if player surrounded enemy's cells [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 8 years ago.
Improve this question
I am making simple game. (A matrix where players can take cells(x,y), only one player on one cell, and they acquire new cells after the player before). Every player has a unique color. I am trying to find out if one player has surrounded cells of other users. In which case all cells are going to change color. Is there any known algorithm for this problem, to check only when user plays a new move ?
I would suggest that you take a look at a flood fill algorithm, these are simple algorithms that searches from a start point and tries to fill the board. You would simply have to check if the fill algorithm can reach the end of the board or not.

Categories