<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Project on Toothbrush's Blog</title><link>https://www.tianhao.me/en/categories/project/</link><description>Recent content in Project on Toothbrush's Blog</description><generator>Hugo -- gohugo.io</generator><language>en</language><copyright>牙刷刷</copyright><lastBuildDate>Thu, 12 Nov 2026 10:00:00 +0800</lastBuildDate><atom:link href="https://www.tianhao.me/en/categories/project/index.xml" rel="self" type="application/rss+xml"/><item><title>ECG Lab: An Interactive Electrocardiogram Learning Platform</title><link>https://www.tianhao.me/en/posts/ecg-lab-intro/</link><pubDate>Thu, 12 Nov 2026 10:00:00 +0800</pubDate><guid>https://www.tianhao.me/en/posts/ecg-lab-intro/</guid><description>&lt;img src="https://www.tianhao.me/uploads/ecg-lab-screenshot.png" alt="Featured image of post ECG Lab: An Interactive Electrocardiogram Learning Platform" /&gt;&lt;h2 id="project-background"&gt;Project Background&#10;&lt;/h2&gt;&lt;p&gt;ECG interpretation is a core clinical skill, but traditional learning methods often rely on static images and lengthy text, presenting several pain points:&lt;/p&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;📱 Grid lines are hard to see on mobile devices, making waveform measurement difficult&lt;/li&gt;&#10;&lt;li&gt;📚 Practice and learning are disconnected, with no immediate feedback after studying theory&lt;/li&gt;&#10;&lt;li&gt;🎯 Emergency procedures can only be memorized through videos, lacking interactive training&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;p&gt;&lt;strong&gt;ECG Lab&lt;/strong&gt; was created to solve these problems.&lt;/p&gt;&#10;&lt;h2 id="core-features"&gt;Core Features&#10;&lt;/h2&gt;&lt;h3 id="-systematic-learning"&gt;📚 Systematic Learning&#10;&lt;/h3&gt;&lt;ul&gt;&#10;&lt;li&gt;&lt;strong&gt;238 chapters&lt;/strong&gt;: Covering electrophysiology, leads &amp;amp; vectors, atrial/ventricular hypertrophy, ischemia &amp;amp; infarction, electrolytes &amp;amp; medications, and more&lt;/li&gt;&#10;&lt;li&gt;&lt;strong&gt;Interactive ECG waveforms&lt;/strong&gt;: 500 Hz sampling rate, supporting rhythm strips/12-lead display, loop/continuous scrolling, annotation and hover measurement&lt;/li&gt;&#10;&lt;li&gt;&lt;strong&gt;Bilingual support&lt;/strong&gt;: All content available in Chinese and English&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;h3 id="-practice-exercises"&gt;✍️ Practice Exercises&#10;&lt;/h3&gt;&lt;ul&gt;&#10;&lt;li&gt;&lt;strong&gt;Systematic interpretation training&lt;/strong&gt;: Six-step reading (rate→rhythm→axis→intervals→ST-T→conclusion) with step-by-step feedback&lt;/li&gt;&#10;&lt;li&gt;&lt;strong&gt;2000+ practice questions&lt;/strong&gt;: Covering 42 diagnoses, with chapter filtering and multi-select support&lt;/li&gt;&#10;&lt;li&gt;&lt;strong&gt;Three game modes&lt;/strong&gt;: Classic interpretation, Speed 60s, Combo survival&lt;/li&gt;&#10;&lt;li&gt;&lt;strong&gt;Adaptive spaced repetition&lt;/strong&gt;: Error log tracks confused options, with 1→3→8→20 day intervals&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;h3 id="-simulation-tests"&gt;🎯 Simulation Tests&#10;&lt;/h3&gt;&lt;ul&gt;&#10;&lt;li&gt;&lt;strong&gt;ACLS emergency simulation&lt;/strong&gt;: 12 server-side state machine scenarios, CPR quality, defibrillation/cardioversion, drug timing training&lt;/li&gt;&#10;&lt;li&gt;&lt;strong&gt;ECG viewer&lt;/strong&gt;: Supports zoom, measurement and annotation, analyzing real ECGs like in clinical practice&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;h3 id="-laboratory"&gt;🔬 Laboratory&#10;&lt;/h3&gt;&lt;ul&gt;&#10;&lt;li&gt;&lt;strong&gt;Cardiac Vector Lab&lt;/strong&gt;: P/QRS/T 3D vector loops, hexaxial and limb lead projections, precordial lead positioning&lt;/li&gt;&#10;&lt;li&gt;&lt;strong&gt;Electrolyte Lab&lt;/strong&gt;: K⁺/Ca²⁺/Mg²⁺ sliders with real-time waveform changes&lt;/li&gt;&#10;&lt;li&gt;&lt;strong&gt;Daily Challenge&lt;/strong&gt;: 10 site-wide questions, continuous check-in calendar&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;h2 id="tech-stack"&gt;Tech Stack&#10;&lt;/h2&gt;&lt;h3 id="backend"&gt;Backend&#10;&lt;/h3&gt;&lt;ul&gt;&#10;&lt;li&gt;&lt;strong&gt;PHP 8.4&lt;/strong&gt; (no framework, native implementation)&lt;/li&gt;&#10;&lt;li&gt;&lt;strong&gt;MySQL 8+&lt;/strong&gt;&lt;/li&gt;&#10;&lt;li&gt;&lt;strong&gt;PDO MySQL&lt;/strong&gt;&lt;/li&gt;&#10;&lt;li&gt;&lt;strong&gt;AES-256-GCM tokens&lt;/strong&gt;&lt;/li&gt;&#10;&lt;li&gt;&lt;strong&gt;WebAuthn Passkey&lt;/strong&gt;&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;h3 id="frontend"&gt;Frontend&#10;&lt;/h3&gt;&lt;ul&gt;&#10;&lt;li&gt;&lt;strong&gt;Native ES Modules&lt;/strong&gt; (zero build tools)&lt;/li&gt;&#10;&lt;li&gt;&lt;strong&gt;Canvas / SVG&lt;/strong&gt; waveform rendering&lt;/li&gt;&#10;&lt;li&gt;&lt;strong&gt;Service Worker&lt;/strong&gt; (PWA offline support)&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;h3 id="highlights"&gt;Highlights&#10;&lt;/h3&gt;&lt;ul&gt;&#10;&lt;li&gt;Zero build for frontend and backend, no webpack/vite dependencies&lt;/li&gt;&#10;&lt;li&gt;Teaching-first design, all waveforms marked as &amp;ldquo;educational illustrations&amp;rdquo;&lt;/li&gt;&#10;&lt;li&gt;BYOK (Bring Your Own Key) AI integration support&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;h2 id="project-highlights"&gt;Project Highlights&#10;&lt;/h2&gt;&lt;h3 id="-interactive-design"&gt;🎨 Interactive Design&#10;&lt;/h3&gt;&lt;p&gt;Traditional ECG learning is &amp;ldquo;look at pictures and talk&amp;rdquo;, ECG Lab lets you &lt;strong&gt;operate hands-on&lt;/strong&gt;:&lt;/p&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;Drag sliders to change electrolyte concentrations, observe waveform changes in real-time&lt;/li&gt;&#10;&lt;li&gt;Click anywhere on the waveform to measure intervals and amplitudes&lt;/li&gt;&#10;&lt;li&gt;Rotate 3D cardiac vector loops to understand spatial projections&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;h3 id="-intelligent-assessment"&gt;📊 Intelligent Assessment&#10;&lt;/h3&gt;&lt;ul&gt;&#10;&lt;li&gt;&lt;strong&gt;XP level system&lt;/strong&gt;: Lv.1-20, unlocking different difficulty levels&lt;/li&gt;&#10;&lt;li&gt;&lt;strong&gt;Ability radar chart&lt;/strong&gt;: Visualize mastery of each chapter&lt;/li&gt;&#10;&lt;li&gt;&lt;strong&gt;Error analysis&lt;/strong&gt;: AI explains differential points for wrong options (unlocked at Lv.10)&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;h3 id="-open-source--free"&gt;🌍 Open Source &amp;amp; Free&#10;&lt;/h3&gt;&lt;ul&gt;&#10;&lt;li&gt;Code licensed under &lt;a class="link" href="https://github.com/AndroidOL/ecg-academy" target="_blank" rel="noopener"&#10; &gt;MIT&lt;/a&gt;&lt;/li&gt;&#10;&lt;li&gt;Educational content under CC BY-SA 4.0&lt;/li&gt;&#10;&lt;li&gt;Full access without login required&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;h2 id="user-experience"&gt;User Experience&#10;&lt;/h2&gt;&lt;p&gt;🔗 &lt;strong&gt;Live Demo&lt;/strong&gt;: &lt;a class="link" href="https://ecg.tianhao.me" target="_blank" rel="noopener"&#10; &gt;ecg.tianhao.me&lt;/a&gt;&lt;/p&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;Desktop and mobile responsive&lt;/li&gt;&#10;&lt;li&gt;PWA installable to home screen, offline capable&lt;/li&gt;&#10;&lt;li&gt;Dual themes (light/dark), Chinese/English interface switching&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;h2 id="project-screenshots"&gt;Project Screenshots&#10;&lt;/h2&gt;&lt;p&gt;&lt;img alt="ECG Lab Homepage" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://www.tianhao.me/uploads/ecg-lab-home.png"&gt;&lt;/p&gt;&#10;&lt;p&gt;&lt;em&gt;System learning interface: Course map and chapter navigation&lt;/em&gt;&lt;/p&gt;&#10;&lt;p&gt;&lt;img alt="ECG Interaction" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://www.tianhao.me/uploads/ecg-lab-ecg.png"&gt;&lt;/p&gt;&#10;&lt;p&gt;&lt;em&gt;Interactive waveforms: Zoom, measure, annotate&lt;/em&gt;&lt;/p&gt;&#10;&lt;p&gt;&lt;img alt="Vector Lab" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://www.tianhao.me/uploads/ecg-lab-vectors.png"&gt;&lt;/p&gt;&#10;&lt;p&gt;&lt;em&gt;Cardiac Vector Lab: 3D vector loop visualization&lt;/em&gt;&lt;/p&gt;&#10;&lt;h2 id="future-roadmap"&gt;Future Roadmap&#10;&lt;/h2&gt;&lt;ul&gt;&#10;&lt;li&gt;📱 WFDB/SCP format adaptation for real ECG data&lt;/li&gt;&#10;&lt;li&gt;🎓 CME (Continuing Medical Education) assessment system&lt;/li&gt;&#10;&lt;li&gt;🤖 Enhanced AI tutor supporting more clinical scenario Q&amp;amp;A&lt;/li&gt;&#10;&lt;li&gt;📊 Waveform annotator for custom key point marking&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;h2 id="summary"&gt;Summary&#10;&lt;/h2&gt;&lt;p&gt;ECG Lab is my exploration in medical education, attempting to solve traditional ECG learning pain points with modern web technologies. The project uses a zero-build native tech stack, focusing on interactivity and teaching experience, hoping to provide medical students and clinicians with an efficient and engaging learning tool.&lt;/p&gt;&#10;&lt;p&gt;Welcome to try it and provide feedback!&lt;/p&gt;&#10;&lt;hr&gt;&#10;&lt;p&gt;&lt;strong&gt;Repository&lt;/strong&gt;: &lt;a class="link" href="https://github.com/AndroidOL/ecg-academy" target="_blank" rel="noopener"&#10; &gt;github.com/AndroidOL/ecg-academy&lt;/a&gt;&lt;br&gt;&#10;&lt;strong&gt;Live Site&lt;/strong&gt;: &lt;a class="link" href="https://ecg.tianhao.me" target="_blank" rel="noopener"&#10; &gt;ecg.tianhao.me&lt;/a&gt;&lt;/p&gt;&#10;</description></item><item><title>NT Creative Gallery: One Picture to Explain Core Assets – A Great Assistant for Home Users</title><link>https://www.tianhao.me/en/posts/nt-assets-creative/</link><pubDate>Sat, 12 Jul 2025 17:42:38 +0800</pubDate><guid>https://www.tianhao.me/en/posts/nt-assets-creative/</guid><description>&lt;img src="https://www.tianhao.me/uploads/2e4f9b81-3cde-4082-a8aa-12f6a5b79277.webp" alt="Featured image of post NT Creative Gallery: One Picture to Explain Core Assets – A Great Assistant for Home Users" /&gt;&#10; &lt;blockquote&gt;&#10; &lt;p&gt;⚠️ &lt;strong&gt;Disclaimer&lt;/strong&gt;&lt;br&gt;&#10;All images displayed on this page were generated by the &lt;strong&gt;Google Gemini&lt;/strong&gt; AI model, automatically synthesized based on user-provided prompts. They are &lt;strong&gt;not photographs&lt;/strong&gt; nor representations of real events. The content is provided for &lt;strong&gt;visual creative reference only&lt;/strong&gt; and does &lt;strong&gt;not represent real people, locations, products, or events&lt;/strong&gt;, nor does it constitute any form of advice or commitment.&lt;/p&gt;&#10;&lt;p&gt;According to the &lt;a class="link" href="https://ai.google/disclaimers/gemini/" target="_blank" rel="noopener"&#10; &gt;Gemini Terms of Use&lt;/a&gt; and its &lt;a class="link" href="https://support.google.com/gemini/answer/13881882" target="_blank" rel="noopener"&#10; &gt;Content Policy&lt;/a&gt;, the copyright of generated images belongs to Google or is produced under its authorization. Users are responsible for ensuring compliance with applicable laws and regulations, and the content &lt;strong&gt;must not be used for any commercial purpose that violates copyright, trademark, or publicity rights&lt;/strong&gt;.&lt;/p&gt;&#10;&lt;p&gt;If you have questions or request content removal, please contact us using the method at the bottom of this page.&lt;/p&gt;&#10;&#10; &lt;/blockquote&gt;&#10;&lt;p&gt;&lt;img alt="2e4f9b81-3cde-4082-a8aa-12f6a5b79277" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://www.tianhao.me/uploads/2e4f9b81-3cde-4082-a8aa-12f6a5b79277.webp"&gt;&lt;/p&gt;&#10;&lt;p&gt;&lt;img alt="6f3a9f0c-7b26-4c0f-a79b-2e9f8f5e6fd0" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://www.tianhao.me/uploads/6f3a9f0c-7b26-4c0f-a79b-2e9f8f5e6fd0.webp"&gt;&lt;/p&gt;&#10;&lt;p&gt;&lt;img alt="938db72a-2b1c-4a2f-9e5f-45d3e2f6c70f" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://www.tianhao.me/uploads/938db72a-2b1c-4a2f-9e5f-45d3e2f6c70f.webp"&gt;&lt;/p&gt;&#10;&lt;p&gt;&lt;img alt="b051a6ee-c3a0-44d8-bb38-52e7d9b08ed9" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://www.tianhao.me/uploads/b051a6ee-c3a0-44d8-bb38-52e7d9b08ed9.webp"&gt;&lt;/p&gt;&#10;&lt;p&gt;&lt;img alt="cba2794c-6e0e-4382-973d-75b2d2f2c72a" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://www.tianhao.me/uploads/cba2794c-6e0e-4382-973d-75b2d2f2c72a.webp"&gt;&lt;/p&gt;&#10;&lt;p&gt;&lt;img alt="f1707f1a-31a7-49f5-9582-621c024a2fbe" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://www.tianhao.me/uploads/f1707f1a-31a7-49f5-9582-621c024a2fbe.webp"&gt;&lt;/p&gt;&#10;&lt;p&gt;Get in touch (Google Mail): wth88888888&lt;/p&gt;&#10;</description></item><item><title>My Smart Assistant 3.0: Building a Fully Automated "Time Screening Room"</title><link>https://www.tianhao.me/en/posts/rk-camera-capture-merge/</link><pubDate>Sat, 12 Jul 2025 17:10:27 +0800</pubDate><guid>https://www.tianhao.me/en/posts/rk-camera-capture-merge/</guid><description>&lt;img src="https://www.tianhao.me/img/avatar.png" alt="Featured image of post My Smart Assistant 3.0: Building a Fully Automated "Time Screening Room"" /&gt;&lt;p&gt;Welcome back to my &amp;ldquo;lazy&amp;rdquo; photography system series. In the previous chapters, we witnessed how an ordinary webcam was endowed with the ability to &amp;ldquo;think,&amp;rdquo; and how I built an elegant and convenient &amp;ldquo;control room&amp;rdquo; for it. However, the story doesn&amp;rsquo;t end there. Our clever photographer has been smartly &amp;ldquo;slacking off&amp;rdquo; every day, accurately capturing a vast number of valuable moments. These photos, like scattered pearls, contain the secrets of time, quietly resting deep within the server&amp;rsquo;s hard drive.&lt;/p&gt;&#10;&lt;p&gt;It&amp;rsquo;s time to string these pearls together, letting them shine brilliantly through the flow of light and shadow. Today, I will show you the final chapter of this project, which I personally find the most exciting — building a fully automated &amp;ldquo;Time Screening Room.&amp;rdquo; At the core of this screening room is a powerful and reliable shell script. It is the &amp;ldquo;behind-the-scenes director&amp;rdquo; of my entire system, entrusted with a sacred mission: before each quiet dawn arrives, automatically merging tens of thousands of photos from the previous day into wonderful time-lapse videos.&lt;/p&gt;&#10;&lt;p&gt;Project code: &lt;a class="link" href="https://github.com/AndroidOL/camera-capture/tree/main/merge" target="_blank" rel="noopener"&#10; &gt;https://github.com/AndroidOL/camera-capture/tree/main/merge&lt;/a&gt;&lt;/p&gt;&#10;&lt;h2 id="from-material-pileup-to-visual-poems-the-final-billion-step"&gt;From &amp;ldquo;Material Pileup&amp;rdquo; to &amp;ldquo;Visual Poems&amp;rdquo;: The Final &amp;ldquo;Billion&amp;rdquo; Step&#10;&lt;/h2&gt;&lt;p&gt;Imagine what life would be like without this automated &amp;ldquo;director.&amp;rdquo; It would mean that every day, I’d have to act like a &amp;ldquo;miner&amp;rdquo; in the digital age — manually logging into a remote server to dig through tens of thousands of photos from the previous day, which might amount to dozens of gigabytes; then carefully downloading these &amp;ldquo;raw ores&amp;rdquo; to my local computer; next, launching complex video editing software, painstakingly dragging each photo onto the timeline, setting frame rates, encoders, bitrates&amp;hellip; and finally clicking &amp;ldquo;render&amp;rdquo; after a long wait.&lt;/p&gt;&#10;&lt;p&gt;This entire process is not only a battle of patience and endurance with no creativity but also prone to errors. If one day I forget or get too busy at work and miss it, the &amp;ldquo;visual diary&amp;rdquo; for that day will have an irreplaceable gap. That&amp;rsquo;s not what I want.&lt;/p&gt;&#10;&lt;p&gt;What I need is a fully unattended, extremely stable and reliable, and smart enough automated process. It should be a tireless artist that quietly starts at a fixed time every day, for example, in the dead of night, and like a skilled film editor, carefully arranges the scattered materials of the previous day into a complete film, then elegantly places it on the digital shelf of the &amp;ldquo;family film library,&amp;rdquo; waiting for my review.&lt;/p&gt;&#10;&lt;p&gt;Thus, this labor of love — the automation script &lt;code&gt;daily_photo_to_video.sh&lt;/code&gt; — was born. It’s far from a simple ffmpeg command wrapper; it is an industrial-grade robust &amp;ldquo;smart production line.&amp;rdquo;&lt;/p&gt;&#10;&lt;h2 id="the-directors-extraordinary-skills-revealing-the-core-design-of-the-automation-script"&gt;The Director&amp;rsquo;s Extraordinary Skills: Revealing the Core Design of the Automation Script&#10;&lt;/h2&gt;&lt;p&gt;The design philosophy of this script is &lt;strong&gt;&amp;ldquo;pursue ultimate stability and efficiency.&amp;rdquo;&lt;/strong&gt; I armed it to the teeth so that it can calmly handle all foreseeable and even unforeseeable complex situations.&lt;/p&gt;&#10;&lt;h3 id="1-ultimate-efficiency-squeezing-every-drop-of-hardware-potential"&gt;1. Ultimate Efficiency: Squeezing Every Drop of Hardware Potential&#10;&lt;/h3&gt;&lt;p&gt;&lt;strong&gt;Highway — Ramdisk (In-Memory Disk)&lt;/strong&gt;&lt;br&gt;&#10;Reading tens of thousands of scattered small images on a traditional hard drive while writing a huge video file immediately exposes disk I/O bottlenecks, making the whole process painfully slow. My solution is radical: directly carve out a high-speed virtual disk (Ramdisk) in the server’s precious memory.&lt;/p&gt;&#10;&lt;p&gt;When the script starts, it first synchronizes all photos to be processed from the photo server to this memory disk via high-speed network. Then, all intensive read-write operations of video synthesis (encoding) are performed entirely on this virtual disk. Memory read/write speeds are tens or even hundreds of times faster than ordinary hard drives, which is like building a &amp;ldquo;star highway&amp;rdquo; that ignores physical laws and travels at light speed for data migration, greatly shortening processing time.&lt;/p&gt;&#10;&lt;p&gt;&lt;strong&gt;Professional Engine — Hardware Encoding (HEVC_RKMPP)&lt;/strong&gt;&lt;br&gt;&#10;Video encoding is a typical CPU-intensive task. Relying solely on the CPU to &amp;ldquo;hard compute&amp;rdquo; is like asking a versatile but tired butler to do a highly specialized woodworking job — inefficient and causing the server’s &amp;ldquo;heartbeat&amp;rdquo; (CPU usage) to spike and the fans to roar. Fortunately, the server I use (based on Rockchip chips) has a dedicated video processing unit (VPU).&lt;/p&gt;&#10;&lt;p&gt;My script precisely calls ffmpeg and specifies the use of the &lt;code&gt;hevc_rkmpp&lt;/code&gt; hardware encoder. This is equivalent to handing the professional work to a specially hired, highly skilled &amp;ldquo;film editor,&amp;rdquo; letting the VPU handle the heaviest encoding tasks, fully freeing the CPU. Meanwhile, I choose the efficient HEVC (H.265) encoding format, which maintains very high picture quality while compressing the video size to about half of traditional H.264, saving massive precious space in my &amp;ldquo;family film library.&amp;rdquo;&lt;/p&gt;&#10;&lt;h3 id="2-foundation-of-stability-industrial-grade-fault-tolerance-and-self-healing"&gt;2. Foundation of Stability: Industrial-Grade Fault Tolerance and Self-Healing&#10;&lt;/h3&gt;&lt;p&gt;A spaceship sailing alone in the wilderness values not only speed but also its ability to survive cosmic storms. Likewise, a script that needs to run unattended for years requires strong resilience. I built four layers of &amp;ldquo;security protocols&amp;rdquo; to handle various possible accidents.&lt;/p&gt;&#10;&lt;table&gt;&#10;&#9;&lt;thead&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;th&gt;Scenario&lt;/th&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;th&gt;Script’s Smart Response Strategy&lt;/th&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&lt;/thead&gt;&#10;&#9;&lt;tbody&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;Unexpected script interruption&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;Uses &lt;code&gt;trap&lt;/code&gt; cleanup mechanism to automatically clear temp files and unmount Ramdisk on interruption&lt;/td&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;Concurrent run conflicts&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;Uses &lt;code&gt;flock&lt;/code&gt; file lock to avoid conflicts from multiple instances running concurrently&lt;/td&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;Insufficient storage space&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;Pre-checks available space in target path to avoid write failures midway&lt;/td&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;Target disk disconnection&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;Automatically switches to backup storage path, ensures task completion, and pauses old task catch-up&lt;/td&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&lt;/tbody&gt;&#10;&lt;/table&gt;&#10;&lt;h3 id="3-smart-scheduling-never-miss-a-days-highlights"&gt;3. Smart Scheduling: Never Miss a Day’s Highlights&#10;&lt;/h3&gt;&lt;p&gt;I want every day’s video in my &amp;ldquo;screening room&amp;rdquo; to be complete, like a coherent chronicle. Therefore, the smartest and proudest part of the script is its almost obsessive &amp;ldquo;completion&amp;rdquo; logic.&lt;/p&gt;&#10;&lt;p&gt;When running, the script:&lt;/p&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;Reviews logs from the past 7 days, checking for missing or failed videos;&lt;/li&gt;&#10;&lt;li&gt;If omissions are found, it prioritizes filling gaps starting from the earliest day;&lt;/li&gt;&#10;&lt;li&gt;Verifies that remote materials still exist to avoid pointless runs;&lt;/li&gt;&#10;&lt;li&gt;Only after confirming completeness does it process &amp;ldquo;yesterday’s&amp;rdquo; new materials.&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;p&gt;This way, the system gains memory and responsibility, always maintaining a complete &amp;ldquo;visual diary.&amp;rdquo;&lt;/p&gt;&#10;&lt;h2 id="the-birth-of-a-family-epic"&gt;The Birth of a &amp;ldquo;Family Epic&amp;rdquo;&#10;&lt;/h2&gt;&lt;p&gt;Now, this has become a ritual-filled daily routine. Every morning, when I brew coffee and open the &amp;ldquo;family film library,&amp;rdquo; a brand-new time-lapse video named after yesterday’s date quietly rests there.&lt;/p&gt;&#10;&lt;p&gt;It might capture the entire thunderstorm outside the window, or my figure working late into the night, or simply portray the traces of sunlight flowing through the home.&lt;/p&gt;&#10;&lt;p&gt;This automated script is like a silent but powerful heart, injecting endless vitality into my entire smart photography project. It transforms day-after-day trivial visual data into distilled visual poems full of time’s essence, turning cold data into warm memories, allowing me to truly &amp;ldquo;see&amp;rdquo; and &amp;ldquo;cherish&amp;rdquo; those silently passing moments.&lt;/p&gt;&#10;&lt;h2 id="the-joy-of-creation"&gt;The Joy of Creation&#10;&lt;/h2&gt;&lt;p&gt;The joy of creation lies here — using code and logic to build a system that automatically creates, organizes, and presents beauty for us.&lt;/p&gt;&#10;&lt;p&gt;Next steps might be training an AI to automatically add the most fitting background music to these videos, or editing &amp;ldquo;weekly highlights.&amp;rdquo;&lt;/p&gt;&#10;&lt;p&gt;The journey to a &amp;ldquo;better life&amp;rdquo; through creation is endless, and that is its true charm.&lt;/p&gt;&#10;</description></item><item><title>My Smart Assistant 2.0: Giving the "Lazy" Photography System a Panoramic Window</title><link>https://www.tianhao.me/en/posts/rk-camera-capture-webui/</link><pubDate>Sat, 12 Jul 2025 16:19:04 +0800</pubDate><guid>https://www.tianhao.me/en/posts/rk-camera-capture-webui/</guid><description>&lt;img src="https://www.tianhao.me/img/avatar.png" alt="Featured image of post My Smart Assistant 2.0: Giving the "Lazy" Photography System a Panoramic Window" /&gt;&lt;p&gt;It&amp;rsquo;s been a while since I last shared my “lazy” photography system—the one that decides when to snap a photo and when to chill. This little helper has been quietly working for me all this time. But as time went on, a new pain point emerged: while its inner workings were smart, the way I interacted with it remained&amp;hellip; primitive.&lt;/p&gt;&#10;&lt;p&gt;Project code: &lt;a class="link" href="https://github.com/AndroidOL/camera-capture/tree/main/web-ui" target="_blank" rel="noopener"&#10; &gt;https://github.com/AndroidOL/camera-capture/tree/main/web-ui&lt;/a&gt;&lt;/p&gt;&#10;&lt;h2 id="from-command-line-archaeology-to-tap-of-a-finger-a-revolution-in-experience"&gt;From “Command Line Archaeology” to “Tap of a Finger”: A Revolution in Experience&#10;&lt;/h2&gt;&lt;p&gt;In the past, every interaction with the system felt like digital archaeology inside a server:&lt;/p&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;Want to see yesterday’s shots? Fire up your SSH client, connect to the server, and navigate through a maze of directories with &lt;code&gt;cd&lt;/code&gt; and &lt;code&gt;ls&lt;/code&gt;.&lt;/li&gt;&#10;&lt;li&gt;Want to tweak sensitivity settings? Use Vim or Nano to edit config files, save, and &lt;code&gt;systemctl restart&lt;/code&gt;—then cross your fingers you didn’t miss a comma.&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;p&gt;This was cumbersome and emotionally distant. My smart assistant—its joys, its output—was locked behind the black box of a terminal.&lt;/p&gt;&#10;&lt;p&gt;So I opened a window for it: a wide &lt;strong&gt;panoramic floor-to-ceiling window&lt;/strong&gt; in the form of a &lt;strong&gt;web control console&lt;/strong&gt;, designed for intuitive, elegant interaction—even from the comfort of a couch.&lt;/p&gt;&#10;&lt;p&gt;Now, everything has changed:&lt;/p&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;Open a browser and enter the local address;&lt;/li&gt;&#10;&lt;li&gt;A beautiful and powerful interface appears;&lt;/li&gt;&#10;&lt;li&gt;The once-silent background photographer now has a vivid “face” and nimble “hands.”&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;h3 id="its-components"&gt;Its components:&#10;&lt;/h3&gt;&lt;ul&gt;&#10;&lt;li&gt;&lt;strong&gt;Eyes&lt;/strong&gt;: A real-time monitor with zero delay.&lt;/li&gt;&#10;&lt;li&gt;&lt;strong&gt;Hands&lt;/strong&gt;: Clickable button menus for full control.&lt;/li&gt;&#10;&lt;li&gt;&lt;strong&gt;Brain&lt;/strong&gt;: Complex logic wrapped in an intuitive design.&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;hr&gt;&#10;&lt;h2 id="four-superpowers-of-the-web-console"&gt;Four Superpowers of the Web Console&#10;&lt;/h2&gt;&lt;h3 id="1-time-drawer-a-tiered-photo-archive"&gt;1. Time Drawer: A Tiered Photo Archive&#10;&lt;/h3&gt;&lt;p&gt;Inspired by real-life “drawers,” navigating photos now feels like opening a set of Russian nesting dolls:&lt;/p&gt;&#10;&lt;ol&gt;&#10;&lt;li&gt;&lt;strong&gt;Year/Month&lt;/strong&gt; view: See all months with recordings.&lt;/li&gt;&#10;&lt;li&gt;&lt;strong&gt;Daily preview&lt;/strong&gt;: Thumbnail grid for each date.&lt;/li&gt;&#10;&lt;li&gt;&lt;strong&gt;Hourly drawers&lt;/strong&gt;: Tap to reveal 24-hour distributions.&lt;/li&gt;&#10;&lt;li&gt;&lt;strong&gt;Minute-level access&lt;/strong&gt;: Dig down to individual images.&lt;/li&gt;&#10;&lt;/ol&gt;&#10;&lt;p&gt;Browsing becomes light, fun, and ceremonial.&lt;/p&gt;&#10;&lt;hr&gt;&#10;&lt;h3 id="2-real-time-window-a-watchful-never-blinking-guardian"&gt;2. Real-Time Window: A Watchful, Never-Blinking Guardian&#10;&lt;/h3&gt;&lt;p&gt;Tap “Live Monitor,” and the system enters watch mode:&lt;/p&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;&lt;strong&gt;Heartbeat refresh&lt;/strong&gt;: The frontend fetches a new frame every 2.5 seconds.&lt;/li&gt;&#10;&lt;li&gt;&lt;strong&gt;Auto-reconnect&lt;/strong&gt;: Camera outages are self-healed.&lt;/li&gt;&#10;&lt;li&gt;&lt;strong&gt;Night mode&lt;/strong&gt;: Auto-dimming for dark environments—no eye strain.&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;hr&gt;&#10;&lt;h3 id="3-time-tunnel-your-personal-documentary-generator"&gt;3. Time Tunnel: Your Personal Documentary Generator&#10;&lt;/h3&gt;&lt;p&gt;The “Slideshow” mode is my favorite feature:&lt;/p&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;Select any date range (e.g., “2025 Cherry Blossom Season”);&lt;/li&gt;&#10;&lt;li&gt;The system stitches together all relevant photos into a dynamic time-lapse.&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;p&gt;Highlights:&lt;/p&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;&lt;strong&gt;Slide mode&lt;/strong&gt;: Chronologically ordered playback.&lt;/li&gt;&#10;&lt;li&gt;&lt;strong&gt;Smooth transitions&lt;/strong&gt;: Fade-in/out between shots.&lt;/li&gt;&#10;&lt;li&gt;&lt;strong&gt;Timestamp overlay&lt;/strong&gt;: Auto-displayed capture time at the bottom.&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&#10; &lt;blockquote&gt;&#10; &lt;p&gt;🎞️ I used this to relive the cherry blossom bloom—from bud to fall—utterly moving and magical.&lt;/p&gt;&#10;&#10; &lt;/blockquote&gt;&#10;&lt;hr&gt;&#10;&lt;h3 id="4-thoughtful-themes-a-smart-and-caring-interface"&gt;4. Thoughtful Themes: A Smart and Caring Interface&#10;&lt;/h3&gt;&lt;p&gt;As a night owl, I added a theme toggle:&lt;/p&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;&lt;strong&gt;Day mode&lt;/strong&gt;: Blue-white for clarity.&lt;/li&gt;&#10;&lt;li&gt;&lt;strong&gt;Night mode&lt;/strong&gt;: Deep black and crimson for eye comfort.&lt;/li&gt;&#10;&lt;li&gt;&lt;strong&gt;Auto-memory&lt;/strong&gt;: Remembers your last-used theme.&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;p&gt;Like a friend who just gets you.&lt;/p&gt;&#10;&lt;hr&gt;&#10;&lt;h2 id="dev-diary-humanizing-the-system-one-mishap-at-a-time"&gt;Dev Diary: Humanizing the System, One Mishap at a Time&#10;&lt;/h2&gt;&lt;h3 id="the-midnight-panic"&gt;The Midnight Panic&#10;&lt;/h3&gt;&lt;p&gt;One night while debugging live view, the screen started flashing like crazy!&lt;br&gt;&#10;Turned out I mistakenly set &lt;code&gt;250ms&lt;/code&gt; instead of &lt;code&gt;2500ms&lt;/code&gt;—the camera nearly became a strobe light.&lt;/p&gt;&#10;&lt;h3 id="the-naming-crisis"&gt;The Naming Crisis&#10;&lt;/h3&gt;&lt;p&gt;Initially, I named my API &lt;code&gt;get_image_list&lt;/code&gt;.&lt;br&gt;&#10;A few weeks later, even I had no clue what it did.&lt;/p&gt;&#10;&lt;hr&gt;&#10;&lt;h2 id="a-new-lens-on-life-when-tech-becomes-daily-ritual"&gt;A New Lens on Life: When Tech Becomes Daily Ritual&#10;&lt;/h2&gt;&lt;p&gt;The web console made this system part of my life:&lt;/p&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;☕ &lt;strong&gt;Morning coffee ritual&lt;/strong&gt;: Wake up with the latest time-lapse visuals.&lt;/li&gt;&#10;&lt;li&gt;🌱 &lt;strong&gt;Plant growth journal&lt;/strong&gt;: Weekly recaps via the “Time Tunnel.”&lt;/li&gt;&#10;&lt;li&gt;🖼️ &lt;strong&gt;Family time machine&lt;/strong&gt;: Cast time-lapse memories during gatherings.&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;hr&gt;&#10;&lt;h2 id="an-invitation-to-makers"&gt;An Invitation to Makers&#10;&lt;/h2&gt;&lt;p&gt;Building this isn’t hard:&lt;/p&gt;&#10;&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;&#10;&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;&#10;&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt;1&#10;&lt;/span&gt;&lt;span class="lnt"&gt;2&#10;&lt;/span&gt;&lt;span class="lnt"&gt;3&#10;&lt;/span&gt;&lt;span class="lnt"&gt;4&#10;&lt;/span&gt;&lt;span class="lnt"&gt;5&#10;&lt;/span&gt;&lt;span class="lnt"&gt;6&#10;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&#10;&lt;td class="lntd"&gt;&#10;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="c1"&gt;# ----- Essentials -----&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="c1"&gt;# Hardware: Raspberry Pi / any Linux device + webcam&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="c1"&gt;# Image processing: Python + OpenCV&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="c1"&gt;# Frontend: HTML + JavaScript + CSS&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="c1"&gt;# Backend: PHP&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&#10;&lt;/div&gt;&#10;&lt;/div&gt;&lt;p&gt;Each module is like a LEGO block—ready to be customized, expanded, or swapped.&lt;/p&gt;&#10;&lt;hr&gt;&#10;&#10; &lt;blockquote&gt;&#10; &lt;p&gt;The warmth of technology lies in how we use it to illuminate and document life. I hope you too can open your own “window of time” and watch your story unfold.&lt;/p&gt;&#10;&#10; &lt;/blockquote&gt;&#10;</description></item><item><title>My Smart Assistant: A Time-Lapse System That Knows When to Be Lazy</title><link>https://www.tianhao.me/en/posts/rk-camera-capture/</link><pubDate>Sat, 12 Jul 2025 15:38:51 +0800</pubDate><guid>https://www.tianhao.me/en/posts/rk-camera-capture/</guid><description>&lt;img src="https://www.tianhao.me/img/avatar.png" alt="Featured image of post My Smart Assistant: A Time-Lapse System That Knows When to Be Lazy" /&gt;&lt;p&gt;There’s a quiet poetry flowing through everyday life, often unnoticed. I became fascinated with time-lapse photography because it compresses long stretches of time into captivating moments, letting us witness slow transformations with the naked eye—it’s like magic unfolding through time.&lt;/p&gt;&#10;&lt;p&gt;So I dusted off an old USB webcam that had been asleep in a drawer for years, sparked by a gentle thought: I want to record life’s subtle breath—the kind we often overlook in our hurried pace. Like the succulent on the balcony slowly stretching toward sunlight; the drifting clouds outside, sculpted into shapes by an invisible hand; or how the evening sun casts long, warm shadows across the living room floor inch by inch…&lt;/p&gt;&#10;&lt;p&gt;Project Code: &lt;a class="link" href="https://github.com/AndroidOL/camera-capture" target="_blank" rel="noopener"&#10; &gt;https://github.com/AndroidOL/camera-capture&lt;/a&gt;&lt;/p&gt;&#10;&lt;h2 id="from-diligent-fool-to-smart-slacker-a-shift-in-philosophy"&gt;From &amp;ldquo;Diligent Fool&amp;rdquo; to &amp;ldquo;Smart Slacker&amp;rdquo;: A Shift in Philosophy&#10;&lt;/h2&gt;&lt;p&gt;At first, my approach was simple and direct, like many others: write a script to turn the webcam into a tireless “model worker,” snapping a photo every minute on the dot. The moment I finished and successfully ran the code, I felt a wave of achievement. But that joy quickly turned into mixed disappointment the next morning.&lt;/p&gt;&#10;&lt;p&gt;There they were—1,440 neatly organized photos, a testament to my program’s “diligence.” Yet scrolling through them felt lifeless and frozen. Especially during the long hours of the night—say, between 3:00 and 3:01 AM—everything looked identical: the dust on the coffee table hadn’t budged, and even the air seemed still. I realized I hadn’t built a tool for recording “change,” but a factory for producing repetition.&lt;/p&gt;&#10;&lt;p&gt;Once I calmly calculated this “digital legacy,” the scale of the problem became clear:&lt;/p&gt;&#10;&lt;h3 id="alarming-storage-consumption"&gt;Alarming Storage Consumption&#10;&lt;/h3&gt;&lt;ul&gt;&#10;&lt;li&gt;&lt;strong&gt;Daily output&lt;/strong&gt;: 43,200 photos&lt;/li&gt;&#10;&lt;li&gt;&lt;strong&gt;Monthly output&lt;/strong&gt;: ~1,296,000 photos&lt;/li&gt;&#10;&lt;li&gt;&lt;strong&gt;Annual output&lt;/strong&gt;: Over 473 million photos&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;p&gt;Assuming 0.2MB per 1920×1080 photo, that’s nearly 8GB per day—reasonable for a desktop setup, but excessive for embedded devices like the ESP32 or RK boards.&lt;/p&gt;&#10;&lt;h3 id="destructive-post-production-workload"&gt;Destructive Post-Production Workload&#10;&lt;/h3&gt;&lt;ul&gt;&#10;&lt;li&gt;&lt;strong&gt;Footage screening&lt;/strong&gt;: To produce a few minutes of highlights, you’d have to sift through hundreds of thousands of nearly identical “waste shots.”&lt;/li&gt;&#10;&lt;li&gt;&lt;strong&gt;Time cost&lt;/strong&gt;: This isn’t artistic creation—it’s soul-draining manual labor.&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;p&gt;To better illustrate the contrast, I created this table:&lt;/p&gt;&#10;&lt;table&gt;&#10;&#9;&lt;thead&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;th&gt;Feature&lt;/th&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;th&gt;“Diligent Fool” Mode&lt;/th&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;th&gt;“Smart Slacker” Mode&lt;/th&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&lt;/thead&gt;&#10;&#9;&lt;tbody&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;&lt;strong&gt;Operating Principle&lt;/strong&gt;&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;Uniform, scheduled capturing&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;Intelligent, on-demand capture&lt;/td&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;&lt;strong&gt;Photos per hour&lt;/strong&gt;&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;Constant 1,800&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;Dozens to hundreds (based on changes)&lt;/td&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;&lt;strong&gt;Storage efficiency&lt;/strong&gt;&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;Very low, linear explosion&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;Very high, only saves useful data&lt;/td&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;&lt;strong&gt;Post-workload&lt;/strong&gt;&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;Huge, painful screening&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;Minimal, most shots are valuable&lt;/td&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;&lt;strong&gt;Final output quality&lt;/strong&gt;&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;Filled with static “waste time”&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;Tight pacing, focused on change&lt;/td&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&lt;/tbody&gt;&#10;&lt;/table&gt;&#10;&lt;p&gt;Clearly, the latter is what I needed—a wise system that knows &lt;strong&gt;when to act and when to chill&lt;/strong&gt;.&lt;/p&gt;&#10;&lt;h2 id="giving-the-camera-a-brain-laziness-as-productivity"&gt;Giving the Camera a Brain: Laziness as Productivity&#10;&lt;/h2&gt;&lt;p&gt;So I set out to upgrade my system with real intelligence. This time, I didn’t teach it to work harder—I taught it a more elegant skill: how to slack off smartly.&lt;/p&gt;&#10;&lt;p&gt;Its core principle is like a seasoned intelligence officer who only reports when something actually matters—no boring “all clear” updates, just action when there&amp;rsquo;s movement.&lt;/p&gt;&#10;&lt;p&gt;To empower this discernment, I designed a three-step “smart pipeline”:&lt;/p&gt;&#10;&lt;h3 id="visual-purification-seeing-the-essence-not-the-surface"&gt;Visual Purification: Seeing the Essence, Not the Surface&#10;&lt;/h3&gt;&lt;p&gt;Morning cool light and evening warm light may color the scene differently, even if nothing has moved. So before comparison, the system converts both current and archived frames to grayscale “sketch mode.”&lt;/p&gt;&#10;&lt;h3 id="quantifying-change-giving-weight-to-differences"&gt;Quantifying Change: Giving Weight to Differences&#10;&lt;/h3&gt;&lt;p&gt;The system overlays two grayscale images pixel by pixel, generating a “change map.” It calculates the percentage of light areas to assess the degree of difference.&lt;/p&gt;&#10;&lt;h3 id="the-art-of-decision-making-a-smart-laziness-threshold"&gt;The Art of Decision-Making: A Smart Laziness Threshold&#10;&lt;/h3&gt;&lt;p&gt;I set a threshold—say 0.5%. If the detected change is below this, the frame is skipped. Only significant changes are recorded, saving resources and capturing only the meaningful.&lt;/p&gt;&#10;&lt;h2 id="a-thoughtful-housekeeper-a-system-that-runs-itself"&gt;A Thoughtful Housekeeper: A System That Runs Itself&#10;&lt;/h2&gt;&lt;p&gt;To ensure 24/7 stability, I implemented multiple layers of resilience:&lt;/p&gt;&#10;&lt;h3 id="a-custom-biological-clock"&gt;A Custom “Biological Clock”&#10;&lt;/h3&gt;&lt;p&gt;Sampling frequencies tuned to household rhythms:&lt;/p&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;&lt;strong&gt;Morning glow (6–8 AM)&lt;/strong&gt;: every 5 seconds&lt;/li&gt;&#10;&lt;li&gt;&lt;strong&gt;Daytime activity (8 AM–6 PM)&lt;/strong&gt;: every 2 seconds&lt;/li&gt;&#10;&lt;li&gt;&lt;strong&gt;Evening mood (6–10 PM)&lt;/strong&gt;: every 5 seconds&lt;/li&gt;&#10;&lt;li&gt;&lt;strong&gt;Midnight patrol (10 PM–6 AM)&lt;/strong&gt;: every 10 seconds&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;h3 id="strategic-storage-management"&gt;Strategic Storage Management&#10;&lt;/h3&gt;&lt;p&gt;When storage usage hits 85%, the system auto-deletes the oldest photos to maintain space.&lt;/p&gt;&#10;&lt;h3 id="survival-instincts"&gt;Survival Instincts&#10;&lt;/h3&gt;&lt;p&gt;In case of power loss or camera disconnects, the system includes auto-reconnect and retry logic to self-heal and stay online.&lt;/p&gt;&#10;&lt;h2 id="unexpected-rewards-becoming-a-quiet-observer-of-life"&gt;Unexpected Rewards: Becoming a Quiet Observer of Life&#10;&lt;/h2&gt;&lt;p&gt;The results far exceeded my expectations. It allowed me to observe:&lt;/p&gt;&#10;&lt;h3 id="a-miniature-home-sundial"&gt;A Miniature Home Sundial&#10;&lt;/h3&gt;&lt;p&gt;By tracking sunlight shifts on the floor, it became a massive clock of shadow and light.&lt;/p&gt;&#10;&lt;h3 id="the-silent-dance-of-plants"&gt;The Silent Dance of Plants&#10;&lt;/h3&gt;&lt;p&gt;In time-lapse, my succulent turned toward the sun like it was engaging in a dialogue with life.&lt;/p&gt;&#10;&lt;h3 id="the-moving-landscape-outside"&gt;The Moving Landscape Outside&#10;&lt;/h3&gt;&lt;p&gt;It captured drifting clouds, droplets melting from the roof after snow, everything like a living poem.&lt;/p&gt;&#10;&lt;h2 id="the-joy-of-creation-lies-in-the-process"&gt;The Joy of Creation Lies in the Process&#10;&lt;/h2&gt;&lt;p&gt;From the initial spark to a mature system, this 0-to-1 journey gave me indescribable satisfaction.&lt;/p&gt;&#10;&lt;p&gt;The beauty of technology isn’t in complexity, but in how we use it to understand and embrace life.&lt;/p&gt;&#10;&lt;p&gt;If you also feel passion for creation, start with a tiny idea. The real barrier is never the tools—it’s whether you&amp;rsquo;re willing to tinker, to explore.&lt;/p&gt;&#10;&lt;p&gt;&lt;strong&gt;Begin your journey now. Go capture your own, one-of-a-kind story in time.&lt;/strong&gt;&lt;/p&gt;&#10;</description></item></channel></rss>