Chapman Kids Blog

"In the world ye shall have tribulation: but be of good cheer; I have overcome the world." –John 16:33

Danger in Brazil… and America?

My brother-in-law worked in São Paulo, Brazil for a couple years, right at the turn of the millennium. Here is an article from 2007 in Vanity Fair titled City of Fear. It talks about a very dangerous series of events that happened there five or six years after he returned to Mexico. There was a continuous string of attacks on the police that created chaos that caused a panic, shutting the city down for days with people locked in their homes cowering in fear with traffic jams everywhere until people got home. It is an interesting read about a scary situation. Peter Grant from the Bayou Renaissance Man blog makes the case that all the stars are aligning that could allow the same kind of event to happen here in the United States. In his article titled US cities are becoming much more dangerous places, he talks about how the BLM movement, the influx of illegals from many chaotic and violent places and the way the law enforcement community has had to respond to what is a no-win situation for them means some version of this kind of chaotic event could arrive in large cities in the US. Read the article. He makes a compelling case.

Update: Turns out, my brother-in-law was on a business trip in São Paulo when this was all happening. I cannot wait to get together with him and hear the story.

The Intellectual Yet Idiot: A seminal article on who is really “the problem”

A brilliant article titled The Intellectual Yet Idiot, written by a guy named Nassim Nicholas Taleb puts in words something that has been in my mind as well as the minds of others, more thoughtful than my myself for a long, long time. I have written about the pontifications of the likes of Neil deGrasse Tyson, Richard Dawkins, Mark Borg, Bart Ehrman and some others with respect to subjects in which I am interested, but the people about whom Taleb writes live in every segment of our society. At some level, they are all Social Justice Warriors. Even, if not especially, our the current president of these United States fits very comfortably into this category. The article starts off like this and just gets better and better the further one reads:

What we have been seeing worldwide, from India to the UK to the US, is the rebellion against the inner circle of no-skin-in-the-game policymaking “clerks” and journalists-insiders, that class of paternalistic semi-intellectual experts with some Ivy league, Oxford-Cambridge, or similar label-driven education who are telling the rest of us 1) what to do, 2) what to eat, 3) how to speak, 4) how to think… and 5) who to vote for.

But the problem is the one-eyed following the blind: these self-described members of the “intelligenzia” can’t find a coconut in Coconut Island, meaning they aren’t intelligent enough to define intelligence hence fall into circularities?—?but their main skill is capacity to pass exams written by people like them. With psychology papers replicating less than 40%, dietary advice reversing after 30 years of fatphobia, macroeconomic analysis working worse than astrology, the appointment of Bernanke who was less than clueless of the risks, and pharmaceutical trials replicating at best only 1/3 of the time, people are perfectly entitled to rely on their own ancestral instinct and listen to their grandmothers (or Montaigne and such filtered classical knowledge) with a better track record than these policymaking goons.

Update: This fascinating and fun article titled Global Warming Alarmists Promote XKCD Time Series Cartoon, Ignore Its Mistakes from The Stream perfectly makes the point with respect to global warming.

YUYV (YUV422) to BGR/RGB conversion (for Logitch C270 camera using openCV)

I had an irritating problem doing a simple image conversion for my GaugeCam project where I am capturing images with a USB camera that I want to process with OpenCV on a Beaglebone Black embedded computer. I am using a Logitech C270 camera for my development work on the desktop, but we will be using a different, more industrial quality camera when we get ready to put the devices we are building in the field. At any rate, I usually can just do an Internet search and find some code I can cut and paste to do this simply types of conversions so I though I would just put this out there in case anyone wants to use it. If you have questions on how to use it with OpenCV, just ask. Feel free to just cut and paste as needed–use at your own risk, it works in my application.This is not a tutorial, just a convenience for whoever can use it. I know the format is not great–I will get around to adding something to the blog for code pasting if I ever do any more of it.

A couple of additional notes:

  • I am converting this to BGR (for OpenCV) rather than the RGB specified in Wikipedia.
  • I am using the boost::algorithm::clamp method to do the clamping (using namespace boost::algorithm). You can do clamping with something like this if you like: MIN( 255, MAX( 0, x ) )
  • You might have to convert “u_char” to “unsigned char” depending on what other includes you use.
  • I am assuming the stride of both the source and destination buffers are equal to the width.
  • I am assuming the output buffer has been allocated.
  • I am assuming the input buffer is a YUYV buffer that is two-thirds the size of the output buffer in the format specified in the Wikipedia link.
  • The way I am using this is passing the cv::Mat data pointer into the method as the output buffer.

// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// Conversion algorithm from: https://en.wikipedia.org/wiki/YUV
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
int ConvertYUYV_2_BGR( const int nWidth, const int nHeight,
                       u_char *pPixSrc, u_char *pPixDst )

{
    if ( NULL == pPixSrc || NULL == pPixDst )
    {
        cerr << “FAIL: Cannot convert YUYV to BGR from/to NULL pixel buffers” << endl;
        return -1;
    }

    int nStrideSrc = nWidth * 2;
    int nStrideDst = nWidth * 3;
    u_char *pSrc = pPixSrc;
    u_char *pDst = pPixDst;
    int nRow, nCol, nColDst, c, d, e;
    for ( nRow = 0; nRow < nHeight; ++nRow )
    {
        for ( nCol = 0, nColDst = 0; nCol < nStrideSrc; nCol +=4, nColDst += 6 )
        {
            d  = ( int )pSrc[ nCol + 1 ] – 128;    // d = u – 128;
            e  = ( int )pSrc[ nCol + 3 ] – 128;    // e = v – 128;

           
            // c = y’ – 16 (for first pixel)
            c = 298 * ( ( int )pSrc[ nCol ] – 16 );

                     // B – Blue
            pDst[ nColDst     ] = ( u_char )clamp( ( c + 516 * d + 128 ) >> 8, 0, 255 );
           
// G -Green
            pDst[ nColDst + 1 ] = ( u_char )clamp( ( c – 100 * d – 208 * e + 128 ) >> 8, 0, 255 );
           
// R – Red
            pDst[ nColDst + 2 ] = ( u_char )clamp( ( c + 409 * e + 128 ) >> 8, 0, 255 );

            // c = y’ – 16 (for second pixel)
            c = 298 * ( ( int )pSrc[ nCol + 2 ] – 16 );

            // B – Blue
            pDst[ nColDst + 3 ] = ( u_char )clamp( ( c + 516 * d + 128 ) >> 8, 0, 255 );
                     // G -Green
            pDst[ nColDst + 4 ] = ( u_char )clamp( ( c – 100 * d – 208 * e + 128 ) >> 8, 0, 255 );

                     // R – Red
            pDst[ nColDst + 5 ] = ( u_char )clamp( ( c + 409 * e + 128 ) >> 8, 0, 255 );
        }
        pSrc += nStrideSrc;
        pDst += nStrideDst;
    }
    return 0;
}

What do you do the night of El Grito de Dolores?

Kiwi and Dad partying hard in celebration of Mexican Indepence DayKiwi and I are having a pretty exciting night on the eve of El Grito de Dolores. People all over Mexico will be in the central plazas of their cities and towns to celebrate Mexican Independence. Of course, we are also celebrating our friend Vanesa’s birthday. We are not sure which is most exciting. You can see from the picture at the right that we are partying pretty hard–so hard that I am almost certain we will not make it until midnight when all the shouting begins.

Not a retirement kind of guy

House plansI have always said I would like to work until I am at least 80 if I am healthy and can find gainful employment. The thought of going fishing, golfing or recreating full time, while I see nothing wrong with it, does not sound particularly appealing. I love my work. At the same time, it would be kind of nice to live exactly where Lorena wants to live, hopefully not too far from wherever our kids land. It would also be pretty nice to work from home at least half of the time after I pass 65 or so. I am not a spring chicken anymore and the kids are gone, so Lorena and I are looking at home plans and trying to figure out where we want to land in retirement. It is a hard thing when you have few facts and no certainty about the future. Still, we have identified a few places and are looking at house plans (we think we might want to build, but are not sure). It is going to fun but stressful.

Woo-hoo! Lorena starts back to college!

Clackamas Community CollegeWe found out today that Lorena made it past the waitlist and is now enrolled into two online classes at Clackamas Community College. She only has a few classes left and this was the best way to get her to her degree. It is a challenge because one of the classes is Statistics, a pretty hard class. I actually use statistics on a daily basis at my day job, but her best hope for good help is with Kelly (BS Statistics) and Christian (BS Applied Mathematics). We are very excited for Lorena and hope she can finish either this Spring or next Fall. After (in October) 24 years of marriage, I still relish the thought that we are paying for education. I hope it never ends.

Doing my one trick

It is not much of a joke, but in terms of my work, I describe myself as a one trick pony. I generally hired to fix one hard problem in the domain of machine vision and image processing. I do that one trick and then I am on to the next thing. I can do other stuff in the domain of certain specialized types of programming, but the one thing at which I am really good is that one trick. My single minded focus over the last couple of months has been to do that work in most of my spare time at home as well as at work. I figure I have one or two more months of that kind of work before I have all my volunteer work, contract work and other sundry efforts under control well enough to get back to a more normal life. I really do love it, but it gets in the way of exercise, reading and even eating well, so I need to get it all out of the way. I am writing this because 9/11 is a nice reminder to put some things into perspective. This is fun stuff that pays the rent, but it is still not nearly as important as what comes down to relationships, first with God, then with family, friends and neighbors. I guess it is time to make a plan to really get this stuff out of the way and get on with real life.

Good progress on webification of GaugeCam software

My work to develop a camera with a web interface for GaugeCam is progressing nicely. Right now, I am just working on GUI kinds of things. I have live images and snapshots from the camera working and have moved on to a good little chunk of work to get region-of-interest selection and ruler tool setup working on the web as it worked in the original software. Sadly, the hard drive on my computer at home went bad so I am fighting through that for a little while.
GaugeCam webification progresses

Christian heads home

Grauate text about Functional AnalysisIt pains me when I say Christian is headed home, not so much because he is going there, but that, after two years of graduate school away from our home–that of Lorena and I, his home is really his own and not ours. That is always a good thing, but leaves most parents with feelings of melancholy. We had a great time during his 21st birthday visit. We ate a lot of good food, discussed life and its trials vigorously and saw our now grown son in a different light than before. He is his own man. We look forward to his next visit, probably Thanksgiving and have plans to do more of the same–hang out, talk, eat and enjoy our children as adults.

The book at the right was from one of his classes, Functional Analysis in the Math Department. He studied pretty hard while he was here in Texas. His other class is a hard, graduate level physics class, Quantum Physics in the Physics Department. We asked him why he took such hard classes. He no longer has to do that if he does not want to, but believes taking easy classes are a waste of time–if they are easy, he can learn the material from a book.

Parents of adult children — Christian’s 21st birthday

Christian's 21st birthday -- Labor Day 2016Lorena and I are now, officially and with no caveats, the parents of adult children. We have pretty much been that for a couple of years now at least as the kids have been out of the house and on their own since they finished their undergraduate degrees, but it took us a couple of years to realize it all an now they are both adults with all the rights the law bestows and responsibilities the law demands. It seems like things are different now in a good buy melancholic way.

We are grateful Christian flew out to see us. We had a great time with him. He did not have to do it–there was a lot going on with friends in Arizona and Oregon the he missed to be here. We did some of the stuff we did when he was a little kid–went to the zoo and a museum–and a had a great time. It is fun to be at those kind of venues (although, it still seems creepy that they stuffed Trigger and have him on display), the best part being the chance to visit along the way.

Then, last night, we took him out to dinner and today he will be on his way home. His home. That is a good thing.

Bird’s of Prey at the Ft. Worth Zoo

Lorena, Christian and I had a GREAT experience today at the Ft. Worth Zoo today. We say lions, tigers, gorillas, bonobos, alligators, crocodiles, penguins and only made it half way through the zoo. We highly, highly, highly recommend the Ft. Worth Zoo. The most amazing thing we saw, though was a small bird stalking–slowly and very, very cautiously sneaking, step by slow, slow step–a dragon fly. Christian captured the sequence through a very dirty glass window with the wrong lens and no filter. It still came out pretty good. The fourth picture is a close-up, right after the catch.The dragonfly is small in the image, but you can see it well right before the step in the log toward the left of the image.

Dragonfly stalk 0

Dragonfly stalk 1

Dragonfly stalk 2

Dragonfly stalk 3

Dragonfly stalk 4

Dragonfly stalk 5

The homework never ends

Christian's last weekend as a twenty year oldChristian got on an airplane a little after midnight on Wednesday to arrive here in Texas at five in the morning yesterday. He is here to celebrate his last weekend as a twenty year old. He got now sleep last night, but had a homework assignment due at three (Texas time), so he did not get to go to bed until yesterday afternoon. The crazy part is that, the problem he was required to solve assumed some things that were not stated in the problem and that mathematicians can never assume. He ended up writing a note to the professor to say how he just did not know how to solve the problem “generally.” The professor wrote back and said he never intended for the problem to be solved generally, just in some important cases. So Christian, in the time-honored tradition of graduate students everywhere, got to waste a night solving a problem that was unsolvable based on the incomplete information provided in the problem statement.

Social status and Tom Wolfe’s take on Chomsky and Darwin

The Kingdom of Speech by Tom WolfeI wonder whether I would really like Tom Wolfe very much in real life. I have always suspected I might not, but I very well could be wrong. My take on his writing is that he finds subjects that people out of vogue have screamed about for years, then very cleverly writes about those “insightful” things and gets many public accolades and lots of money. Don’t get me wrong, I think he is providing a great service and it is a good gig if you can get it. He started doing this with Radical Chic and has had many successes leading up to his latest take on the self-satisfied Noam Chomsky’s ownership of the “right” way to think about linguistics. David Klinghoffer does a stellar job of explaining it all in his post at ENV titled In The Kingdom of Speech, Tom Wolfe Tells the Story of Evolution’s Epic Tumble. My favorite part of the article explains Wolfe’s game, seemingly every time he plays it–and it is a good game–exposing the pretensions of pretentious people:

Wolfe frames his story in terms of two pairs of rivals or doppelgängers — Charles Darwin and Alfred Russel Wallace, on one hand, and linguists Noam Chomsky and Daniel Everett on the other. As in every other book of his that I’ve read, Wolfe is sharply attuned to matters of status, rank, class — which explain so much not only in fashion or politics but in the history of ideas. In both of these pairs of scientists, one is the established figure, the man of rank and prestige (Darwin, Chomsky), while he was overtaken and nearly knocked from his pedestal by a field researcher of lesser cachet (Wallace, Everett), a “flycatcher” in Wolfe’s phrase.

Chomsky and Darwin “won” the game of science, not because they were right but because they had social, pop cultural cachet. I think that is exactly right. I think Wolfe has earned his place in society partly because he is such an engaging writer, but even more so because he, too, has the social, pop cultural cachet to not only say the emperor has no clothes, but to get people to actually listen to and consider the idea. That is something a lot of people knew all along. They  are mostly people who live in fly-over country and attended Big State U. as opposed to one of the Ivys.

Beaglebone Black development — Bringing up a website

I got my we GaugeCam development site, http://gaugecam-dev.duckdns.org/, that I run from my home office on the BBB up and going again. You can see it here. It is pretty rudimentary right now, but I will start moving the new GaugeCam software there as I get it written. I am, again, putting up a list of the things I did to get there for my own self so I can duplicate it again and when I get to the next project. This post is going to be a list of links to a couple of videos and the stellar duckdns site that provides free dynamic DNS services for hobby and volunteer projects like this. So here is the list that got me up and running:

    Lauro, a passion for art and Daniel Silva

    Lauro painting - El RiachueloLorena’s oldest brother Lauro is a passionate painter. He spends every spare minute painting. We were in Mexico one year when he got sent to Paris by his company for leadership training for a week. While everyone else went out and partied after the daily meetings, Lauro went wherever he could find impressionist paintings. He eventually made is way down to an area frequented by impressionists. They set up their easels there on the sidewalks and paint. He spent hours watching and talking to them. Eventually, he bought a couple of small paintings that he brought back with him to Mexico.

    I love Lauro’s passion for his art. I have been meaning to tell him about some novels I am reading where his kind of art and passion for art play a big role in the plots of virtually every book in a fairly large series. To do that, I have to admit that one of my guilty pleasures is to ready spy and mystery novels. Several months ago I ran into a recommendation for one of the novels by Marvin Olasky in an old article in World Magazine:The Kill Artist by Daniel Silva

    Here’s my unconventional reading recommendation for high-school seniors: Daniel Silva’s The Heist (HarperCollins, 2014). It’s real: starts with the murder of a fallen British spy involved in the theft of great paintings. It’s a page-turner: continues with the efforts of Silva’s great hero, Israeli spy (and art restorer) Gabriel Allon, and a brave young woman who survived a Syrian massacre. It’s a proven reader-pleaser: This is the 14th novel in a series that repeatedly hits No. 1 on bestseller lists. And The Heist is 2/3 satisfactory regarding the “bad stuff”: no bad language or sex. Some violence—remember, it has spies and Syrian bad guys—but nothing grossly graphic.

    And did you twice read the word “Syrian” in my last paragraph—a tipoff that The Heist will also teach students some current events and recent history? They’ll learn about 44 years of mass murder and mega-theft by the upwardly mobile Assad family that has ascended from peasantry to a $25 billion fortune, according to some estimates. Students will learn about bank secrecy in Austria. They’ll gain sympathy for Israel, a nation still largely aloof from God (sigh) but one deserving support because its citizens built and maintain a tidy small house—although one with broken windows—on a rough street of big mansions with loaded howitzers and unchained pit bulls.

    Olasky’s must have similar tastes to my own as I have never been lead astray by his recommendations. There is a lot to like about these novel. I think Lauro would love them, not only because they are thrilling, page-turner, spy novels, but because the author is holds the same kind of passion for art as Lauro. One of the novels is even centered on Lauro’s favorite artist, Vincent Van Gogh. The author’s name is Daniel Silva and I was very surprised to see that his American. You will understand that statement when you have finished the first novel. The first book in the Gabriel Allon series is titled The Kill Artist.

    Update: Lorena sent me the following picture from last night while I was reading Daniel Silva’s latest novel on my $33 Kindle with the help of Kiwi the remaining twin cat sister.
    Kiwi and Dad read a Daniel Silva novel on the $33 Kindle

    Impossible People

    Impossible People by Os GuinnessOs Guinness wrote a book titled Impossible People: Christian Courage and the Struggle for the Soul of Civilization about what Christians should do in a world that has changed dramatically and mostly for the worse. Eric Metaxas lays it all out in an article to describe the change and why Guinness used the term Impossible People. He starts out by saying this:

    In the opening scene of the 2001 film adaptation of “The Fellowship of the Ring,” Cate Blanchett’s Galadriel whispers hauntingly, “The world has changed. I can feel it in the water. I feel it in the earth. I smell it in the air. Much that once was is lost; for none now live who remember it.”

    Western Christians in 2016 can relate. Something has shifted. The world we inhabit seems to have become disenchanted, and so many of those around us have entered a state in some ways worse than atheism—a state of indifference toward God and the supernatural.

    Then he goes on to explain in brief what Christians can, and I would say must, do. The answer is a refusal to conform and I think that is exactly right. The eleventh century stand taken by a fellow named Peter Damian is worthy of emulation and a very interesting read. What is required is not comfortable, but it is required if we want to both be right and have any hope for cultural redemption.

    Update: I guess I should not be amazed that Marvin Olasky wrote an article a week back that could be a companion to the one written by Metaxas. It gives another example of what to do when caught in a culture that is diametrically opposed to your world view in very bad ways. You can read it here.

    Last first day of class for Christian

    Kelly and Christian NC State Day OneSeeing all the little kids starting out in kindergarten and first grade on Facebook and Instagram, we started feeling a little melancholy when we realized Christian starts back to class today for what might be his last formal year of classes in the school year forever. Christian was sixteen and Kelly was eighteen at the time. We found this old picture of Kelly and Christian’s first day of school (their Junior year there after two years at Wake Technical Community College) at NC State. Christian is taking classes in Quantum Physics and Functional Analysis (Math) this semester.

    I cannot believe I am a cat pictures guy

    Kiwi monopolizes the office chairI think I have a very good excuse for not getting much done this weekend. Every time I wanted to sit down to the computer to get something done, Kiwi was already in place. The thing I realized when I first took this picture that with respect to the Internet, I am part of the problem. I cannot deny that I love to post cat pictures. Actually, it was a very nice hiatus from technology for a weekend. All I did was eat, read and do a pretty serious workout on Saturday. I am not at Lorena’s level nor do I ever expect to get there, but she is definitely shaming me into pushing a little harder. She did it again today and is well on her way to the next level.

    In the meantime, I have new side projects stacking up everywhere. Now that I have my code running and a plan to get it pushed over to a BeagleBone Black and up on the Internet, I need to not let my other side projects get in the way so I can mark at least one more thing as done.  I hope Kiwi does not steal my chair again next weekend.

    Scientism and and the canards of evolutionsim

    Barbara King’s advocacy of the old canard that rejection of neo-Darwinism is equivalent to belief in a literal six day creation is a very tired meme. Her ignorance and intransigence on the topic surely appears to be willful, too, as evidenced by a couple interesting push-back articles. An article at Evolution News and Views (ENV) gets to the crux of the issue when they call her out for not acknowledging the real and growing scientific controversy about the veracity of our current understanding of neo-Darwinism:

    She does not bother to rebut intelligent design. After quoting responses that talk about the freedom to believe and about learning all of the evidence, she notes, “So in response to these remarks and others like them, let me say it loud and clear: Freedom to believe anything one wants in the religious sphere is incredibly important.” But she goes on to state: “Science isn’t about belief.” King buys into the simplistic equation of science, whatever it may say at the moment, with “truth.” She accordingly dismisses the scientific controversy over neo-Darwinism.

    There is another article at pjmedia discussed and linked in the ENV article that is also worth a read. King whiffs badly when tries to address the pjmedia article by ignoring the meat of the objections and talking around the edges. Both the pjmedia and the ENV articles are worth a read. In the meantime, it was great to get a timely reminder of the fact that there are huge swaths of knowledge and truth for which science cannot account (h.t. Stand to Reason and William Lane Craig):

    1. Logical and mathematical truths – science presupposes logic and math.

    2. Metaphysical truths – e.g., the idea that the external world is real.

    3. Ethical truths – e.g., you can’t prove by science that the Nazis were wrong to experiment on Jews.

    4. Aesthetic truths – beauty can’t be scientifically proven.

    5. Science itself – science can’t be justified by the scientific method.

    Homeschool continues to grow as the culture (and government schools) coarsen

    From an article titled Pressed By Common Core And LGBT Agenda, More Families Homeschool at The Federalist:

    One major reason families homeschool is for academic quality. The United States spends roughly $12,000 per student on education, which is more than every other country in the world except Lichtenstein. While our math and science scores have improved slightly over the last few years, we still rank in the middle of the global pack.

    In addition, LGBTQ activists have successfully inundated schools with their approved ideology inside sex education that starts now as early as kindergarten. With these problems in public schools and many families unwilling or unable to afford the cost of private schooling, more and more families are choosing homeschooling as an alternative. This ensures they can avoid educational indolence and moral apathy while picking and choosing what learning method, curriculum, and schedule works best for their family.

    Every year my own homeschool circle increases and there are waiting lists for the cooperative classes we participate in—and I live in a state that boasts some of the wealthiest counties and highest-praised public school systems in the country. Data released last year from the U.S. Department of Education shows that “between 2003-2012, the number of American children between ages 5 to 17 who are homeschooled has risen 61.8 percent, and that the percentage homeschooled in that age range has increased from 2.2 to 3.4 percent.” Parents are pursuing a style of education they can control that will enrich their children, now with very little fear of the stigma that used to surround it.

    This is a great article in that it talks about the normalization of homeschool and the reasons it can be a great way to educate one’s children and not just the reasons to remove them from the caustic government school environment that delivers a bad education. I think this article is just another manifestation of what people are trying to do to fight a morally and spiritually bankrupt culture like the one described in the post before this one.

    Page 56 of 209

    Powered by WordPress & Theme by Anders Norén