RUST . Do you like RUST ?
Budget: €18 – €36 EUR
The attached RUST code ( part of a larger git ) was developed about 2 years ago. The project was in production for a while but was orphaned due to discovery of a different binary which seemed to suit our needs. As other parts of our app have matured and our knowledge and experience grown we have taken a fresh look at the rust generated binary and like some aspects of it such that we want to update it.
Unfortunately whilst our feeling that its developer was very proficient ( if not an image recognition specialist ) he is no longer a freelancer.
About the software:
The entire git when run ( cargo build release ) creates a “.so” which accepts terminal input to scan a folder in a structured way for all JPG images , find QR in those images , decode the QR and return the contents of the QR.
The general approach of this software was to create variations of each JPG files and send them to QUIRC in batches . QUIRC is a decent QR detector and decoder. We liked it because it decoded images where the QR was not photographed straight on and being a C library was faster and more cpu cycle efficient than its python peers. Batching allowed many images to be checked in parallel , exposing the advantages of RUST / C over pythons single threaded approach.
Your work :
What we have discovered however is that some of the variations we are sending make no sense for us . Example :
const BLUR_SIZE: f32 = 1.0;
const UNSHARPEN_THRESHOLD: i32 = 5;
Blurring an image and then sharpening it ? Seems odd to say the least .. but it does account for why a the same JPG’s QR can be decoded at one size and not another
// zero means "don't resize"
const SIZES: [(u32, u32); 3] = [(800, 600), (1600, 1200), (0, 0)];
We believe eliminating the various sizes will free up processing power an lead to speed enhancements , whilst still successfully decoding the QR.
What have we discovered :
We have come to appreciate the following function in opencv python
, gray = cv2.threshold(img, 60, 255, cv2.THRESH_BINARY) .
Pzybar ( an inferior library to quirc ) has shown a detection % increase when we pass to it either :
, gray = cv2.threshold(img, 60, 255, cv2.THRESH_BINARY)
Or
, gray = cv2.threshold(img, 80, 255, cv2.THRESH_BINARY)
Your job :
1.
Remove unsharpen and blur and create two variations of the grayscale image based around
cv2.threshold(img, XX, 255, cv2.THRESH_BINARY)
Where XX is 60 or 80
https://docs.rs/opencv/0.24.3/opencv/imgproc/fn.threshold.html
2. We believe this will allow us to change
// zero means "don't resize"
const SIZES: [(u32, u32); 3] = [(800, 600), (1600, 1200), (0, 0)];
To
const SIZES: [(u32, u32); 1] = (1600, 1200)];
( reducing the number of cpu cycles and increasing speed )
3. Confirm to us the order in which images are sent for scanning , an array is formed based on order before images are sent. We are getting better in real world production , at placing the QR in predictable places , ie the first images in a folder , the last images in a folder or close to the beginning. So would like the images searched in a particular order , which will reduce the waiting time for a return.
4. Confirm its the latest version of QUIRC , doesnt hurt to have the most
Your experience :
You will be strong in RUST. If you have opencv / C experience this is a bonus but for the purposes of this work those are secondary. Naturally we will favour people who have all round skills with image object recognition , but please make no mistake .. this needs a RUST developer , not a rewrite in whatever language you are comfortable.. That ship has sailed.
Unfortunately whilst our feeling that its developer was very proficient ( if not an image recognition specialist ) he is no longer a freelancer.
About the software:
The entire git when run ( cargo build release ) creates a “.so” which accepts terminal input to scan a folder in a structured way for all JPG images , find QR in those images , decode the QR and return the contents of the QR.
The general approach of this software was to create variations of each JPG files and send them to QUIRC in batches . QUIRC is a decent QR detector and decoder. We liked it because it decoded images where the QR was not photographed straight on and being a C library was faster and more cpu cycle efficient than its python peers. Batching allowed many images to be checked in parallel , exposing the advantages of RUST / C over pythons single threaded approach.
Your work :
What we have discovered however is that some of the variations we are sending make no sense for us . Example :
const BLUR_SIZE: f32 = 1.0;
const UNSHARPEN_THRESHOLD: i32 = 5;
Blurring an image and then sharpening it ? Seems odd to say the least .. but it does account for why a the same JPG’s QR can be decoded at one size and not another
// zero means "don't resize"
const SIZES: [(u32, u32); 3] = [(800, 600), (1600, 1200), (0, 0)];
We believe eliminating the various sizes will free up processing power an lead to speed enhancements , whilst still successfully decoding the QR.
What have we discovered :
We have come to appreciate the following function in opencv python
, gray = cv2.threshold(img, 60, 255, cv2.THRESH_BINARY) .
Pzybar ( an inferior library to quirc ) has shown a detection % increase when we pass to it either :
, gray = cv2.threshold(img, 60, 255, cv2.THRESH_BINARY)
Or
, gray = cv2.threshold(img, 80, 255, cv2.THRESH_BINARY)
Your job :
1.
Remove unsharpen and blur and create two variations of the grayscale image based around
cv2.threshold(img, XX, 255, cv2.THRESH_BINARY)
Where XX is 60 or 80
https://docs.rs/opencv/0.24.3/opencv/imgproc/fn.threshold.html
2. We believe this will allow us to change
// zero means "don't resize"
const SIZES: [(u32, u32); 3] = [(800, 600), (1600, 1200), (0, 0)];
To
const SIZES: [(u32, u32); 1] = (1600, 1200)];
( reducing the number of cpu cycles and increasing speed )
3. Confirm to us the order in which images are sent for scanning , an array is formed based on order before images are sent. We are getting better in real world production , at placing the QR in predictable places , ie the first images in a folder , the last images in a folder or close to the beginning. So would like the images searched in a particular order , which will reduce the waiting time for a return.
4. Confirm its the latest version of QUIRC , doesnt hurt to have the most
Your experience :
You will be strong in RUST. If you have opencv / C experience this is a bonus but for the purposes of this work those are secondary. Naturally we will favour people who have all round skills with image object recognition , but please make no mistake .. this needs a RUST developer , not a rewrite in whatever language you are comfortable.. That ship has sailed.