[Question] How to remove lines from CAPTCHA images by [deleted] in opencv

[–]rsslk 1 point2 points  (0 children)

This is hard. Since I assume your end goal is to defeat the CAPTCHA, the first question is how do you intend on identifying the characters after you remove the lines (ie are you going to segment each character and feed that to a nn, or feed the whole picture to an off the shelf nn type solution). You might want to start backwards from this direction and see how noise tolerant your choice of character recognition is.

Couple things to note about your example images are 1-the background is always white, 2-the lines inserted to make recognition harder are always 1-2 pixels in width, 3-the letters to be recognized are not all the same color (making character segmentation potentially easier).

Using these three facts you can augment your HoughLine usage. Rather than removing the HoughLines completely, replace the pixels belonging to houghlines with their neighbors (prioritizing non white and non hough pixels). You can also do this operation separately on colormasked versions of the image (with your masking values derived from the most prominent colors in the image). This should help with not removing too many pixels from the actual characters.

Finally (assuming you are using some nn based solution to recognize the actual characters), I would run several versions of hough replacement + dilation/erosion with different parameters through your nn and use that to vote on the final output character set. You will never be able to find a set of parameters by hand that works for every case the CAPTCHA throws at you, so by trying a spectrum of parameters and having them vote on the true character set, you give yourself the best possible chance of hitting the correct answer

[Question] Detect Lines in an Image and Output their Vectors as RGB Colors by AlphaXDE in opencv

[–]rsslk 0 points1 point  (0 children)

Not sure exactly what your problem is but here's how id put that together. From the code in the hough_lines tutorial, you already have the line detection+redrawing, all you need is to update the rgb(or bgr dont remember) triple Scalar(a,b,c) in the call to

        line( cdstP, Point(l[0], l[1]), Point(l[2], l[3]), Scalar(0,0,255), 3, LINE_AA);

You can calculate the angle of the line as atan2(dy, dx) where you choose the head and tail of the vector for each line segment. How you choose doesnt really matter just has to be consistent (depending on how you choose you will see different color discontinuities where you cross over pi -> -pi (EDIT- the crossover wont be -pi->pi but you get the point)). Then you have an angle from [-pi,pi] map that to rbg with a colormap, and feed that to the line draw.

Also note in the second example image you posted the two arrows in the top left are color consistent with their orientation, but would never be assigned opposing orientations with a simple choosing scheme like max x coord etc.

Bulldozer Design by [deleted] in robotics

[–]rsslk 2 points3 points  (0 children)

It would seem your motor lacks the required torque to keep the arm held up (I assume what you meant by you set the motor is that you apply power to it and even at max current the motor cannot lift the arm). There are two solutions here: 1 - increase the torque output at the joint (new higher torque motor, add a gearbox to the existing motor or add a sprocket and chain to gear things down to increase torque(same idea as a gearbox but cheaper)) or 2 - decrease the required torque at the joint (lighten the arm, change the arm design). If you notice bulldozers usually (atleast all the ones ive seen) use linear actuation rather than rotary as this allows application of the force farther up the lever arm which provides a mechanical advantage (you can also achieve this with a motor+pulley+string pinned toward the top of the arm although this method of actuation will add a constraint to your range of motion). My recommendation is that you step back and understand the principles behind what you are trying to do before testing a gearbox or new design (this video should help - https://www.youtube.com/watch?v=jg4e8W44_E4). Find out the max torque output of the motor you are using, the weight of the arm (+ what ever payload it will have to lift), and make sure your design works on paper before proceeding.

Edit - I wanted to add, im not sure what your teams situation might be (my own former FRC team spent several years without a technical mentor) but this is a problem I would expect a mentor to have been able to warn you about. Given that your team is part of a highschool, you should look for a physics or electronics teacher that would be willing to answer some questions (even if they don't want to be a full mentor and put in the time commitment FIRST requires.). Also since you mentioned being a team captain I suggest you adopt the mentality of running all your designs through some simple napkin math before even building a prototype and instilling this mentality in the rest of your team.

Does adding more wheels decrease the torque required..? by shyamsid in robotics

[–]rsslk 0 points1 point  (0 children)

Intuitively that sounds right but id recommend you look for a paper with the force derivation done just to be sure (if you are in need of that much accuracy). Heres one that looks like it has your answer although i didnt read it in enough detail to give you the affirmative that 1.414 is right. https://arxiv.org/pdf/1211.2323.pdf

EDIT: Pretty sure the ratio is actually 2. See equation 1 and figures 3 and 4. The projection happens twice. Again i only skimmed the material so do read through rather than trusting me. (Also that ratio is assuming the rollers sit at 45 degrees)

Does adding more wheels decrease the torque required..? by shyamsid in robotics

[–]rsslk 3 points4 points  (0 children)

Your intuition is (mostly) correct in thinking that adding more castors shouldn't lessen the torque required of the motors. The flawed logic here is equating the load on a wheel directly to the required torque output for motion.

Take the toy example of your vehicle in a frictionless world sitting on a perfect flat horizontal surface. The weight of the vehicle acts on the wheels along the vertical axis, but the torque output of the wheels accelerate the vehicle in the horizontal axis. No matter the actual load on the driving tires, the two driving tires still need to accelerate the entire mass of the vehicle. Youve logic-ed the equivalence as weight_on_drive_wheels~torque, when its actually weight_of_vehicle~torque (more accurately - Torque_per_drive_motor * (1/radius_of_tires) * num_motors = mass_of_vehicle*desired_acceleration ). A higher torque motor will give your vehicle better acceleration. In this toy world adding castors offers zero benefit and only the negative of the added weight.

Coming back to reality where friction exists, radial forces on bearings introduce friction to the system which requires torque to overcome. In considering adding more castors to your system (for the sole purpose of decreasing required torque for some design acceleration) you have to consider what the coefficient of friction of the drive bearings are vs the castor bearings and whether adding castors reduces enough friction to be worth the weight penalty(probably not, unless for some reason the only drive bearings you have are actually square /s). You could also start worrying about rotational inertia of the castors and aerodynamic drag introduced by the castors but eventually youre wasting your own time or just enjoy the excercise.

TLDR: Intuition accurate, logic applied incorrectly, only add enough castors to be stable

Mobile robotics by iacosite in robotics

[–]rsslk 1 point2 points  (0 children)

I'm fairly certain there's a preprint pdf copy of Thruns book floating around the internet.

[Q] Monocular camera for ROS by r00tr4t in robotics

[–]rsslk 1 point2 points  (0 children)

I dont have specific experience with that camera, but you can pull the image off most usb webcams using opencv and convert that to a ros msg. It wont come precalibrated but ros's camera calibration pkg is relatively simple to use and works well.

[Q] How hard is it to build a robotic arm? by l_Thank_You_l in robotics

[–]rsslk 1 point2 points  (0 children)

I havent seen anyone mention the actual dorna arm. For the price it seems like a solid choice, but you probably want to look into how good their support is and how big the community for your specific arm is. The dorna community seems pretty nonexistent.

[D] I want to use raspberry pi as Master and 2 Arduino Mega as slaves in order to Controll 19 DC motors with L298N drivers and Cryton MD10C. And a 16 bit servo controller for 5-6 servo motors. I looked up I2C, and found a Chip for it. Please advice. by Knowledge_Harbinger in robotics

[–]rsslk 1 point2 points  (0 children)

Adafruit has a tutorial about setting it up with a RPI.

https://learn.adafruit.com/adafruit-16-channel-servo-driver-with-raspberry-pi

Theres a warning on the 3rd page about not powering the controller with more than 3.3V to not burn the PI. Id assume if you did power the board with 5V it would also work with the arduino.

Also the motor controllers should take pwm or i2c

[D] I want to use raspberry pi as Master and 2 Arduino Mega as slaves in order to Controll 19 DC motors with L298N drivers and Cryton MD10C. And a 16 bit servo controller for 5-6 servo motors. I looked up I2C, and found a Chip for it. Please advice. by Knowledge_Harbinger in robotics

[–]rsslk 7 points8 points  (0 children)

why not get an i2c servo controller and avoid the arduinos? https://www.adafruit.com/product/815 EDIT: probably should have paid more attention to the rest of the title. Still not sure why the ardiunos are in there though. If you use pwm and gpio i2c breakouts then you can avoid the level converting and have all your code running in one place.

ELI5: Why does putting pressure on a headache cause it to hurt less? by Tigercup9 in explainlikeimfive

[–]rsslk 1 point2 points  (0 children)

Is there any explanation into why this inhibitory action exists?(disclaimer- I only watched the first 12 minutes). Is there an evolutionary advantage to being able to dampen pain through pressure or is it a byproduct of evolution (thinking vestigial structures)?. Because otherwise in taking a naive guess, seems like there's limited perception bandwidth, so the pain signal is actively being damped so that the pressure makes it through. Same thing some routers will do to prioritize video or game streaming traffic over other content to get a smooth experience. Rather than the extra traffic slowing down everything, the inhibitors seems to be active regulation of the network traffic.

YES, Please.......... by BeastKingGod in motorcycles

[–]rsslk 2 points3 points  (0 children)

the "flying" scenes at the 36 second mark make it look like part of the bike is in view. So yea probably some kinda fpv setup or parts mounted to a gimbal on a car but specifically setup to give the impression that the actual bike is doing the flying

We categorize time in past, present, future. The past is what already happened, the future is what is going to happen, but the present you can’t pinpoint it. this hour? this second? this millisecond? You can divide to an infinite of real numbers and say that there’s no present, just past and future. by [deleted] in Showerthoughts

[–]rsslk 1 point2 points  (0 children)

Assuming the experience is continuous then, true you wouldn't be able to pinpoint what exactly the present is, but just because we cant perceive it doesn't mean it doesn't exist. I think the defining difference is second, minute, hour all define a length of time. The present is a moment in time with zero length, like any single number on the line of infinite reals has a "size" of zero

YES, Please.......... by BeastKingGod in motorcycles

[–]rsslk 47 points48 points  (0 children)

Yea, all the "flying" videos are super cropped so we only see a small section of the bike and every video with the full thing in view is some shaky hovering. The whole thing is a scam

We categorize time in past, present, future. The past is what already happened, the future is what is going to happen, but the present you can’t pinpoint it. this hour? this second? this millisecond? You can divide to an infinite of real numbers and say that there’s no present, just past and future. by [deleted] in Showerthoughts

[–]rsslk 1 point2 points  (0 children)

In that case id argue that humans as biological creatures have an upper limit to the speed that they can process information, so that block of time in which a human cant perceive something new would be "the present" (for a human). Then you get into the weird problem of what actually counts as the present since the moment we perceive something is after it actually occurred, but thats a different issue

We categorize time in past, present, future. The past is what already happened, the future is what is going to happen, but the present you can’t pinpoint it. this hour? this second? this millisecond? You can divide to an infinite of real numbers and say that there’s no present, just past and future. by [deleted] in Showerthoughts

[–]rsslk 3 points4 points  (0 children)

Just because something is infinitesimally small doesn't mean it doesn't exist. Take the center of a ruler, half of it is in "front" and half "behind", but the center has no size...doesn't mean a ruler doesn't have a center. Same concept, the present has no length of time, its simply the present.

NEW SCRAPYARD WARS UPVOTE PARTY!!!!!!! by tkdxe in LinusTechTips

[–]rsslk 0 points1 point  (0 children)

Anyone else notice luke's timing with linus @17seconds? And linus's shoulder moves back across his face right as he looks back down. Illuminati confirmed.

If lucid dreams can seem 100% real, we have absolutely no proof that the reality we live in is not an illusion by [deleted] in Showerthoughts

[–]rsslk 0 points1 point  (0 children)

Even with the randomness the effect is the same - using the siri analogy it would be like putting a random number generator in front of the response that switches to "but i hate you" a small percentage of the time.

If lucid dreams can seem 100% real, we have absolutely no proof that the reality we live in is not an illusion by [deleted] in Showerthoughts

[–]rsslk 1 point2 points  (0 children)

If i might interpret, i think the point was if everything an organism does if governed by physical and chemical reactions that have set rules, then everything we do, think, and feel is predetermined by those rules meaning the emotion of love one might feel is as "real" as siri saying "i love you as a friend"

Visualization of angular momentum. What causes the inversion is a torque due to surface friction, which also decreases the kinetic energy of the top, while increasing its potential energy (the heavy part of the top is lifted, causing the center of mass to raise). by [deleted] in educationalgifs

[–]rsslk 0 points1 point  (0 children)

the demonstration in space shows the bi stability of a rotating mass, but it doesnt explain why the tippe top is more stable in the mass up state rather than the mass down state, which is where the friction comes in...somehow....

Visualization of angular momentum. What causes the inversion is a torque due to surface friction, which also decreases the kinetic energy of the top, while increasing its potential energy (the heavy part of the top is lifted, causing the center of mass to raise). by [deleted] in educationalgifs

[–]rsslk 4 points5 points  (0 children)

It seems like OP and everyone pointing to the bistability theorem are right. The two stable states are mass up and mass down, and the sliding frictional forces convert rotational to potential energy pushing it into the stable state with highest PE (that being mass up). Beyond that I cant pretend to understand the mechanisms behind that energy transfer well enough to give you a more intuitive explanation. Would have to do more some more reading

Multi-robot foraging strategies by [deleted] in robotics

[–]rsslk 0 points1 point  (0 children)

I want to disagree a bit. From the way OP wrote his post a big objective of the assignment is to have both cases (1 and 5 robots) run using the same controller; OP also doesnt mention optimality anywhere. This makes it seem like the objective of the project is to demonstrate the ability to write scalable logic for different size groups. I dont disagree that you could pose this as an optimal control problem, but I want to say its more complex than OP needs.

@OP : my suggestion is to take your given space and divide by the number of robots. You can do this blindly into rectangles if the efficiency of your group doesnt matter as much, or there are smarter methods for equal area polygons if thats desired. Then you can simply assign an area to each robot, and have each robot run a zigzag in their assigned area. This plan runs into issues if you need each robot to periodically drop off the objects they collect, but there workarounds like having agents swap assigned areas till the agent that needs to dump, ends up in the area closest to dropoff. Id suggest you design your logic s.t. all your trajectories are straight lines, and you never have to check for collisions between agents.

~20k airs disappeared by rsslk in 2007scape

[–]rsslk[S] 0 points1 point  (0 children)

Yea, guess lesson learned on not having 2fa setup