So, now - a story. Last week on Wednesday, Abi took the van cause she had Lyceum after school, and they had a late rehearsal so I wouldn't have a car until 9pm. Corey took carpool in the morning and so he was gone early, and we were trying to figure out when to go climb, cause we hadn't gone since at all yet last week. I was going to be gone for the girls trip, so Wednesday was our one shot to do it before the trip. BUT trying to coordinate with him was getting frustrating cause he was just like "you tell me" attitude, and I am trying to support him with work and make sure he has time to do his stuff, so I needed some feedback about when was best for him.
Me at 11:45 am - "Want to climb tonight?" No reply about that, though we did message about kids, bills, and other things.
Me at 5:38 - "Abi has late rehearsal so whenever you come home we can try to go climb, or we’ll go Saturday if we can’t make it happen tonight." (See how I'm trying to give him options?) Nothing.
An hour-ish later, Corey was home cause he had to bring S&N home for YW. At 6:27 pm: "we could also go climb early tomorrow morning if you want!" Corey replied right away - "I'm not sure yet - maybe we can do tonight still" Ok... so I'm watching the clock and watching him. He's working, I'm busy with kids, I'm thinking it's not going to happen. I'd asked him about it enough, but I tried one more time at 8:12: "Do you have more work to do tonight?" and that was where I gave up. We weren't deciding, and thus we were choosing the default, which was work and kids. But we'd go to bed early. I kinda wished I could take his car and go boulder, but I knew I couldn't leave him with the kids cause then he'd get interrupted. I decided I wouldn't ask any more about it, and I decided BY MYSELF that I was going to go to bed and get up at 6 (I wasn't going to tell him this) and I'd go climb before I left for the trip. Well, we did end up talking a bit after kids were in bed and he apologized for not getting back to me. Apology accepted. I did mention to him that it would be nice if he'd let me know what he's thinking or have an opinion on things, like he could have given me a yay or nay on climbing, or even an "I'm leaning towards _____" so I'm not just left hanging. I also said like when we are climbing, HE could choose the route we do. He always tells me to choose, so that's a heavy burden I carry. Yeah it's rough. So he's gonna work on that.
- So far today/Tuesday (8:36pm): 10:55
- Monday 12:36
- Saturday 11:49
- Friday 13:25
- Thur 12:46
- Wed 11:00
- Tue 10:55
Here's something he texted me earlier today that shows "what" he's been working on. It is in English, but good luck understanding any of it!
2:27pm - I love you - thanks for taking this journey with me
2:28pm - I'm about to send this prompt to ChatGPT:
All of this work was to figure out the algorithm for a C# implementation using OpenCV (Emgu.CV 4.12.0.5764) that will compute and validate the linear equation, so that we know the proper px/mm ratio and display size in our AR system. But since there isn't a single px/mm ratio and display size (if more than one corresponding point) I will want your help with that later.
First, I'd like you to create a C# method in the attached .cs file. Your changes should be purely additive, but using existing code. Later iterations should be surgical to the code you created. I compare each revision in a diff tool and I've found I get fewer errors if the changes are surgical. The attached file _SolvePnP3.cs has all of the methods used for estimating, refining and refining the CArmTargetToSource and reprojecting points from 3D to 2D (for visual overlay tests). We can also test this .cs file on the same datasets you've been using. It also has methods for choosing Dicom images/frames that are well-suited for the stereo vision triangulation. It also does triangulation on corresponding points (Marker/AprilTag centers) and validates the accuracy of them.
I would like a method to calculate and validate the linear equation, using the different validation methods we've discussed. Whether or not validation succeeds depends on recommended default thresholds in an options class. I'll need you to provide the properties and recommended defaults (with comments). The main method return values should include both linear equations and other info we may need. When doing the 3D absolute position validation, please note that we already have classes and helpers defined in the .cs file for selecting pairs of Dicom images well-suited for triangulation and computing the triangulation. I don't want similar/redundant methods for the triangulation so please use exiting code whenever possible.
When doing the validations, you'll probably need a method that will compute the px/mm ratio and display size. I'd like that to be a public method that I can call and test later on. So don't hide that logic in a helper function. Expose it so it's clear.
I'd love to have the CArmTargetToDetector also, but I don't (for these datasets) have the data you need. The DICOM tag for pixel pitch (physical distance between pixel centers) is (0028,0030) Pixel Spacing, which I can get with some C-Arms, but not others. There may be other DICOM tags that would allow you be able to calculate the CArmTargetToDetector values. Please include optional parameters or method signatures so that (when I have them) I can pass those values in to get the CArmTargetToDetector transform/pose. Please include comments on those methods/parameters to remind me later which DICOM tag values are needed.
The code in _SolvePnP3.cs is currently being called like this. The next step is to calculate valid linear equations.
var estimate = _SolvePnP3.CArmSourceCalibrator.EstimateCArmTargetToSource(c.Intrinsics, frames3, offsetsByMarkerValue, null);
var reprojection = _SolvePnP3.CArmReprojection.ReprojectMarkersTo2D(c.Intrinsics, frames3, offsetsByMarkerValue, estimate.CArmTargetToSource, null, null);// estimate.FrameDiagnostics);
var refined = _SolvePnP3.CArmTargetToSourceRefiner.RefineCArmTargetToSource(c.Intrinsics, frames3, offsetsByMarkerValue, estimate, new _SolvePnP3.CArmTargetToSourceRefinementOptions
{
OptimizeTranslation = true,
MaxIterations = 75,
TrimWorstFraction = 0.0,
// NEW: optical center refinement
OptimizePrincipalPointOffset = true,
InitialPrincipalPointOffsetPixels = new Verifai.Types.Point2DF(0f, 0f),
MaxAbsPrincipalPointOffsetPixels = 50.0,
});
var refinedReprojection = _SolvePnP3.CArmReprojection.ReprojectMarkersTo2D(refined.RefinedIntrinsics, frames3, offsetsByMarkerValue, refined.RefinedCArmTargetToSource, null, null);
var triangulationOptions = new _SolvePnP3.CArmTriangulationOptions
{
MinCommonMarkers = 10,
MinMeanParallaxDeg = 20.0,
RequireStationaryCube = true,
MaxCubeTranslationDeltaMeters = 0.005, // 5 mm
MaxCubeRotationDeltaDeg = 1.0, // 1 deg
};
var pairs = _SolvePnP3.CArmStereoTriangulation.SelectTopFramePairsForTriangulation(refined.RefinedIntrinsics, frames3, offsetsByMarkerValue, refined.RefinedCArmTargetToSource, topN: 10, triangulationOptions);
var triangulations = _SolvePnP3.CArmStereoTriangulation.TriangulatePairs(refined.RefinedIntrinsics, frames3, offsetsByMarkerValue, refined.RefinedCArmTargetToSource, pairs, triangulationOptions);
var comparisons = _SolvePnP3.CArmStereoTriangulation.CompareTriangulations(triangulations, frames3, offsetsByMarkerValue);
So to review:
- Method to compute and validate linear equations for each data set (filtered on orthogonal'ish frames)
- Whatever method (called by validation tests) that uses the linear equation values as parameters should be public so I can easily test that separately
- Show me how to call the method
There is more to come after this, but does this make sense? If so, please suggest the method signature to calculate/verify the linear equations and what the recommended default options are.
I replied via a dizzy emoji and said: "I'm not sure I could figure that out if I had a decade"
Corey replied:
it's taken me this long on this project to understand it myself!
but now that I do (mostly) I feel like I'm going fast
hope B_____ can hang in a little longer (referring to his friend who had this idea a few years ago and has been funding it this whole time by himself)
would take months to implement/test all this code, but ChatGPT is fast...amazing.
Ok, given that text message above from earlier and ALL that complex whatever it is programming stuff work that Corey's brain has to do day in and day out, I'll guess I should try and just chill the beans about him not having strong opinions on all the little things around our schedule, life, or home. His brain is full and does not have room for it! There is as much risk as ever on this project, and our jenga tower is about to topple, but we'll keep going, like Abraham climbing up Mount Moriah but with the determination in Genesis 22:5 that the lad and I will "come again unto you"
Neither Corey or I exercised yesterday, so we did make it a priority to go climbing tonight. I gave him a four options for what the rest of the evening could look like, then he asked me which one was best for the kids, and I chose #1, so that's what we did: 4pm climb, 6pm dinner, 7pm more work, 9pm scriptures 10pm bed. We went, we climbed the climbs, and I chose all the climbs, but it was ok it was at Millcreek and there were lots of new routes that we hadn't done, so it was easy to choose cause we were mostly trying the new ones. On the last one, I did a 5.10a and he said he wanted to do a different one! I congratulated him afterwards for having a preference!! Then, Lily had stayed after school, so we went to go pick her up on Neff Lane. As we were leaving, I drove east and then I had to turn left/south and there were lots of cars coming. I wondered aloud if Neff Lane had an east exit? Could get out that way? I tried to look at my map but was still watching cars... Should I turn around? Corey said passively "If you want to" then after a pause he continued: "Would you like me to have a strong opinion about that?" Which had me laughing as we drove him back to his dad's house. So accommodating to check if I approved of his non-opinion. It was funny. He makes me laugh. I'm still here blogging, he's still at his dad's, so the "9pm scriptures" didn't happen, I'm going to go read with the kids now and hopefully Corey will be home soon.
One last thing - Corey and I both went to the temple today. I woke up at 4:15 but I didn't get out the door, cause at 4:30 as I was exiting the closet, Katharine was awake on the bed and was a bit chatty. She said I should stay, so I did and I got back in bed with her wearing my dress. She told me about her dream (she fell off the trampoline). Corey left for intiatories at 7, and after he got back around 8:45 I was still in my dress. He asked if I'd gone to the temple. I said no. He said I could go now and he'd work from home, so I did and it was nice. When I got home, he asked if I'd received any insights. I said that I was thinking this morning about an answer I got last year, so as I sat in the celestial room, I looked up those verses. I couldn't remember what book it had been in - I searched Ezra first, but I remembered it was in a "chapter 2" and Ezra 2 wasn't it. Then I found it - Joel chapter 2 - . Joel 2 was an answer to prayer in Dec 2022, and again in Jan 2025, which is journaled in the photo below (I'll try to come back to type it out later):
So I sent that pic to Corey, I don't know if he read it. I sent him the verses I liked - verses 21 - 27:
21 ¶ Fear not, O land; be glad and rejoice: for the Lord will do great things.
22 Be not afraid, ye beasts of the field: for the pastures of the wilderness do spring, for the tree beareth her fruit, the fig tree and the vine do yield their strength.
23 Be glad then, ye children of Zion, and rejoice in the Lord your God: for he hath given you the former rain moderately, and he will cause to come down for you the rain, the former rain, and the latter rain in the first month.
24 And the floors shall be full of wheat, and the fats shall overflow with wine and oil.
25 And I will restore to you the years that the locust hath eaten, the cankerworm, and the caterpillar, and the palmerworm, my great army which I sent among you.
26 And ye shall eat in plenty, and be satisfied, and praise the name of the Lord your God, that hath dealt wondrously with you: and my people shall never be ashamed.
27 And ye shall know that I am in the midst of Israel, and that I am the Lord your God, and none else: and my people shall never be ashamed.











