Skip to content

add grey image reader #1001

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

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open

add grey image reader #1001

wants to merge 6 commits into from

Conversation

jenniew
Copy link
Contributor

@jenniew jenniew commented Jun 12, 2017

What changes were proposed in this pull request?

Add grey image reader

How was this patch tested?

Add unit test case to DataSetSpec

Related links or issues (optional)

fixed #970

// Class.forName("java.awt.color.ICC_ColorSpace")
// Class.forName("sun.java2d.cmm.lcms.LCMS")
// ColorSpace.getInstance(ColorSpace.CS_GRAY).toRGB(Array[Float](0, 0, 0))

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

code clean

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated

// ColorSpace.getInstance(ColorSpace.CS_GRAY).toRGB(Array[Float](0, 0, 0))

def apply(scaleTo: Int = Image.NO_SCALE, normalize: Float = 255f)
: Transformer[LocalLabeledImagePath, LabeledGreyImage]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

comment

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add comments

* return LabeledBGRImage and the file name.
*/
object LocalGreyImgReaderWithName {
Class.forName("javax.imageio.ImageIO")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you make the name as one variable in LabeledGreyImage, otherwise seems there are many duplicate codes

@SeaOfOcean
Copy link
Contributor

LGTM

@yiheng
Copy link
Contributor

yiheng commented Sep 4, 2017

@jenniew As the PR has been approved, when will you merge the PR? And any PR validation msg?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Provide API to read raw grey image file
3 participants