Comments (7)
Merge request has been approved and merged into the dev branch. Change has been deployed to version 2.0.4 of augraphy on pypi.
from augraphy.
Hi @kwcckw . Thanks for highlighting this.
The BrightnessAugmentation adjusts the brightness using HSV space. It can be applied to any phase (ink, paper,post) using self.layer
argument.
But the "ink" phase inputs the image as Grayscale image with 1 channel only. Hence, its not compatible with hsv = cv2.cvtColor(img.astype("uint8"),cv2.COLOR_BGR2HSV)
. It should be first converted into BGR format.
def __init__(self, layer, range=(0.8, 1.4), probability=0.5):
super().__init__(probability=probability)
self.range = range
self.layer = layer
I have adjusted the code, and I will push it in my PR. @jboarman
from augraphy.
Hi @kwcckw . Thanks for highlighting this.
The BrightnessAugmentation adjusts the brightness using HSV space. It can be applied to any phase (ink, paper,post) usingself.layer
argument.
But the "ink" phase inputs the image as Grayscale image with 1 channel only. Hence, its not compatible withhsv = cv2.cvtColor(img.astype("uint8"),cv2.COLOR_BGR2HSV)
. It should be first converted into BGR format.def __init__(self, layer, range=(0.8, 1.4), probability=0.5): super().__init__(probability=probability) self.range = range self.layer = layer
I have adjusted the code, and I will push it in my PR. @jboarman
Thanks, and in this case, since 'ink' phase input is in grayscale, probably we can just adjust the code similarly?
Right now i can see it is applied in saturation and value channel of hsv image, so if the input is grayscale, why don't we just apply it directly to the grayscale values?
from augraphy.
Yes this can also be done , as for single channel images to increase brightness we can tweak the saturation channel only.
from augraphy.
Yes this can also be done , as for single channel images to increase brightness we can tweak the saturation channel only.
Sorry but how can we get saturation channel in single channel image? Merge same single channel image to bgr ( 3 channels of grayscale) , convert them to hsv and adjust the saturation channel?
from augraphy.
Yes you are right @kwcckw . We have to convert grayscale into bgr to get the saturation channel and adjust it.
from augraphy.
Yes you are right @kwcckw . We have to convert grayscale into bgr to get the saturation channel and adjust it.
Alright thanks for the clarification again.
from augraphy.
Related Issues (20)
- Create Baseline Performance Benchmark; Apply Initial Optimizations Using Numba HOT 2
- Create Example Using Dataloader for PyTorch and TensorFlow HOT 1
- Add Python 3.11 Support, Drop Python 3.7 HOT 2
- Images Broken in PyPI Listing HOT 2
- Reflected Light from Camera Flash or other Bright Sources HOT 1
- Add Color Shifting / 3D Blur Effect HOT 4
- Improve PageBorder effect HOT 1
- Add support for bounding box, keypoints and mask. HOT 1
- Add `InkColorSwap` to Replace the Color Used for Lettering in a Document HOT 1
- Add `InkMottling` Augmentation to Ensure Ink is Non-Uniform HOT 1
- Add support for image with alpha layer. HOT 1
- Color range in InkBleed is not working HOT 1
- Update to Paper Factory HOT 1
- Confusion on `Geometric` Augmentation HOT 2
- Memory leak in AugmentationSequence HOT 4
- Training becomes very slow with these transforms. HOT 10
- ColorPaper cant generate different color in the cycle running HOT 2
- DirtyScreen doesnt work and crashes jupyterlabs HOT 2
- stucked when I process image in the cycle HOT 5
- Default pipeline generates many "unreadable" documents HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from augraphy.