#robotics Logs

Jan 01 2019

#robotics Calendar

12:30 AM rue_mohr: there used to be enough active people in here to countdown newyears!
01:22 AM Mikeee is now known as covfefe
01:22 AM covfefe is now known as Guest57081
01:23 AM Guest57081 is now known as covfefee
01:23 AM covfefee is now known as Mikeee
01:54 AM rue_mohr: my new years resoltuion is to know what I can afford to build by the end of the year
01:56 AM rue_mohr: and find new people to talk to
01:56 AM rue_mohr: cmon, I'm not good enough?
01:56 AM rue_mohr: no I just need more than me to talk to
01:56 AM rue_mohr: I'm not :(
01:58 AM rue_mohr: maybe the channels dead and you should give up
01:58 AM rue_mohr: I'm not about giving up
02:00 AM rue_mohr: 10
02:00 AM rue_mohr: 9
02:00 AM rue_mohr: 8
02:00 AM rue_mohr: 7
02:00 AM rue_mohr: 6
02:00 AM rue_mohr: 5
02:01 AM rue_mohr: 1
02:01 AM rue_mohr: yaaaaay happppy newyears!!!!!!
02:01 AM rue_mohr: happy newyears rue!!!!
02:01 AM rue_mohr: haha!
02:01 AM rue_mohr: yaaay!
02:02 AM rue_mohr: god its gonna be lonley after the rest of the humans die
02:59 AM mrdata||: happy new year
03:00 AM mrdata||: dont die
03:46 AM rue_mohr: ok
03:48 AM rue_mohr: so, SDL changed
03:53 AM rue_mohr: ok zhanx
03:53 AM rue_mohr: SDL2
04:05 AM rue_mohr: ok, I was able to load a bmp
04:07 AM rue_mohr: ok I was able to load a jpg
04:08 AM polprog: doing SDL?
04:08 AM rue_mohr: SDL2
04:08 AM polprog: also happy new year rue
04:08 AM rue_mohr: cause, apparently SDL wasn't good enough for the world
04:08 AM rue_mohr: happy new years!
04:08 AM polprog: tried that, pretty nice interface
04:08 AM rue_mohr: I need to diff two images
04:08 AM polprog: but it was back when i couldnt code in C that good
04:09 AM polprog: apropos images, made that yesterday
04:09 AM polprog: http://polprog.net/papiery/image-analyzer/
04:09 AM rue_mohr: I'm making a 3d scanner
04:10 AM rue_mohr: I can turn a laser on and off, I need to diff the images to find the line
04:10 AM polprog: ooh
04:13 AM rue_mohr: neat tho
04:14 AM rue_mohr: what did you make it for?
04:31 AM rue_mohr: ok, I loaded the same image twice and created a third image with the same attributes
04:39 AM rue_mohr: ok, the data had to be copied before its fed to a texture renderer,
04:39 AM rue_mohr: but ok, my data copied
04:47 AM rue_mohr: ok, I diff'd the two images and got black, good
04:50 AM rue_mohr: ok, so next I need to take two images with the camera and see how they naturally diff
04:57 AM rue_mohr: ok, two sucessive images
04:57 AM rue_mohr: wow, thats a lot of funkey noise
05:08 AM rue_mohr: I wonder what I do now
05:08 AM rue_mohr: apparently a lot of blue difference
05:12 AM polprog: i made it out of curiosity, and to learn a bit of matplotlib
05:13 AM polprog: its interesting how most pictures i loaded have the Cb and Cr image blurry
05:13 AM polprog: maybe its due to chroma subsampling
05:13 AM rue_mohr: commends, that took an hour...
05:13 AM rue_mohr: so, I had the pi take two images
05:13 AM polprog: how do those images look like?
05:13 AM rue_mohr: and I did a rgb diff on them, and got interesting noise
05:14 AM polprog: interesting
05:14 AM rue_mohr: 1 min
05:14 AM polprog: if its for 3d scanner, maybe you should convert it to b/w and do monochrome processing
05:15 AM rue_mohr: its a red laser line, the trick is to find it
05:15 AM rue_mohr: http://ruemohr.org/~ircjunk/images/3dscanner/
05:15 AM rue_mohr: to the eye, the images seem to be identicle
05:15 AM rue_mohr: but the diff shows lots of noise in mostly blue
05:15 AM rue_mohr: thoughts?
05:16 AM polprog: yeah
05:16 AM polprog: its too dark
05:16 AM polprog: you should get better light, thats just camera noise
05:17 AM polprog: also image2.jpg has some sort of a different white balance
05:17 AM polprog: is just a little bit more blueish
05:17 AM rue_mohr: the pi cam does an adjust before it take the image
05:17 AM rue_mohr: I dont know if I can tell it not to
05:17 AM polprog: hmm, thats a problem
05:18 AM rue_mohr: it shouldn't ahve to be
05:18 AM rue_mohr: the difference I'm looking for is BIG
05:18 AM rue_mohr: raspistill -vf -hf -o /itmp/image2.jpg
05:19 AM polprog: that diff noise is interesting
05:19 AM rue_mohr: how does it analize, I didn't try
05:19 AM polprog: maybe try outputting in an uncompressed format, or lossless compressed
05:20 AM rue_mohr: I dont think I can, I think the hardware does jpg compression
05:20 AM polprog: im seeing a lot of white pixels in it and that doesnt seem right
05:20 AM rue_mohr: .. its the shop cieling
05:20 AM polprog: yeah
05:20 AM rue_mohr: and that light in the corner is saturating it
05:21 AM rue_mohr: (flourescent fixture)
05:21 AM polprog: white in the difference means that this pixel is different by 255 between images
05:21 AM polprog: that doesnt make sense
05:22 AM rue_mohr: "raspistillyuv does not use an encoder, and
05:22 AM rue_mohr: sends its YUV or RGB output direct from camera component to
05:22 AM rue_mohr: file."
05:23 AM rue_mohr: that should get around jpg errors
05:23 AM rue_mohr: if I can read it
05:23 AM rue_mohr: "It is necessary for the camera to produce
05:23 AM rue_mohr: preview frames even if not required for display, as they are used
05:23 AM rue_mohr: for calculating exposure and white balance settings."
05:26 AM rue_mohr: I can turn off awb
05:28 AM rue_mohr: I can set the quality to 100, that is no-error, right?
05:28 AM polprog: no idea
05:29 AM polprog: damn this is not a difference calc error
05:29 AM polprog: they really do differ like that
05:29 AM rue_mohr: oh there, png
05:30 AM rue_mohr: :) thanks for the help
05:30 AM rue_mohr: ok, I'm gonna try this
05:30 AM rue_mohr: png output format (no compression) awb off ...
05:34 AM rue_mohr: huh
05:34 AM rue_mohr: awb off generates an almost completely black image
05:35 AM polprog: this is due to image compression imo
05:36 AM rue_mohr: ok I'll play a bit more...
05:36 AM rue_mohr: I can have it output png
05:36 AM rue_mohr: I presume it hasn't chewn on it if I do that
05:37 AM polprog: http://polprog.net/rozne1/rues-diff.png
05:37 AM polprog: the luminosity difference is never lower than 30
05:37 AM rue_mohr: is that bad?
05:37 AM polprog: no
05:37 AM polprog: its perfet
05:38 AM polprog: perfect*
05:38 AM polprog: if you then take an image with the red beam visible, you will be able to spot it immediately
05:38 AM rue_mohr: oh, k
05:39 AM rue_mohr: I want to spend a few mins and get jpg out of the scene
05:39 AM rue_mohr: ! thats suspicious
05:40 AM rue_mohr: the diff of two pngs is perfect
05:40 AM polprog: thats okay i think
05:40 AM rue_mohr: but
05:40 AM rue_mohr: flourescent lights
05:40 AM polprog: you expect flicker?
05:40 AM rue_mohr: there *must* be a tiny amount of diff
05:40 AM rue_mohr: 1 min while I check things
05:40 AM polprog: if the images look the same, there shouldnt be much diff
05:41 AM polprog: unless its all zeroes
05:41 AM rue_mohr: it looked all zeros
05:41 AM rue_mohr: actaully, with the awb off, its mostly black anyhow
05:42 AM rue_mohr: oh, hehe
05:42 AM rue_mohr: *blush*
05:43 AM rue_mohr: the png is 32bpp,
05:43 AM polprog: :D
05:43 AM rue_mohr: when you take an alpha of 255....
05:43 AM rue_mohr: = alpha 0...
05:43 AM rue_mohr: hehe
05:43 AM rue_mohr: thinking....
05:45 AM polprog: effing jaypegs
05:47 AM rue_mohr: thaaaats better
05:47 AM rue_mohr: check out this set...
05:48 AM polprog: huh my computer tthrew a memory error
05:48 AM polprog: python doesnt like keeping 4 arrays of 3000x4000 data lol
05:48 AM rue_mohr: http://ruemohr.org/~ircjunk/images/3dscanner/
05:49 AM rue_mohr: image1.png, 2.png, and out.png
05:49 AM polprog: hmm
05:49 AM polprog: are they supposed to be green and black
05:49 AM rue_mohr: I think awb is a bad thing if I'm gonna be turning a laser on and off between images
05:50 AM rue_mohr: its an odd diff pattern eh?
05:50 AM polprog: yeah
05:50 AM rue_mohr: the image1 and image2 are the images without the awb
05:50 AM polprog: check mine out
05:50 AM polprog: https://puu.sh/Cq4d0/438db180ba.png
05:50 AM rue_mohr: 8-o
05:50 AM rue_mohr: what kinda camera
05:50 AM rue_mohr: ?
05:51 AM polprog: its a 4000x3000 jpg from the camera downscaled to 400x300 png with irfan
05:51 AM polprog: old cannon g9
05:51 AM polprog: but the original jpg diff was super noisy
05:51 AM rue_mohr: is the shadow the position difference?
05:51 AM polprog: can run it again as it just runs out of memory
05:52 AM polprog: dunno
05:52 AM polprog: the good and bad thing about matplotlib is that its auto ranging the plots
05:52 AM polprog: hence the value bar on the right in the luma difference
05:52 AM rue_mohr: well as far as where's waldo, you win :)
05:53 AM rue_mohr: hmm
05:53 AM polprog: on yur jgs the difference was of an order of 30
05:53 AM rue_mohr: if I turn awb back on and try two pngs?
05:53 AM polprog: black here is barely .5
05:53 AM polprog: that should be good
05:55 AM rue_mohr: ok, so image 1 looks a *tiny* bit lighter by eye
05:56 AM rue_mohr: wow were back to what I had with the origional jpgs
05:56 AM rue_mohr: I'll upload
05:57 AM rue_mohr: http://ruemohr.org/~ircjunk/images/3dscanner/
05:57 AM rue_mohr: just the 3 png
05:57 AM rue_mohr: checkout out.png tho,
05:58 AM polprog: hmm
05:58 AM rue_mohr: hey, I wonder how consistant that pattern is...
05:58 AM polprog: didi you upload
05:58 AM rue_mohr: yea
05:59 AM polprog: out.png 2019-01-01 06:55 5.5M
05:59 AM polprog: i see a bunch of green
05:59 AM rue_mohr: yea
06:00 AM rue_mohr: thats the diff of image1.png and image2.png
06:01 AM rue_mohr: but there was no jpg compression involved
06:02 AM rue_mohr: but if I'm doing this with all the automatic stuff on, its gonna have a fit between me turning the laser on and off
06:02 AM rue_mohr: esp with the red balance
06:02 AM polprog: try taking an image with the laser dot
06:02 AM rue_mohr: :) its a line
06:02 AM rue_mohr: hmm
06:02 AM rue_mohr: its 4am
06:03 AM polprog: whatever :D
06:03 AM rue_mohr: I COULD go plug in the laser and code it all up
06:03 AM polprog: im curous if this laser will be visible in the diff
06:03 AM rue_mohr: or take a melatonin, lay in bed, and hit myself in the head with a hammer a few times
06:03 AM rue_mohr: ....laser...
06:04 AM rue_mohr: I choose io4 because its beside a ground
06:05 AM rue_mohr: same side as 11, pins 4&5 with 5 being gnd
06:08 AM rue_shop1: same...
06:08 AM rue_shop1: as... connect the....
06:10 AM rue_shop1: direction, step, laser....
06:10 AM rue_shop1: vise...
06:11 AM rue_shop1: that should work...
06:12 AM polprog: gpio?
06:12 AM polprog: what raspi?
06:12 AM rue_mohr: origional
06:12 AM rue_mohr: need to code for a sec
06:13 AM rue_mohr: I was going to shut off the shop lights, but that will severly up the noise
06:13 AM polprog: mind sharing the image diff code later?
06:13 AM polprog: ligting is obviously crucial
06:13 AM rue_mohr: I used SDL
06:13 AM polprog: yeah but im curious how
06:14 AM rue_mohr: http://ruemohr.org/~ircjunk/programming/c/diffimage.c
06:17 AM polprog: thanks
06:17 AM polprog: i might get back to SDL
06:17 AM polprog: python is just too heavy for some tasks
06:17 AM polprog: if i was to make video analysis like that in real time
06:17 AM polprog: diffing from a webcam or something
06:19 AM polprog: lol how come i have coreutils installed on windows
06:19 AM polprog: vim must have done that
06:19 AM rue_mohr: hehe
06:19 AM polprog: i can run 'ls' and 'cp' in the command prompt o_O
06:20 AM polprog: $ uname
06:20 AM polprog: MINGW32_NT-6.1
06:20 AM polprog: :DDD
06:26 AM rue_shop1: eeek
06:26 AM rue_shop1: damn unlabeled connectors
06:27 AM rue_shop1: pin 23
06:27 AM rue_shop1: gpio11
06:30 AM rue_mohr: hope I didn't hurt anything
06:34 AM rue_shop1: sorry, this isn't working and I really cant debug it now
07:07 AM polprog: nighters rue
02:30 PM rue_mohr: ok, I'm awake, kinda
02:44 PM rue_shop1: so, why isn't the pi turning on the death-laser?
02:48 PM rue_shop1: ah, the laser was plugged in backwards
02:48 PM rue_shop1: yuppers
02:50 PM rue_shop1: I suppose while I'm at it, I should set up the motor too
02:50 PM rue_shop1: pin 21
02:52 PM rue_shop1: ok lets see
02:52 PM rue_shop1: 400ppr 8 microstep, 14:222
02:53 PM rue_shop1: huh
02:53 PM rue_shop1: 50742.9 ppr
03:00 PM rue_shop1: ok zhanx the pi is rotating the table now
03:01 PM rue_shop1: 5.6M per image...
03:01 PM rue_shop1: 720 images
03:01 PM rue_shop1: 4G per scan
03:02 PM rue_shop1: :S
03:02 PM rue_shop1: doable but EEEESH!
03:27 PM rue_mohr: ok, so I should take another image set
04:02 PM polprog: did you already take an image with the laser on and off?
04:02 PM polprog: that way youcan easily find the best algorhitm for tracing the laser line
04:02 PM rue_shop3: I was almost there, got guest and stuff
08:24 PM rue_mohr: ok, lets see if I can take some special pictures for polprog
09:24 PM rue_mohr: polprog, I got it, care you alive?
09:24 PM rue_mohr: are you alive?
09:26 PM rue_mohr: http://ruemohr.org/~ircjunk/images/3dscanner/out.png
09:36 PM rue_mohr: arg, of course, you dont modulus it 2 you use 3
09:39 PM rue_mohr: the noise patterns are odd
09:39 PM rue_mohr: polprog, I trimmed down that result to just the red
09:39 PM rue_mohr: but I'm wondering
09:40 PM rue_mohr: odd, green looks most useless
09:42 PM rue_mohr: I also need to take a square-on image of my 1cm grid, so I can work out what the lens correction should be
10:24 PM rue_mohr: oops, a flag was missing, those are actaully jp
10:24 PM rue_mohr: g
10:25 PM rue_mohr: ok, here does, first 3d scan, nothing set up right...
11:02 PM rue_mohr: I suppose if you want to be heard, you have to post an article to a site
11:08 PM rue_mohr: it occurs to me that lasers are so 80's
11:09 PM rue_mohr: I think we should be using a polorized antilight beam
11:09 PM rue_mohr: ah, and look for the darkness
11:09 PM rue_mohr: yes, it might be easier