-
Notifications
You must be signed in to change notification settings - Fork 4
chore(release): bump version to 0.15.0 and rebuild dist #183
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
01754c7
chore(release): bump version to 0.15.0 and rebuild dist
kalwalt 9c3d8b0
docs(orb): restore the class description displaced by the ic_angle ch…
kalwalt e6071cc
chore(release): refresh the 0.15.0 changelog after the orb docs fix
kalwalt 06d8436
Merge branch 'dev' into chore/release-0.15.0
kalwalt 576b9c0
chore(release): rebuild artifacts with the review fixes from #184
kalwalt File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,98 @@ | ||
| import { default as jsfeatNext } from '../core/core'; | ||
| import { matrix_t } from '../matrix_t/matrix_t'; | ||
| import { match_t } from './match_t'; | ||
| /** | ||
| * Brute-force Hamming matcher for binary descriptors (ORB today; TEBLID/FREAK | ||
| * once ported). Ported from the inline `match_pattern()`/`popcnt32()` helpers | ||
| * in `examples/sample_orb_pinball.html` — the only matcher jsfeatNext had | ||
| * before this module, duplicated across the ORB samples. | ||
| * | ||
| * The population-count routine is bit-identical to the sample's `popcnt32`, | ||
| * and descriptor rows are read the same way the sample does | ||
| * (`matrix_t.buffer.i32`, the full backing buffer reinterpreted as 32-bit | ||
| * words) — so this can serve as PureCV's numeric reference oracle the same | ||
| * way the rest of jsfeatNext does (see issue #96). | ||
| * | ||
| * Descriptor width must be a multiple of 4 bytes: 32 (ORB) and 64 (TEBLID | ||
| * p512) both qualify. Unlike `svd_invert`'s non-square guard (#102), this is | ||
| * not a jsfeat divergence — original jsfeat never shipped a matcher at all — | ||
| * so there is no parity obligation, only an explicit failure instead of a | ||
| * silently wrong read past the buffer's actual word count. | ||
| */ | ||
| export declare class bfmatcher extends jsfeatNext { | ||
| /** Distance norm in use. Only `JSFEAT_CONSTANTS.NORM_HAMMING` (exposed as `jsfeatNext.NORM_HAMMING`) is implemented. */ | ||
| norm_type: number; | ||
| /** When true, {@link match} keeps only mutually-best (query, train) pairs. */ | ||
| cross_check: boolean; | ||
| constructor(norm_type?: number, cross_check?: boolean); | ||
| /** SWAR population count — identical to the sample's `popcnt32`. */ | ||
| private static popcnt32; | ||
| /** | ||
| * Physical width of one descriptor row, in bytes. | ||
| * | ||
| * NOT `cols`. `matrix_t.allocate` sizes its buffer as | ||
| * `cols * sizeof(type) * channel * rows`, so a row's storage depends on all | ||
| * three. Two matrices can share a `cols` and still have different row | ||
| * widths — a U8/C1 and a U8/C2 with `cols = 32` occupy 32 and 64 bytes — | ||
| * which is why the stride check below compares this rather than `cols`. | ||
| */ | ||
| private static rowBytes; | ||
| /** | ||
| * Int32-word view over a descriptor matrix's full backing buffer, matching | ||
| * `matrix_t.buffer.i32` — the same access the original sample uses. | ||
| * | ||
| * @throws {Error} if the descriptors are not `U8`, or if a row is not a | ||
| * whole number of 4-byte words. | ||
| */ | ||
| private static words; | ||
| /** | ||
| * Int32 views over a query/train PAIR, plus the row stride in words. | ||
| * | ||
| * Both matrices are addressed with a single stride, so a width mismatch is | ||
| * not a mild inconsistency: `train` rows would be read at `ti * word_len`, | ||
| * an offset computed from the QUERY width. The reads walk across train row | ||
| * boundaries and, past the end, an out-of-range `Int32Array` index yields | ||
| * `undefined`, which XOR coerces to 0. The result is a full set of | ||
| * confident, silently wrong Hamming distances rather than any error — the | ||
| * matcher would report its best guess over garbage. | ||
| * | ||
| * Compares {@link rowBytes}, not `cols`, so a channel or element-type | ||
| * difference cannot slip past a matching column count. | ||
| * | ||
| * @throws {Error} if the row widths differ, or either matrix is rejected by | ||
| * {@link words}. | ||
| */ | ||
| private static pairWords; | ||
| private static hamming; | ||
| /** | ||
| * Nearest-neighbour match between two descriptor sets. | ||
| * | ||
| * With {@link cross_check} set, a pair is only kept when it is mutually | ||
| * best: `query[i]`'s nearest neighbour is `train[j]`, AND `train[j]`'s | ||
| * nearest neighbour (searched back over `query`) is `query[i]`. | ||
| * | ||
| * @param query Query descriptors (U8, one row per descriptor). | ||
| * @param train Train descriptors, same row width as `query`. | ||
| * @param max_distance Maximum Hamming distance to accept a pair. | ||
| */ | ||
| match(query: matrix_t, train: matrix_t, max_distance?: number): match_t[]; | ||
| /** | ||
| * k-nearest matches per query descriptor, each row sorted ascending by | ||
| * distance. | ||
| */ | ||
| knnMatch(query: matrix_t, train: matrix_t, k?: number): match_t[][]; | ||
| /** | ||
| * Lowe's ratio test over the output of `knnMatch(query, train, 2)`: keeps | ||
| * a query's best match only when it is meaningfully closer than the | ||
| * second-best (guards against ambiguous, repeated-texture matches). | ||
| * | ||
| * An instance method, not `static`, even though it reads no instance | ||
| * state: static methods are unreachable through a singleton instance | ||
| * (`jsfeatNext.bfmatcher.ratio_test(...)` — this repo's calling | ||
| * convention since 0.9.0 — would be `undefined` on a static declaration). | ||
| * Confirmed empirically before fixing: an earlier draft declared this | ||
| * `static`, following the #83 prototype literally, and the singleton | ||
| * simply had no such method at runtime. | ||
| */ | ||
| ratio_test(knn: match_t[][], ratio?: number): match_t[]; | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| /** Public shape of {@link match_t}. */ | ||
| export interface IMatch_T { | ||
| /** Index into the query descriptor set. */ | ||
| queryIdx: number; | ||
| /** Index into the train descriptor set. */ | ||
| trainIdx: number; | ||
| /** Hamming distance between the two descriptors. */ | ||
| distance: number; | ||
| } | ||
| /** | ||
| * One descriptor correspondence — the equivalent of OpenCV's `cv::DMatch`. | ||
| * Produced by {@link bfmatcher.match} / {@link bfmatcher.knnMatch}. | ||
| */ | ||
| export declare class match_t implements IMatch_T { | ||
| queryIdx: number; | ||
| trainIdx: number; | ||
| distance: number; | ||
| constructor(queryIdx?: number, trainIdx?: number, distance?: number); | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.