MATLAB: Removing reflection from car headlight
up vote
0
down vote
favorite
I have a video frame that contain lot of reflection from car headlight, this is the best result I can get while processing with HSV color space.
A)Original image B)value color space C)filtered image
This is the code I used for filtering the frame. Is there any better way to remove the light reflection?
for i = 1:150 % Im using the 150th frame of the video
frame = step(videoReader); % read the next video frame
hsv = rgb2hsv(frame);
h = hsv(:, :, 1); % Hue image.
s = hsv(:, :, 2); % Saturation image.
v = hsv(:, :, 3); % Value (intensity) image.
thresholdframe = v;
inversev = ~s;
thresholdframe = v > 0.99;
borderclearframe = imclearborder(s);
BW2 = bwareafilt(thresholdframe,[400 500]);
end
matlab image-processing
add a comment |
up vote
0
down vote
favorite
I have a video frame that contain lot of reflection from car headlight, this is the best result I can get while processing with HSV color space.
A)Original image B)value color space C)filtered image
This is the code I used for filtering the frame. Is there any better way to remove the light reflection?
for i = 1:150 % Im using the 150th frame of the video
frame = step(videoReader); % read the next video frame
hsv = rgb2hsv(frame);
h = hsv(:, :, 1); % Hue image.
s = hsv(:, :, 2); % Saturation image.
v = hsv(:, :, 3); % Value (intensity) image.
thresholdframe = v;
inversev = ~s;
thresholdframe = v > 0.99;
borderclearframe = imclearborder(s);
BW2 = bwareafilt(thresholdframe,[400 500]);
end
matlab image-processing
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I have a video frame that contain lot of reflection from car headlight, this is the best result I can get while processing with HSV color space.
A)Original image B)value color space C)filtered image
This is the code I used for filtering the frame. Is there any better way to remove the light reflection?
for i = 1:150 % Im using the 150th frame of the video
frame = step(videoReader); % read the next video frame
hsv = rgb2hsv(frame);
h = hsv(:, :, 1); % Hue image.
s = hsv(:, :, 2); % Saturation image.
v = hsv(:, :, 3); % Value (intensity) image.
thresholdframe = v;
inversev = ~s;
thresholdframe = v > 0.99;
borderclearframe = imclearborder(s);
BW2 = bwareafilt(thresholdframe,[400 500]);
end
matlab image-processing
I have a video frame that contain lot of reflection from car headlight, this is the best result I can get while processing with HSV color space.
A)Original image B)value color space C)filtered image
This is the code I used for filtering the frame. Is there any better way to remove the light reflection?
for i = 1:150 % Im using the 150th frame of the video
frame = step(videoReader); % read the next video frame
hsv = rgb2hsv(frame);
h = hsv(:, :, 1); % Hue image.
s = hsv(:, :, 2); % Saturation image.
v = hsv(:, :, 3); % Value (intensity) image.
thresholdframe = v;
inversev = ~s;
thresholdframe = v > 0.99;
borderclearframe = imclearborder(s);
BW2 = bwareafilt(thresholdframe,[400 500]);
end
matlab image-processing
matlab image-processing
edited Nov 12 at 7:39
Rishikesh Raje
5,2911826
5,2911826
asked Nov 11 at 11:27
danny
204
204
add a comment |
add a comment |
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53248258%2fmatlab-removing-reflection-from-car-headlight%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown