Skip to content

Releases

Nijatva Camera: photo matches the preview

Choose a tag to compare

Aapki baat bilkul sahi hai - aur wo sirf feeling nahi, do asli wajah hain. Dono handle ho gayi (commit 9abc90e).

1. Capture apni AE/AWB dobara converge karta tha. Preview jab tak aap dekh rahe the, auto exposure aur auto white balance converged the; still capture unhe phir se shuru karta hai aur thoda alag number par pahunchta hai - isliye photo preview se brighter ya cooler lagti hai. Ab capture AE aur AWB lock karke wahi values rakhta hai jo aap dekh rahe the. Lock sirf tab jab safe ho: manual ISO/exposure set ho to nahi (wo pehle se AE off par chalte hain), aur jab tak preview ne kam se kam ek baar converged state report na ki ho.

2. Framing alag thi. Viewfinder SurfaceView cover mode mein hai - screen bharta hai aur stream ko crop karta hai - jabki photo poora sensor frame rakhti hai. Matlab photo mein wo hissa bhi hai jo preview mein kabhi nahi dikha. PreviewMatch.visibleCrop ab theek se nikalta hai ki preview frame ka kaunsa hissa dikha raha tha.

Settings > Photo mein "Match preview" switch hai (default on, JSON export mein bhi jata hai), taaki kisi ajeeb HAL wale phone par band kiya ja sake.

Jo nahi badla, aur nahi badal sakta: preview stream capture se kam resolution aur kam effort wala stream hota hai, aur app ki apni grading (looks, per-lens tuning, portrait blur, burst merge) photo lene ke baad chalti hai. Preview kabhi photo ke barabar nahi hoga - par ab exposure, colour aur framing par wo photo se match karta hai, aur wahi farq sabse zyada dikh raha tha.

APK: nijatva-camera-preview-match-debug.apk - debug, com.nijatva.camera 0.4.0 (4).

Verified: 127 unit tests pass (naye PreviewMatchTest: lock kab safe hai, tall aur wide view ka crop, same aspect, meaningfulness, inset kabhi invert na ho), :app:assembleFullDebug succeeds.

Nijatva Camera: real zoom steps + draggable modes

Choose a tag to compare

Three things from the screenshots.

The zoom number never went past 2x. The pill printed one of two fixed strings, so a 3x step still read "2x". Labels now come from the factor - 1x, 2x, 3x, 2.4x - and the stops come from the camera's own limit, so a lens that reaches 3x gets a 3x stop and one that does not never shows a dead button. While a pinch is in progress the pill shows the live ratio (2.4x) instead of jumping between two labels, and settles on the nearest stop when you let go.

Drag a mode onto the strip. Long-press a tile in the MORE grid and drag it down: the mode moves to the end of the strip and the arrangement is remembered in Settings, so it survives a restart and rides along in the JSON export. The strip highlights while a drag is over it. Names this edition cannot do are dropped, duplicates collapse, and an arrangement that leaves nothing falls back to the default - a settings file from another edition cannot blank the strip.

The grid fits. Tiles are cards now (rounded fill, hairline edge) instead of bare icons, and the column is top-aligned: centring it had pushed the "MORE MODES" header into the middle of the screen with a band of empty black above it, which is what the screenshot showed.

APK: nijatva-camera-zoom-strip-debug.apk - debug build, com.nijatva.camera 0.4.0 (4), label "Nijatva Camera".

Verified: 120 unit tests pass, including ZoomStopsTest (whole and fractional labels, stops capped by the lens limit, nearest-stop selection) and StripOrderTest (custom order honoured, unavailable modes dropped, duplicates collapsed, nonsense falling back, a drop moving a mode to the end). :app:assembleFullDebug succeeds.

One thing this does not do yet: dragging within the strip to reorder. A drop currently always appends. If you want reorder-in-place as well, say so and I will add it next.

Nijatva Camera: portrait blur

Choose a tag to compare

No segmentation model, no library - two pieces kept apart on purpose.

  • radialMask() builds a mask with no model at all: sharp in the middle, blurred at the edges, smoothstep between so there is no visible ring. That is the honest version of this effect on a phone with no depth sensor.
  • apply() takes any mask as a plain float array and does the blurring: a quarter-resolution copy, a separable box blur whose radius grows with the resolution, and a per-pixel blend. When a device publishes DEPTH16 or dynamic depth, that map plugs into the same call and nothing else changes.

Working at quarter resolution makes it cheap enough for a 12 MP frame, and it hides that a box blur is not a lens.

In the app: Settings > Photo has the switch (off by default) and a "Sharp area" slider moving the sharp centre from 0.25 to 0.75 of the shorter side. Both ride along in the JSON export and presets.

A bug the tests caught: apply() returned a new array while the rest of the grade package works in place, so a caller that ignored the return value got the original frame back unchanged. Fixed.

APK: nijatva-camera-portrait-blur-debug.apk - debug build, com.nijatva.camera 0.4.0 (4), label "Nijatva Camera".

Verified: 106 unit tests pass, including 8 PortraitBlurTest cases - centre untouched, full mask removes detail, radial mask 0 at centre and 1 at corners and rising monotonically, a left/right depth map sharpens one half and blurs the other, strength scales, degenerate input refused, grey stays grey.

Be clear about what this is: a radial effect, not subject detection. It softens the corners of any photo, so a face in the middle is fine and a subject at the edge is not. Real subject separation needs a segmentation model (ML Kit or MediaPipe) - that is the next step, and it is the one place a library is the right call.

Nijatva Camera: Auto HDR for photo mode

Choose a tag to compare

@vasudev-work vasudev-work released this 17 Nov 01:43

Photo mode took one frame, so a backlit scene clipped its sky and nothing could bring it back. The pieces for a fix were already in the app - the analysis stream builds a 256-bin luma histogram for the overlay, and the HDR path already merges three exposures with our own stacker - they were just never connected.

How it decides

  • clippedFraction() reads the clipped share straight out of the histogram the overlay already computes, so the decision costs nothing extra.
  • shouldMergeBurst() has four conditions, and each one can veto: Auto HDR is on, the scene is clipping, the camera can hold a manual exposure for the merge, and a YUV stream exists to merge from. Any failure means an ordinary JPEG - never worse than a burst that cannot be taken.
  • In Photo mode the engine takes the HDR plan when the answer is yes, and the merged shot is labelled HDR rather than PHOTO.
  • Settings > Photo has the switch, on by default, and it rides along in the JSON export and presets like every other setting.

APK: nijatva-camera-autohdr-debug.apk - debug build, com.nijatva.camera 0.4.0 (4), label "Nijatva Camera".

Verified: 98 unit tests pass, including the histogram reading (7% clipped from a synthetic histogram), empty and short histograms, and each of the four vetoes. :app:assembleFullDebug succeeds.

What to look for on the phone: point at a bright sky with something dark in front. The shot should take a moment longer than usual, and the sky should keep its colour instead of going white. If it looks soft, that is the burst not settling - tell me and I will raise the skipped frames per step.

Nijatva Camera: tuning sliders

Choose a tag to compare

@vasudev-work vasudev-work released this 17 Nov 01:23

Four sliders, written here - no LUT library, no shader dependency, no copied code.

  • Brightness: a lift after the tone curve.
  • Contrast: changes how much of the midtone S-curve is used, with black and white pinned. White still rolls off just under 1 through the shoulder, so nothing clips flat.
  • Saturation and Sharpness: scale the look's own values, bounded at 0.5x-1.5x and 0-1.5x, so the ends of the travel still produce a photograph.

All four are -1..1 nudges, centred at zero in Settings > Photo and shown as +12 / -30. Move them back to zero and the preset underneath is untouched. Because they live in Settings, they ride along in the JSON export and in saved presets with no extra code.

APK: nijatva-camera-tuning-sliders-debug.apk - debug build, com.nijatva.camera 0.4.0 (4), label "Nijatva Camera".

Verified: 95 unit tests pass, including 8 new LookTuningTest cases (neutral is a no-op, each slider moves its own quantity, the curve really separates midtones, extremes stay in range, tuning stacks on every preset).

On the rest of the list: Pro mode (manual ISO/shutter/focus + DNG) already exists, Night/HDR/Astro already merge their own frames with our C++ stacker, and per-lens colour tuning landed last commit. Still missing, and each needs a phone to validate: auto-HDR for plain Photo shots, portrait blur, and gyro video stabilisation. Portrait blur and EIS are the two where a library would actually save months - MediaPipe or ML Kit for segmentation, Media3 for stabilisation - so those are worth a deliberate decision rather than a hand-rolled first attempt.

Nijatva Camera: per-lens colour tuning

Choose a tag to compare

The four XML files are shared-preference dumps from a Google Camera mod (BSG), not Camera2 characteristics: gawb_user_*, fix_saturation_key_*, peaking_key_*, hdr_frames. So they cannot be dropped into this app - those numbers drive that mod's own pipeline and mean nothing in ours.

What they do show, in all four files, is that each lens is tuned separately: saturation 1.18 on the main camera, 1.20 on the ultra-wide, 1.15 on the 3x, 1.10 on the periscope, 1.08 on the front. This app applied one look to every lens, so that structure is now implemented.

  • Main: unchanged.
  • Ultra-wide: saturation +3%, clarity +15% - a wide frame is mostly sky and landscape, and noise is not what limits it.
  • Telephoto: saturation -3%, sharpening -10% - a cropped, noisier frame turns both into mush.
  • Front: saturation -6%, sharpening -15%, warmth +0.01 - the subject is a face.

Classification uses 35mm-equivalent focal length (focal x 36 / sensor width), so a wide main camera on a small sensor is not mistaken for an ultra-wide. The adjustments are multipliers, so Punch stays punchier than Natural on every lens.

APK: nijatva-camera-lens-tuning-debug.apk - debug build, com.nijatva.camera 0.4.0 (4), label "Nijatva Camera".

Verified: 87 unit tests pass (new LensTuningTest included), :app:assembleFullDebug succeeds.

Nijatva Camera: Punch look for deep colour

Choose a tag to compare

@vasudev-work vasudev-work released this 17 Nov 00:55

The reference wallpapers share three measurable things: essentially no clipped pixels (0.01%), saturation between 0.48 and 0.65, and high local contrast. This adds a look tuned to that recipe.

Punch: clarity 0.38, saturation 1.30, shoulder 0.88, warmth +0.03, sharpen 0.30, chroma denoise 0.40. It sits in Settings > Photo next to Natural, Cinematic, Vivid and Soft.

Chroma ceiling per look: it was one constant, so every look shared the neutral limit. It is now part of the Look, so Punch can carry 0.55 of colour range while the others keep 0.42 - which is what stops a deep red or a marigold from going neon.

APK: nijatva-camera-punch-look-debug.apk - debug build, com.nijatva.camera 0.4.0 (4), label "Nijatva Camera", both ABIs.

Verified: 80 unit tests pass, :app:compileFullDebugKotlin and :app:assembleFullDebug succeed.

Honest note: those three references are renders - 1600x900 WEBP with zero EXIF, and 0.01% clipping is not something a phone sensor produces in a backlit sunset or a city night. Punch closes the colour and contrast gap on real scenes; it cannot close the dynamic-range gap, which needs a real HDR burst, or the bokeh gap, which needs portrait mode.

Nijatva Camera: labels, press states, peaking alignment

Choose a tag to compare

@vasudev-work vasudev-work released this 17 Nov 00:26

Four small defects, each fixed at its cause.

  • No content descriptions anywhere on the viewfinder. Every icon-only control was announced as "button". IconButton now names itself from its kind (flash auto, switch camera, grid, HDR, timer three seconds, aspect ratio...), and the shutter and last-photo thumbnail are named too.
  • Nothing responded to a press. IconButton now draws a lighter disc and shrinks slightly while pressed; the shutter springs from 0.92 back to full size on release; the MORE grid tiles get the platform's borderless ripple.
  • Focus peaking sat in the wrong place. The mask was drawn with FIT_XY, stretching a 4:3 sensor frame across a taller view, so highlight lines drifted off the subject - worst in landscape. The preview is a SurfaceView in cover mode, so the overlay now uses CENTER_CROP and needs no manual resize.
  • The Appearance sheet squeezed its fourth pill into a circle reading "Bl ac k". Pills share the row evenly, stay on one line and shrink their text instead of wrapping - the same fix the gallery needed.

APK: nijatva-camera-polish-debug.apk - debug build, com.nijatva.camera 0.4.0 (4), label "Nijatva Camera", both ABIs. Debug key: uninstall an earlier build signed with a different key first.

Verified: :app:compileFullDebugKotlin and :app:assembleFullDebug both succeed, and aapt2 reports the version and label above.

Nijatva Camera: capture intents + family hand-offs

Choose a tag to compare

@vasudev-work vasudev-work released this 16 Nov 16:09

The camera now accepts capture requests from other apps, and the suite helper compiles.

Capture intents

  • IMAGE_CAPTURE, VIDEO_CAPTURE and STILL_IMAGE_CAMERA filters on MainActivity, with singleTop so a second request lands in onNewIntent.
  • With EXTRA_OUTPUT the finished shot is copied into the caller's uri; without it, a 640px bitmap comes back in data. Either way the activity finishes with RESULT_OK, and a failed copy returns RESULT_CANCELED instead of pretending it worked.
  • Works for every save path: single photo, Night/HDR/Astro merge, DNG, panorama and video.

Also fixed: NijatvaMediaIntents.kt shipped with every brace doubled (object X {{), which is not Kotlin and broke the build. Braces are single, and MainActivity now delegates its gallery/editor/gallery-app hand-offs to that helper, so the family package list lives in one place.

APK: nijatva-camera-capture-intent-debug.apk - debug build, versionName 0.4.0, versionCode 4, label "Nijatva Camera", both ABIs. Debug key, so uninstall any earlier build signed with a different key first.

Verified: :app:compileFullDebugKotlin and :app:assembleFullDebug succeed, and aapt2 on the built APK shows the three filters and launchMode=1.

Nijatva Camera UI + looks (debug build)

Choose a tag to compare

@vasudev-work vasudev-work released this 16 Nov 08:46

UI polish and the clean-output grading stages, as an installable build of the current main.

New since v0.4.0

  • The hamburger menu is a card from the app's own palette (260dp, 20dp corners, hairline border, dimmed preview behind) instead of a platform grey list dialog.
  • The MORE grid centres its tiles between the header and the strip, keeps 84dp clear of the strip, and respects the status-bar inset.
  • The selected mode's pill follows the accent, with legible text on every accent; MORE is an outline, so two chips are never filled at once.
  • Looks: Natural, Cinematic, Vivid and Soft in Settings > Photo.
  • Chroma denoise (colour noise smoothed, luma untouched), sharpening with a noise threshold, luma-preserving warmth and a shadow lift.
  • Settings sheets follow the accent, including the switches.

This APK

nijatva-camera-0.4.0-strip-debug.apk - debug build, versionName 0.4.0, versionCode 4, minSdk 29, targetSdk 35, label "Nijatva Camera", both ABIs of libgcamprocessor.

It is a debug build: signed with the debug key and marked debuggable. The signed release build could not be produced in this environment (the release variant's Kotlin compile does not fit the per-command time limit here), so install this one to try the changes; the version string still reads 0.4.0 because the release build never ran.

Verified: :app:compileFullDebugKotlin and :app:assembleFullDebug succeed, aapt2 reports the label and version above, and the 17 grading tests pass.