Tags

    4/26/2021

    Comments

    4/26/0021 -31:255:255 EGT Julian Calendar
    Ok so after bringing the mac up to the room and harassing the guys trying to present their capstone i continued the soft body thing with the weird classes having pointers of each other. I did a thing last week where the balls keep a pointer to a list of every spring they are connected to, and each spring has a pointer to every ball that it is connected to. I fixed all the stuff where they blow up when classes have data of each other, but this time for some reason the pointers weren't matching up. It took a while to figure this out as it was asserting false when checking f a pointer is part of the spring and took like an hour for me to find it. After I left class I continued and I don't even know how this works but because the ball and spring classes had functions that call each other, and one has to be initialized first, I did the partial initialization of the spring by defining the class, then the ball class was initialized which dedicates a vector of pointers to springs and all the other functions that don't need the spring, then the spring class is initialized everything (except one function that requires a function in the ball which requires a function of the spring but that isn't important), then the functions of the ball that need the spring are initialized. But because the vector to the ball was initialized and had the vector step size set when the spring wasn't initialised, it would store the correct data of the pointers but in the wrong format, so when pushing a pointer on top of that vector, it stores it wrong and is off by a couple bit shifts, then when that pointer is called to get another pointer, it is shifted by the same amount when calling that function which grabs it's pointers off too. I am going to have to do some really weird stuff to fix this, its such an obscure issue with pointers that there is like no one online to help.

    4/28/2020 15:48:33 HST Gregorian Calendar
    The previous day my advisor said I didn't have the second college counseling meeting so I signed up for tomorrow, which was this day, since if I do 2 days I would probably forget or something. I listened for 20 minutes on how to screw computer science majors for minimum wage which was actually very insightful, then had to go to college counseling until 3 o'clock, and I think I made a little kid late for his piano practice by staying too long. When I came back I stole a drill to give to Will, then spent the rest of the time extracting information about isochrone fitting from Will while he almost fell and broke the telescope. It's something like taking the luminosity, color, and type of a star to find its age.

    4/30/2020 15:55:00 HST Gregorian Calendar
    This day I got back to the block matching thing. I decided to try and use OpenCV's algorithm instead of the crappy one I wrote in 20 minutes that gets it wrong half the time. I was going to try and extract images from the .MOV video of Nick's drone, but I decided to try and get OpenCV working on some online test images. It took a while to find a tutorial on how to do OpenCV sterioscopic in c++, and you have to do this weird calibration thing first. The calibration basically, or at least what the tutorial was saying, uses images of a chess board since it had a hard difference between the black square and white squares, and the math is easy to do on squares, except I don't know the math because hypothetically OpenCV should handle all the hard stuff. Also btw idk if I said this yet but the calibration is to see the camera lense and distortion and stuff so the stereoscopic algorism actually works. So then I spent a while looking for a chess board to take pictures of, the gave up, then tried taking pictures of a chess board image on google displayed on my computer screen, but the glare in the conference room kept messing it up since the screen is shiny, and I had to do it under the table pointed towards the window. Then I actually didn't know the format to pass the image into the function, the tutorial said monocolor, or 8 bit RGB, but the input is an array of integers? Not like that was the bottle neck since I copied the drone video into the Documents folder where I was writing the program, it copied it to cloud, and I had 2 of the drone footages for some reason so it was 3.8gb *2 = 7.6 gb and I spent a long time wondering why the text message of the image wasn't going through. Also another thing I just realised is that if I apply the Open CV to every frame of the video, then qt sucks in the whole video to convert to images even if its just one timestamp, it would use at least 3.8 gb of ram(technically virtual memory but who cares) out of 8 gb which is a lot, and if it fills all the way up it will go to the storage which will make t super slow, but it will technically still work.

    So this week an unintentional bitshifted pointer to a pointer messed up, then I watched Will fail at fixing the telescope, then had no idea what I was doing for programming OpenCV in c++.