Welcome Guest! To enable all features, please Login or Register.

Notification

Icon
Error

Options
View
Last Go to last post Unread Go to first unread post
#1 Posted : Monday, February 2, 2009 3:55:05 AM(UTC)

anjali  
anjali

Groups: Registered
Posts: 43


I am using leadtools 77 patch & vb 6.0

I want to check if image is inverted for the following types of images

1. DICOM grayscale image with photometric=monochrome 1

2. DICOM grayscale image with photometric=monochrome 2

3. DICOM  image with photometric=Pallete color and RGB

 

Try the latest version of LEADTOOLS for free for 60 days by downloading the evaluation: https://www.leadtools.com/downloads

Wanna join the discussion? Login to your LEADTOOLS Support accountor Register a new forum account.

#2 Posted : Tuesday, February 3, 2009 4:31:54 AM(UTC)

Adnan Ismail  
Guest

Groups: Guests
Posts: 3,040

Was thanked: 1 time(s) in 1 post(s)

What do you mean by checking for inverted image? If you want to check the photometric interpretation value in the DICOM data set, you can check the element (0028,0004) that stores this value.
If you mean something else, please explain it in more details. If you are facing inversion issues with specific images, it could help if you send us some samples of these images.

 
#3 Posted : Tuesday, February 3, 2009 8:53:20 PM(UTC)

anjali  
anjali

Groups: Registered
Posts: 43


I want check whether the image is inverted or not.

I want to check whether the image is photographic negative or not.

 

 
#4 Posted : Wednesday, February 4, 2009 7:35:58 AM(UTC)

Adnan Ismail  
Guest

Groups: Guests
Posts: 3,040

Was thanked: 1 time(s) in 1 post(s)

I am not sure what you mean. Do you have a sample images that you can send me so I can investigate this? If yes, please send me the images in a ZIP or RAR file and provide me with more details about your requirements.
 
#5 Posted : Friday, February 6, 2009 12:49:56 AM(UTC)

anjali  
anjali

Groups: Registered
Posts: 43


Images.zip is attached alongwith, which contains 2 images original.dic and inverted.dic

( after loading you can see the inverted.dic as negative (photographic negative))

My question is after loading the image with LoadDS

how to programatically find out the image is inversed or not?

Thanks in advance,

File Attachment(s):
Images.zip (159kb) downloaded 16 time(s).
 
#6 Posted : Sunday, February 8, 2009 7:53:47 AM(UTC)

Adnan Ismail  
Guest

Groups: Guests
Posts: 3,040

Was thanked: 1 time(s) in 1 post(s)

One way to do that is to load the image and try to determine if it's "mostly dark" or "mostly light". To do that, you can use these steps:
1. Convert a copy of the image to 8-bit grayscale
2. Retrieve the image's histogram, which will contain the pixel count of every intensity level from 0 (black) to 255 (white)
3. Calculate the sum of all entries in the histogram table from 0 to 128 (lower half). If that total makes up a majority of the image (above 80% for example), you will know that most pixels in the image are dark. This indicates the image is NOT inverted. If that total is small (such as less than 20% of pixel count), the image is mostly light, so it would be inverted.

 
#7 Posted : Monday, February 9, 2009 1:55:23 AM(UTC)

anjali  
anjali

Groups: Registered
Posts: 43


Ok. It is giving the results upto some extent. But it may be the case that both dark and bright pixel count is 50-50 %. In this case what to do?

Is there any other inbulit method in your toolkit?

 

 
#8 Posted : Monday, February 9, 2009 5:41:53 AM(UTC)

Adnan Ismail  
Guest

Groups: Guests
Posts: 3,040

Was thanked: 1 time(s) in 1 post(s)

This means we will have to depend on other information in the image. For example, do you know if all images have dark background with the bright bone image in the middle?

If yes, you can use this information to calculate the histogram of the center area and compare it to the histogram of the outer area.

 
#9 Posted : Monday, February 9, 2009 7:56:26 PM(UTC)

anjali  
anjali

Groups: Registered
Posts: 43


An application have multiple types of images, so I can not fix some specific criteria for the images. Criteria satisfying some images may fail for other images. Is there any unique solution which will cover all types (variety of images)?

I also have some images for which getting the wrong results.

File Attachment(s):
Image.zip (171kb) downloaded 16 time(s).
 
#10 Posted : Tuesday, February 10, 2009 1:35:45 AM(UTC)

Adnan Ismail  
Guest

Groups: Guests
Posts: 3,040

Was thanked: 1 time(s) in 1 post(s)

This brings us back to defining the "information in the image" I mentioned in my previous post. Unless there is a way to define the similarities between inverted images and the difference from non-inverted images, there will not be a way to do it automatically.

The new image has a black border that is not part of the image itself. This can be removed using the Auto Trim (Auto Crop) function with a suitable threshold value.

I suggest you proceed as follows:
1. Prepare a large set of test images.
2. Apply auto Trim on all of them to find a threshold value that works with all images (both that have a border and those that don't).
3. Use the Stretch Intensity function to distribute the values more evenly.
4. Perform histogram analysis on the resulting image.
 
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Powered by YAF.NET | YAF.NET © 2003-2020, Yet Another Forum.NET
This page was generated in 0.188 seconds.